summaryrefslogtreecommitdiff
path: root/src/kernel/ao_pyro.c
Commit message (Collapse)AuthorAge
* altos: Stop storing pyro fired status in config blockKeith Packard2017-10-08
| | | | | | | | | | | 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>
* altos: Allow pyro config name to end with newline, not just space/tabKeith Packard2017-10-02
| | | | | | | | 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>
* altos: Fix debug printf in ao_pyro for state >=Keith Packard2017-09-12
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/arm: Align data so that gcc 5.4 doesn't do byte-accesses. Add -Wcast-alignKeith Packard2016-12-17
| | | | | | | | | | | | | | | | | | | | | | 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>
* altos/test: Fix testsKeith Packard2016-10-30
| | | | | | | 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>
* Switch from GPLv2 to GPLv2+Keith Packard2016-07-12
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Replace ao_alarm/ao_clear_alarm with ao_sleep_forKeith Packard2015-02-13
| | | | | | | | | | | | | | | | Having arbitrary alarms firing in the middle of complicated device logic makes no sense at all. Therefore only correct use of ao_alarm and ao_clear_alarm was around a specific ao_sleep call, with correct recovery in case the alarm fires. This patch replaces all uses of ao_alarm/ao_sleep/ao_clear_alarm with ao_sleep_for, a new function which takes the alarm timeout directly. A few cases which weren't simply calling ao_sleep have been reworked to pass the timeout value down to the place where sleep *is* being called, and having that code deal with the return correctly. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow negative values for pyro configuration dataKeith Packard2014-09-03
| | | | | | | All of the integer pyro configuration parameters may be negative, so parse that correctly. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make sure pyro remains valid during delayKeith Packard2014-08-29
| | | | | | | Keep checking pyro status while waiting for delay to expire to make sure nothing changes. Disable pyro channel if something does. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add optional debugging to print out pyro firing statusKeith Packard2014-06-24
| | | | | | | This dumps pyro check failures for ao_flight_test so you can see why pyro charges aren't firing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make extra pyro channel firing time configurableKeith Packard2014-06-10
| | | | | | | This adds a 'I' parameter to set the extra pyro channel firing time (in ticks). This has no effect on the main/drogue channels. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fetch/store only 8 bits for pyro state valuesKeith Packard2014-06-02
| | | | | | | These fields are uint8_t, not int16_t. Fetching and storing 16 bits is a bad idea. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Maximum pyro configuration parameter has 4 bytes in the nameKeith Packard2014-06-02
| | | | | | | | "f>=" needs four bytes, not just three to store the whole string. If we only store three, then we never manage to compare correctly as the null terminating byte is missing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Rename 'core' to 'kernel'Keith Packard2014-04-05
core remains a bad name to use -- dirvish skips files (and directories, it seems) with that name. Signed-off-by: Keith Packard <keithp@keithp.com>