Back to JIT testing
The latest version of the serial servo controller is now fully operational (I’ll upload the source code shortly). There are still some bugs that I’m finding but the work I put in to getting the unit tests in place makes fixing these bugs pretty straight forward. Whilst I have pretty much 100% coverage for the simpler serial commands I’ve stopped writing tests for the ‘multi-move’ command now and I’ve switched to “Just in time” testing; that is I write a test in response to finding a bug. The test duplicates the input that causes the bug to show up and then I fix the bug using the test harness to exercise the code with the correct input values… It would be nice to stay focused on getting 100% coverage on the multi-move command but right now that’s not a priority.
Whilst developing the servo controller I often wished I had an oscilloscope, being able to visualise the signals that I was generating would have been useful many times. Due to the cost, choice and the fact that I eventually worked out what I was doing wrong in each situation I am continuing to delay getting an oscilloscope but today I saw a cheap little device that could be useful as I tune the controller in future. My ’new products’ feed from CoolComponents had the TextStar Serial LCD Display in it this morning. This is a neat little programmable display which has a ‘servo signal display’ mode which enables it to display the pulse length and refresh rate of a servo signal. Given the cheap price and the fact that I’m sure the LCD display in itself will be useful I ordered one. I hope to hook it up to my controller so that I can see what’s being generated. The datasheet for the device is here.