| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
This should compensate for changes in the 3.3V voltage.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Reports special tone along with the continuity checks.
Reports flight 0 in telemetry.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
makes them compatible with the 'e' command.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This adds the logging support for dealing with multiple flights
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
code easier to write
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Remove premature optimization to avoid re-scanning the flight logs for
the best empty entry.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This supports flash chips that require larger erase blocks.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
__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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
Signed-off-by: Keith Packard <keithp@keithp.com>
|