summaryrefslogtreecommitdiff
path: root/src/ao_log.c
Commit message (Collapse)AuthorAge
* altos: Add 5V reference computation for v1.1 boards.Keith Packard2011-01-15
| | | | | | This should compensate for changes in the 3.3V voltage. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: check for valid flight number in ao_log_deleteKeith Packard2011-01-12
| | | | | | | | Zero is not a valid flight number, and ao_log_flight uses that to indicate 'no flight in this slot'. Check the user-provided input for zero before looking through the slots. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Check for full log and complainKeith Packard2011-01-07
| | | | | | | Reports special tone along with the continuity checks. Reports flight 0 in telemetry. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: ensure erase mark is written when erasing flightsKeith Packard2011-01-07
| | | | | | | | It was getting called only when *failing* to erase a flight (oops), secondly, it wasn't getting written because ao_storage_flush wasn't getting called. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: report flight log offsets in hex block numbers instead of bytesKeith Packard2011-01-07
| | | | | | makes them compatible with the 'e' command. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: support storage of multiple flights.Keith Packard2011-01-07
| | | | | | This adds the logging support for dealing with multiple flights Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Mark end of available flight list with 'done' to make the UIKeith Packard2011-01-06
| | | | | | code easier to write Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Rip out 'optimization' in ao_log_scanKeith Packard2011-01-06
| | | | | | | Remove premature optimization to avoid re-scanning the flight logs for the best empty entry. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Move common storage code to ao_storage.c. Add M25P80 driverKeith Packard2011-01-06
| | | | | | | This reworks the storage API so that you erase blocks and then store data to them so that the M25P80 driver will work. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Require manual flight erasing.Keith Packard2011-01-06
| | | | | | This supports flash chips that require larger erase blocks. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Simplify storage APIKeith Packard2011-01-06
| | | | | | | This removes the config-specific APIs and exposes global variables for the available storage space, block size and config storage location. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: mark gps date written only after it gets into eepromKeith Packard2010-08-26
| | | | | | | | Data logging doesn't start until boost detect occurs. As the GPS date is only logged once, if that happens before logging is written to the flash, then the GPS date will never get saved. Signed-off-by: Keith Packard <keithp@keithp.com>
* Make ao_log_data re-entrant as it is used for both sensor and GPS logsKeith Packard2010-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because ao_log_data is called from two different threads, failing to make it re-entrant would cause the 'log' pointer parameter to get overwritten if another thread asked to log data while the eeprom was busy writing out a block. This would cause the second thread to re-writing data from the first thread's address, but without re-checksumming the data as the checksum is computed before the log mutex is taken. The bug can be seen by log blocks with invalid checksums. Here's what happens with the ao_gps_tracking_report and ao_log threads: ao_gps_tracking_report ao_log Writes a bunch of records *blocks* in the eeprom flush sets ao_log_data 'log' to global 'log' computes checksum for 'log' block *blocks* on ao_log_mutex Wakes up sets ao_log_data 'log' to 'gps_log' writes remaining records 'gps_log' is left with svid = 0 *blocks* on ao_gps_tracking_data writes data, reading from the current ao_log_data 'log' pointer which points at 'gps_log' Making ao_log_data re-entrant fixes this by ensuring that the 'ao_log' thread has its own copy of the ao_log_data 'log' parameter. I made this function take an __xdata restricted pointer so that it could be passed in the dptr register instead of needing to go on the stack. Signed-off-by: Keith Packard <keithp@keithp.com>
* Add flight number to telemetry stream.Keith Packard2009-11-15
| | | | | | | | This makes it easier to tie the telemetry and eeprom files together as they're now both labeled with serial and flight numbers, which should be unique. Signed-off-by: Keith Packard <keithp@keithp.com>
* Remove "l" command as ao-dumplong no longer uses itKeith Packard2009-11-02
|
* Save some DSEG space by marking cmd functions __reentrantKeith Packard2009-10-16
| | | | | | | __reentrant causes the compiler to place args and locals on the stack instead of in the data segment. Signed-off-by: Keith Packard <keithp@keithp.com>
* Remove bit-banging debug support from TM board buildsKeith Packard2009-09-02
| | | | | | | | | Our current TM boards don't have the wires to do bit-banging to another cc1111 board, so it doesn't make sense to fill up their flash with useless code (and the 'help' text with useless commands). Leave this to the TI board until we have boards that can serve as debug dongles. Signed-off-by: Keith Packard <keithp@keithp.com>
* Use autotools, move altos to src subdirKeith Packard2009-06-04
Signed-off-by: Keith Packard <keithp@keithp.com>