summaryrefslogtreecommitdiff
path: root/src/test
Commit message (Collapse)AuthorAge
* altos/scheme: Move scheme test program to scheme sub-directoryKeith Packard2017-12-05
| | | | | | Keeps it away from the usual test setup Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Rename to 'scheme', clean up buildKeith Packard2017-12-05
| | | | | | | | | Constant block is now built in a subdir to avoid messing up source directory. Renamed to ao_scheme to reflect language target. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: split set/def. Add def support to lambdasKeith Packard2017-12-01
| | | | | | | | In scheme, set can only re-define existing variables while def cannot redefine existing variables in lambda context. Def within lambda creates a new variable at the nearest enclosing scope. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Update to build altos lisp test appKeith Packard2017-11-19
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Fix some scheme compat issuesKeith Packard2017-11-18
| | | | | | | | | | 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>
* altos/test: Add jiffy funcs to lisp testKeith Packard2017-11-17
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: More lisp test Makefile fixesKeith Packard2017-11-16
| | | | | | Depend on ao_lisp_const.h Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Get lisp test building using Makefile-incKeith Packard2017-11-16
| | | | | | Instead of re-defining all of the lisp sources and headers Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Adapt flight test to int16_t flight number typeKeith Packard2017-11-11
| | | | | | | Flight numbers are now limited to 32767 to allow for negative values for corrupted slots. Signed-off-by: Keith Packard <keithp@keithp.com>
* test/ao_flight_test: Show recorded pyro firingKeith Packard2017-09-18
| | | | | | Can compare with computed values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Handle new eeprom file format. Give up on telem files.Keith Packard2017-09-12
| | | | | | | Parse eeprom config using libjson-c, then read the hex values into a giant blob. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Fake baro data for flight 12 serial 2093Keith Packard2017-08-27
| | | | | | | | 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>
* altos/test: Integrate raw accel to provide speed for comparisonKeith Packard2017-08-27
| | | | | | | | 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>
* altos/test: telemetrum baro data is inverted before being written to eepromKeith Packard2017-08-27
| | | | | | No need for the test code to invert it during replay Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Fix AES key format in test codeKeith Packard2017-07-23
| | | | | | Use temp variable instead of stepping on the AES name. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Fix printf format for int64 arithmetic testKeith Packard2017-07-23
| | | | | | Use 'long long' and %lld for 64-bit values when printing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Add EasyMini test modeKeith Packard2017-07-21
| | | | | | Use baro-only mode, parse easymini logs. Signed-off-by: Keith Packard <keithp@keithp.com>
* Ignore ao_lisp_testKeith Packard2017-04-24
|
* altos/lisp: Clean up hanoi.lisp demo a bitKeith Packard2017-02-20
| | | | | | No serious changes. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Include memory stats for test programKeith Packard2017-02-20
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Build new ao_lisp_stack.c into test and lambdakeyKeith Packard2017-02-20
| | | | | | Helpful to include the new source file. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Take advantage of implicit progns in hanoi demoKeith Packard2017-02-20
| | | | | | | Remove extra progn wrappers now that cond, lambda and while all support implicit ones. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Clean up hanoi.lisp comments.Keith Packard2017-02-20
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Eliminate compiler warning about array bounds at -O3Keith Packard2017-02-20
| | | | | | | | | Using ao_lisp_pool - 4 caused the compiler to whinge about computing an address outside the bounds of the array. Sigh. Restructure the code to do the adjustment-by-4 in the integer computations instead of the pointer ones. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Disable position independent executablesKeith Packard2017-02-20
| | | | This makes debugging programs so much harder
* altos/lisp: Optimize chunk searching in collectKeith Packard2017-02-20
| | | | | | | Note range of existing chunks to exclude objects outside. Only look at chunks which have been set to reduce loop cost. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add incremental collectionKeith Packard2017-02-20
| | | | | | | | | | | | Realizing that long-lived objects will eventually float to the bottom of the heap, I added a simple hack to the collector that 'remembers' the top of the heap the last time a full collect was run and then runs incremental collects looking to shift only objects above that boundary. That doesn't perfectly capture the bounds of transient objects, but does manage to reduce the amount of time spent not moving persistent objects each time through the collector. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Make hanoi example output a bit prettierKeith Packard2017-02-20
| | | | | | Make the towers symmetrical instead of lopsided. Much nicer looking. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: remove nth from hanoi.lispKeith Packard2017-02-20
| | | | | | It's now in ROM. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: remove duplicate 'length' lambda from hanoi exampleKeith Packard2017-02-20
| | | | | | This function is now a builtin. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add license to hanoi demoKeith Packard2017-02-20
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Improve hanoi demoKeith Packard2017-02-20
| | | | | | | Repaint in place, without first clearing. This makes the updates a lot clealyer looking. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Show number of collect calls in ao_lisp_testKeith Packard2017-02-20
| | | | | | This helps tune the allocator Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Append a CRC to the saved image to validate on restoreKeith Packard2017-02-20
| | | | | | | The CRC is actually of the ROM bits, so we can tell if the restored image relates to the currently running code. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add save/restore to ao_lisp_testKeith Packard2017-02-20
| | | | | | Allow testing of the save/restore code under Linux. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Share mark function for mark and moveKeith Packard2017-02-20
| | | | | | | These two operations both wanted to walk the referenced objects; sharing is caring. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: add length, pack, unpack and flushKeith Packard2017-02-20
| | | | | | lots more builtins Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add towers of hanoi exampleKeith Packard2017-02-20
| | | | | | Uses vt100 escape sequences to animate the display even. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Improve lisp test program UIKeith Packard2017-02-20
| | | | | | | Add a prompt for stdin, read from other files on command line before stdin. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Clean up OS integration bits, add defunKeith Packard2017-02-20
| | | | | | | Provide an abstraction for the OS interface so that it can build more cleanly on Linux and AltOS. Add defun macro. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: working on lexical scopingKeith Packard2017-02-20
| | | | | | Not working yet Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add lambda support to lispKeith Packard2017-02-20
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Separate out values from atomsKeith Packard2017-02-20
| | | | | | | | | | | This enables changing values of atoms declared as constants, should enable lets, and with some work, even lexical scoping. this required changing the constant computation to run ao_lisp_collect() before dumping the block of constant data, and that uncovered some minor memory manager bugs. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Change lisp objects to use ao_poly everywhere. Add constKeith Packard2017-02-20
| | | | | | | | | | | This makes all lisp objects use 16-bit ints for references so we can hold more stuff in small amounts of memory. Also adds a separate constant pool of lisp objects for builtins, initial atoms and constant lisp code. Now builds (and runs!) on the nucleo-32 boards. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add lisp readerKeith Packard2017-02-20
|
* Add first lisp bitsKeith Packard2017-02-20
| | | | 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: Add easy mini plotting helper in test codeKeith Packard2016-04-13
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Support old telemega eeprom file formats in ao_flight_testKeith Packard2015-03-10
| | | | | | | | The old eeprom format used different stoarge for the accel calibration data, which doesn't matter to this code, but the change in the format value does. Signed-off-by: Keith Packard <keithp@keithp.com>