Jon Langseth [Wed, 7 Sep 2011 19:49:13 +0000 (21:49 +0200)]
Changes to debugging, battery alarm, ppm timing:
* Added a #define DEBUG statement, and a bunch of #ifdef/#else/#endif that includes or excludes debugging code depending on this #define
* Added BATTERY_CRITICAL, and changed the way BATTERY_LOW was handled. We now have two states of "severity" on the battery
* Set the debugging-value of BATTERY_CRITICAL to 0, to be able to debug without a battery connected :P
* Changed PPM timings again, had problems with some RF recievers. Tested OK with: fmsusb2, Graupner RX700, Corona RS810II, Corona RP8D1.
Jon Langseth [Sat, 3 Sep 2011 11:08:38 +0000 (13:08 +0200)]
New tuning of PPM timer constants. These values are tuned to give max range, and precise center with fmsusb2 PPM-to-USB decoder. As a bonus, it seems the PPM timing is so clean, we can now feed all eight channels by default, and fmsusb2 will happily ignore the two upper channels :D
Jon Langseth [Fri, 2 Sep 2011 16:23:34 +0000 (18:23 +0200)]
Added saving to and reading from internal EEPROM. In this version, calibration data and "default model settings" are saved. Selection of models, and saving/loading of models from menu is not yet implemented.
Jon Langseth [Tue, 30 Aug 2011 16:15:28 +0000 (18:15 +0200)]
Moved to new value format on model.stick. Used to be float 0..1, is not float -100 to 100, plus a series of other fixes:
Updated process_inputs() to the new values
Added dual-rate math to process_inputs()
Updated the ISR_Timer to reflect the new value format, and added an extra sanity check
Added raw values to model datastruct for debugging
Added dumping of raw value to serial-dumping.
Tested tuning of PPM timing const's, may still be glitchy..
Moved the calibrate-trigger during startup, it did not get triggered after the change to active low logic
Removed a for-loop-limit-bug causing incorrect/invalid values for input_cal.max[0] and model.stick[0]
Changed the calibrate routine to use one int less, less code space and cycles.
Jon Langseth [Mon, 29 Aug 2011 16:38:35 +0000 (18:38 +0200)]
Mainly data-structure changes:
Restructured global variables, actively using structs
Changed a bunch of constants stored in variables to #defines
Added a bit of quasi-sane initialization of model settings
Saved about 800 bytes of memory use.
Signed-off-by: Jon Langseth <jon.langseth@lilug.no>