summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* altos: Actually store current MPU9250 data in data ringKeith Packard2017-12-11
| | | | | | | The ring is updated when the ADC finishes; all of the other sensor data needs to be copied in at that point. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove more software for hardware prototypesKeith Packard2017-12-11
| | | | | | These never saw the light of day. Signed-off-by: Keith Packard <keithp@keithp.com>
* take telescience out of the routine buildsBdale Garbee2017-12-11
|
* altos/drivers: Hook up mag sensor for MPU9250Keith Packard2017-12-11
| | | | | | | Set mag sensor to provide data at 100Hz. Set i2c master to pull mag data at sample rate (200Hz). Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Allow ao_scheme_read_eval_print to be restartedKeith Packard2017-12-11
| | | | | | Reset exceptions at the top so that we can call it more than once. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow building with newlib + avr stdio on ARMKeith Packard2017-12-11
| | | | | | | Redefines some stdio bits so that we can build with either pdclib or newlib + avr stdio. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add scheme for stm discovery board demoKeith Packard2017-12-11
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lambdakey-v1.0: Switch to newlib, get things compiling againKeith Packard2017-12-11
| | | | | | | scheme is now way too large to fit on this device; some subsetting is clearly indicated. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Add Makefile for scheme test appKeith Packard2017-12-11
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Make test scheme app heap maximum sizeKeith Packard2017-12-11
| | | | | | It's only 32kB. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Make eqv? work for numbers and stringsKeith Packard2017-12-11
| | | | | | | Large numbers, floats and strings need a value check, not just a comparison between ao_polys Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Stash cons across value allocation in compareKeith Packard2017-12-11
| | | | | | | Large ints, strings and floats can cause allocation, requiring that the 'cons' pointer be stashed and retrieved in case it moved. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: add list-copyKeith Packard2017-12-11
| | | | | | A lot easier as a built-in; the obvious scheme version is recursive. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Use 64-bit ints to track memory allocation statsKeith Packard2017-12-11
| | | | | | | These are only collected for debug purposes, but can get quite large if the interpreter runs for a while. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Add a bunch of string and vector builtinsKeith Packard2017-12-11
| | | | | | Just make the language closer to r7rs Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Avoid crashing with non-list in lengthKeith Packard2017-12-10
| | | | | | | Use ao_scheme_cons_cdr to fetch the next list element as that returns NULL for non-cons elements. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Add vectorsKeith Packard2017-12-10
| | | | | | Constant time and smaller can be a feature. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Fix name of constant scheme fileKeith Packard2017-12-10
| | | | | | .lisp -> .scheme Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Let readline know if there's a list in progressKeith Packard2017-12-09
| | | | | | | This lets the interactive prompt change based on what state the lexer is in Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/drivers: Start adding defines to get mag data out of MPU9250Keith Packard2017-12-05
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/cortexelf-v1: Adapt to lisp->scheme name changeKeith Packard2017-12-05
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/scheme: Add explicit dependency on ao_scheme_builtin.h for ↵Keith Packard2017-12-05
| | | | | | | | | ao_scheme_make_const This ensures that a parallel build will wait for ao_scheme_builtin.h to be complete before attempting to compile ao_scheme_make_const Signed-off-by: Keith Packard <keithp@keithp.com>
* 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: Switch to scheme formal syntax for varargsKeith Packard2017-12-03
| | | | | | | | | | Scheme uses bare symbols to indicate a varargs parameter; any bare (i.e., not wrapped in a cons cell) parameter will get the 'rest' of the parameter list. This works for lambdas, nlambdas and macros. As a result, the 'lexpr' form has been removed as it is equivalent to a lambda with a varargs formal. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Fix stash usage across frame allocationKeith Packard2017-12-03
| | | | | | | Must un-stash before allocation failure check. Use frame_stash instead of poly_stash for frames. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Check only cdr base type when moving cons cellsKeith Packard2017-12-03
| | | | | | | | The cdr may have moved, so we can't look at the target object type. Fortunately, the base type encoded in the reference itself is sufficient to check for a non-cons cdr. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Split out read debug, add memory validationKeith Packard2017-12-03
| | | | | | | | Split read debug into a separate #define to reduce debug noise Add some memory validation -- validate stash API, and validate cons_free calls. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: use strtof instead of atofKeith Packard2017-12-02
| | | | | | atof returns double, strtof returns float. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Convert more builtin lisp code to scheme formatKeith Packard2017-12-02
| | | | | | Use defines where possible, use (define (name args ...)) form for lambdas Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Overflow int computations to floatKeith Packard2017-12-02
| | | | | | When an int computation overflows, switch to float. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Build TeleMega v3.0 by defaultKeith Packard2017-12-02
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add TeleMega v3.0Keith Packard2017-12-02
| | | | | | Adds files to build telemega v3.0 flash loader and firmware Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/kernel: MPU9250 supportKeith Packard2017-12-02
| | | | | | | Use MPU9250 for accel, gyro and mag data in logging, telemetry and flight status computations. 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/lisp: Split out frame vals from frame structKeith Packard2017-12-01
| | | | | | | This lets the frame be resized without moving the base structure. The plan is to allow all frames to be resized, not just the global frame. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Make let distinct from let*Keith Packard2017-12-01
| | | | | | | | 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>
* altos/lisp: return from unmatched cond is #f, not nilKeith Packard2017-12-01
| | | | | | | 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>
* altos/lisp: Fix pairp builtinKeith Packard2017-12-01
| | | | | | Pairs are non-nil cons values; add an explicit check for nil here Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Add quasiquoteKeith Packard2017-12-01
| | | | | | | This adds read support for quasiquote syntax, and then adds a quasiquote implementation in lisp Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Rename progn to beginKeith Packard2017-11-25
| | | | | | Match scheme name. 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: Add floatsKeith 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/lisp: Add 'big' ints -- 24 bits wideKeith Packard2017-11-18
| | | | | | | 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>
* altos/cortexelf-v1: Make lisp compile againKeith Packard2017-11-17
| | | | 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/lisp: Finish first pass through r7rsKeith Packard2017-11-17
| | | | | | | | | | * 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>
* altos/lisp: Add applyKeith Packard2017-11-17
| | | | | | And all of the library routines that use it, map, string-map and friends. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/lisp: Character consts. String and assoc builtins.Keith Packard2017-11-17
| | | | | | Also add back escaped characters in strings. Signed-off-by: Keith Packard <keithp@keithp.com>