| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
This ensures that the beeps will work even before the configuration
has been loaded.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Avoid using puts, which can be a large library function.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Useful for single-threaded applications, like lambdakey
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Redefines some stdio bits so that we can build with either pdclib or
newlib + avr stdio.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Use MPU9250 for accel, gyro and mag data in logging, telemetry and
flight status computations.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
* Duplicate 'const' in test code.
* Mis-formatted loop in kf_rem_pio2
* Unused 'one' in sf_cos
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Was reporting correct flight log as corrupted. Oops.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Move common logging APIs from per-format files into ao_log.c. Then,
change that code to check the first log record in a slot (containing
the flight number) to see if it's invalid and deal with it. That
involves not re-using that slot, and allowing it to be erased.
Corrupted log blocks are reported with a negative flight number.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Instead of having a global variable define the log format, use a macro
instead to save data space.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
We don't ever need to be able to do storage read/write across chunks
of flash on the old cc1111 products, so remove the loops that support
it to save space.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
The remaining hooks to make the MPU9250 work in flight.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We already have the fired status saved in the ao_pyro_fired variable,
so just use that to detect whether a channel has already been fired.
Fixes possible cases where the pyro config data gets written back to
eeprom with the fired bit set, which then inhibits the channel during
flight.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
A pyro config like 'Descending' has no value associated. When it is at
the end of the line, allow a newline to terminate the name instead of
just a space.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
We only use this for baro-only devices to avoid firing drogue charges
at mach transitions; we trust the combination of accel+baro to do the
right thing when available.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of completely eliminating the baro sensor above mach speed,
just derate it a bit so that the accel will dominate for speed
computation and keep the device from false-triggering across mach
transitions.
When we completely ignored the baro sensor above mach, and the flight
spent considerable time in that speed range, then the estimated height
could be far from the real value. When the estimated speed dropped
back down and the baro values were brought back into the computation,
then the resulting rapid shift in estimated speed could trigger
accidental apogee detection.
By mixing in a bit of baro data even above mach, we keep the estimated
height closer to the baro value and prevent this error, at least in
flights measured so far.
The flight known to have this problem is:
2015-09-26-serial-2093-flight-0012.eeprom
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
We don't use the error value in flight for those models anyways; it's
only useful on baro-only hardware.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Subtracting two 16-bit unsigned values to perform time comparisons
yields mystic results unless we carefully cast that to int16_t.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
The ADC in the STM32F0 is different than the LPC, with a range of
0-4095 instead of 0-32767.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Re-label everything to have the correct names. This doesn't actually
change the code at all, so the eeprom and telemetry is all compatible.
Matching changes on the host side will be required to actually process
the data correctly, of course.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|/ |
|
| |
|
|
|
|
|
|
| |
Instead of having to add it to each product using this variable.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This allows other systems to see what baud rate the host has requested.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
TeleGPS v2 uses the STMF0 processor instead of the LPC11, which means
the ADC range is different. As the raw ADC value was getting sent to
represent battery voltage in the config packet, we need to scale that
for the different processor. This patch allows that to happen.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Blinks an LED briefly once every three seconds when GPS is locked.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Defines the functions in this file.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
MicroPeak v2 uses this rate.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Allow use of regular serial API for sending data.
Allow application to specify different storage size.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
These were getting accidentally used by ao_pad.c
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Keeping the scanout running reasonably means keeping interrupt latency
constant, and that requires leaving the CPU running. Don't wait for
interrupts when the system is running in this mode.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Allow the ground software to know which TeleMini version is in use,
even though they are very similar with only ADC values differing.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
In case they don't have both a red and green LED.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
With these two changes, the readline function can be used by other
code.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Gcc 5.4.1 tracks alignment of data through assignments, so that a
uint32_t pointer which comes from byte-aligned uint8_t data:
extern uint8_t foo[];
uint32_t *q = (void *) foo;
Fetches and stores through this pointer are done bytewise. This is
slow (meh), but if q references a device register, things to bad very
quickly.
This patch works around this bug in the compiler by adding
__attribute__((aligned(4))) tags to some variables, or changing them
from uint8_t to uint32_t. Places doing this will now be caught as I've
added -Wcast-align to the compiler flags. That required adding (void
*) casts, after the relevant code was checked to make sure the
compiler could tell that the addresses were aligned.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
A couple of fixups for ao_flight_test to dump pyro info only when
running in debug mode, and to change the aprs testing
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
If the log is full at startup, we want to transmit flight 0 to let the
ground station know. However, we don't want to switch to flight 0 in
flight, so save the initial telemetry flight number (0 or the real
flight number) at startup and use that throughout the flight.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
This exposes the cc1200 radio test function so we can load special
test firmware in telemini to do the radio cal as it has no USB to
perform that interactively.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When monitoring telemetry, the frame needs to be sent together on one
line, not split with the output of a command (like 'a') mixed in.
Use a mutex for products with monitoring to keep command output and
telemetry output each on separate lines.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This leaves the command line available for diagnostics when debugging.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Add the timeout value and task id
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
ao_delay() is implemented on top of ao_sleep_for, and ao_sleep_for
uses the timeout value of 0 to indicate an infinite timeout. Calls to
ao_delay for 0 ticks would unintentionally hit this case and end up
waiting forever.x
Signed-off-by: Keith Packard <keithp@keithp.com>
|