| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
| |
let is supposed to define the values all at once, evaluating the
initializers in the enclosing context. let* defines the new names and
then initializes them one at a time.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Fix the return value when we fall off the end of a cond expression to
be #f
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Pairs are non-nil cons values; add an explicit check for nil here
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This adds read support for quasiquote syntax, and then adds a
quasiquote implementation in lisp
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Match scheme name.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
flush -> flush-output
nth -> list-ref (oh, and add list-tail)
add let* (same as let for now)
write control chars in octal
make hanoi example work
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
With the default ints being only 14 bits, having a larger type with
more precision seems useful. This is not exposed to the application.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
* print -> write, patom -> display
* Add read-char, write-char
* Add exit, current-jiffy, current-second, jiffies-per-second
* Add for-each and string-for-each
* Avoid duplicate builtins with different atoms
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
And all of the library routines that use it, map, string-map and friends.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Also add back escaped characters in strings.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Depend on ao_lisp_const.h
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
* Arithmetic functions and tests
* append, reverse and list-tail
* set-car! and set-cdr!
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Instead of re-defining all of the lisp sources and headers
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
Add 'if'.
setq -> set!, but doesn't define new variables
def -> define
Add pair? and list?
Add eq? and eqv? as aliases for =
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Cond and while compare against #f, just like scheme says to.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
The cdr of a cons can be any value; add support for lexing and
printing them.
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>
|
|
|
|
|
|
|
| |
Flight numbers are now limited to 32767 to allow for negative values
for corrupted slots.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This is clearer than using '0'.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This is almost an exact copy of the MPU6000 driver, just a few minor
register changes.
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>
|
|
|
|
|
|
|
| |
Disable radios when plugged in to USB to save power and avoid being
noisy.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Can compare with computed values.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|/ |
|
| |
|
|
|
|
|
|
|
| |
Parse eeprom config using libjson-c, then read the hex values into a
giant blob.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
The ADC data takes a while to start working after power on; wait for
the range of input values to look reasonable before using the data.
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>
|
|
|
|
|
|
|
|
| |
This flight had a baro spike due to an accidental drogue charge firing
but is otherwise quite useful when testing for various mach delay
effects, so fake out the data during that spike.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
This can provide a useful visualization of the 'true' vs 'kalman'
speed value, as the kalman is necessarily delayed due to the model
assuming constant acceleration.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
No need for the test code to invert it during replay
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>
|
|\ |
|