summaryrefslogtreecommitdiff
path: root/src/core
Commit message (Collapse)AuthorAge
* Merge branch 'master' into hacking-cc1120aprsKeith Packard2012-12-16
|\
| * Merge branch 'micropeak-1.1'Keith Packard2012-12-09
| |\
| | * altos: Make sure pa to altitude conversion is done with 32 bitsKeith Packard2012-12-09
| | | | | | | | | | | | | | | | | | | | | We need 32 bits to hold intermediate values, even if the final altitude is reported in only 16 bits. Signed-off-by: Keith Packard <keithp@keithp.com>
* | | altos: Make APRS interval configurableKeith Packard2012-12-07
| | | | | | | | | | | | | | | | | | | | | This provides a separate configuration value for APRS, allowing the interval between APRS reports to vary. Signed-off-by: Keith Packard <keithp@keithp.com>
* | | Merge branch 'master' into aprsKeith Packard2012-12-07
|\| |
| * | altos: fix functions calling pollchar to use 'int' to hold the valueKeith Packard2012-12-07
| | | | | | | | | | | | | | | | | | | | | | | | AO_READ_AGAIN doesn't fit in a char anymore now that stdio is 8-bit clean, everyone using pollchar must use an 'int' variable to capture the whole value from pollchar. Signed-off-by: Keith Packard <keithp@keithp.com>
| * | altos: Change 'flight-number' to 'current-flight'Keith Packard2012-12-06
| | | | | | | | | | | | | | | | | | Avoids ambiguity with stored flight info, which starts lines with 'flight'. Signed-off-by: Keith Packard <keithp@keithp.com>
| * | altos: Shrink 'ao_version' by calling printf fewer timesKeith Packard2012-12-06
| | | | | | | | | | | | | | | | | | | | | Each printf call costs quite a bit of code space on the cc1111, so instead of making multiple short calls, make one longer one. Signed-off-by: Keith Packard <keithp@keithp.com>
* | | altos: Send APRS packets even during ascentKeith Packard2012-12-06
| | | | | | | | | | | | | | | | | | If you're using APRS, presumably you want to watch the rocket going up too. Signed-off-by: Keith Packard <keithp@keithp.com>
* | | altos: Allow telemetry, rdf and APRS to be individually controlledKeith Packard2012-12-06
| | | | | | | | | | | | | | | | | | | | | But, only when APRS is available so that TeleMetrum and TeleMini don't change behaviour Signed-off-by: Keith Packard <keithp@keithp.com>
* | | altos: Hook up APRS to telemetry loopKeith Packard2012-12-06
| | | | | | | | | | | | | | | | | | Send APRS packet once every 2 seconds Signed-off-by: Keith Packard <keithp@keithp.com>
* | | altos: Hook APRS up to the radioKeith Packard2012-12-06
|/ / | | | | | | | | | | | | This adds an arbitrary-length packet writing function to the radio code. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Add ao_task_minimize_latency to reduce IRQ delaysKeith Packard2012-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When set, this causes the task switching code to avoid blocking IRQs while looking for an idle task as that can increase IRQ latencies enough to drop characters at 115200 baud on the cc1111. Note that this *also* eliminates the ability to use low power modes as we cannot know at any point whether some interrupt has come along and woken a task. Has no effect when using task queues as those require IRQs to be blocked while looking at the queue. Shouldn't be a problem there though as the check for no running tasks is very cheap. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Use ao_xmemcpy in ao_log_telem.cKeith Packard2012-11-30
| | | | | | | | | | | | This eliminates the libc generic version in TeleTerra Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Make stdio 8-bit clean by making pollchar return intKeith Packard2012-11-30
| | | | | | | | | | | | | | | | | | | | We were stealing one value (0xff) in the return value from pollchar to indicate 'not ready yet'. Instead of doing that, use the integer value -1 and have pollchar return an int instead of a char. That necessitated cleaning a few other bits to make sure that 0xff wouldn't get promoted to -1 on accident. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Share getnibble functionKeith Packard2012-11-30
|/ | | | | | | Two implementations of the same function, one in cc1111/ao_dbg.c and the other in core/ao_send_packet.c. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make Tm recovery mode set RF cal and callsign tooKeith Packard2012-11-18
| | | | | | | This lets us connect to Tm even if someone messes up the RF calibration or callsign info Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove legacy telemetry from ao_monitor when not neededKeith Packard2012-11-01
| | | | | | | For products not supporting LEGACY_MONITOR, remove the (undefined) structs from the ao_monitor union. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove 'volatile' from ao_rssi.c globalsKeith Packard2012-11-01
| | | | | | No need for this, the variables aren't changed at interrupt time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Provide ao_task_alarm_tick to reduce per-tick costKeith Packard2012-10-26
| | | | | | | Cache the next wakeup time and check that before jumping to the task code. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Leave interrupts disabled while checking for task to runKeith Packard2012-10-26
| | | | | | | Otherwise, we run the risk of an interrupt waking a task after we've decided to idle the CPU. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Wrap ao_container_of value in parensKeith Packard2012-10-25
| | | | | | | Keeps the cast from being separated from the value when used in expressions. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Switch drivers to ao_arch_block/release_interruptsKeith Packard2012-10-25
| | | | | | Stop using cli/sei, which are avr-specific Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add task queues.Keith Packard2012-10-25
| | | | | | | | | This replaces the array-based scheduler with a queue-based one instead. It should have the same basic scheduling semantics, but it walks shorter lists for each operation, making it much more efficient when the system has a lot of tasks. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add stack-guard code. Uses STM MPU to trap stack overflow.Keith Packard2012-10-25
| | | | | | | | This marks the lowest portion of the stack as inaccessible to the CPU, causing the processor to fault when it reaches it. The fault then generates a panic message so that the user can know what happened. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Replace __critical usage with ao_arch_critical as neededKeith Packard2012-10-25
| | | | | | | | | | | | | sdcc offers __critical as a machine-independent way to block interrupts, but as gcc doesn't, we need to use a compiler-independent construct instead. ao_arch_critical has been around since the AVR port, but some old __critical usages remained. This fixes a bunch of random hangs when communicating with MM over USB or the radio as the various stdio loops were running without interrupts blocked between the test and the sleep. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: profiling on STM32LKeith Packard2012-10-25
| | | | | | Add sample-based profiling, using a 1kHz timer Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: When slave mode first starts, accept any packetKeith Packard2012-10-25
| | | | | | | | This eliminates the packet sequence matching for the first packet, allowing outstanding send data to arrive from the master instead of ignoring packets with data until they match the seqno Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow pyro flight state config to be setKeith Packard2012-10-22
| | | | | | Without these lines, flight state compares can't be shown or set. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add state comparisons to pyro channel conditionsKeith Packard2012-10-22
| | | | | | | | Let pyro channels block waiting for flight state changes. This allows for pyro channels to be synchronized with the main iginiter channels. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Document mega log packet typesKeith Packard2012-10-21
| | | | | | | Just add comments to ao_log.h so it's easy to remember which labels go with each record. Signed-off-by: Keith Packard <keithp@keithp.com>
* Merge branch 'master' into mm-ms5611Keith Packard2012-10-18
|\ | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: When missing MMA655x, create fake Z accel valueKeith Packard2012-10-13
| | | | | | | | | | | | | | This avoids overwriting the MPU6000 y acceleration value so that other computations using that value can work unmodified. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: struct ao_log_mega doesn't have a ground temp valueKeith Packard2012-10-13
| | | | | | | | | | | | | | There's no averaged ground temperature recorded in the flight system to save there, so just remove the field Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Document a few member offsets in struct ao_log_recordKeith Packard2012-10-13
| | | | | | | | | | | | Incomplete, but useful even so Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Allow products to define which LED to panic withKeith Packard2012-10-12
| | | | | | | | | | | | Continue to use AO_LED_RED by default. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Include struct ao_data declaration only when usedKeith Packard2012-10-12
| | | | | | | | | | | | Leave it out for products that don't have a ring of sensor data Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Clean up types in Pa conversion testing code. Only test to 40kmKeith Packard2012-10-12
| | | | | | | | | | | | | | | | A couple of missing 'int' declarations. Only test to 40km as above that there aren't enough data points to do anything reasonable Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Elide ao_altitude_to_pa in flight firmwareKeith Packard2012-10-12
| | | | | | | | | | | | | | Only the conversion testing code needs to get back from altitude to pressure, so don't include that code in other environments. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Parameterize altitude table access and initializationKeith Packard2012-10-12
| | | | | | | | | | | | | | | | | | | | This allows projects to store the altitude data in different representations or with different access modes. By default, altitude data is stored in meters, but the initializers include decimeter values so those can be used instead if desired. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Use alt_t for all Pascal-based altitude dataKeith Packard2012-10-12
| | | | | | | | | | | | | | This allows alt_t to be overridden for systems using the MS5607/MS5611 sensors Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Allow for other mutex implementationsKeith Packard2012-10-12
| | | | | | | | | | | | Allow projects to replace ao_mutex_get and ao_mutex_put with macros Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Allow projects to specify clock at other than 100HzKeith Packard2012-10-12
| | | | | | | | | | | | Leave the default at 100Hz, but allow it to be overridden Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Split task definitions out to ao_task.hKeith Packard2012-10-12
| | | | | | | | | | | | And only include them if using tasks Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos: Compute desired frequency when upgrading from pre-1.1Keith Packard2012-10-08
| | | | | | | | | | | | | | Instead of just smashing the frequency to 434.550, compute the frequency from the old radio channel value Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Go back to recording sensor data in globalsmm-ms5611Keith Packard2012-10-08
|/ | | | | | | | Instead of trying to get things into the ring from a variety of functions, go back to the simpler method of storing them in globals and having the ADC code just pluck out the most recent values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up flight data definitionsKeith Packard2012-09-09
| | | | | | | These just shuffle the various definitions of data macros around to make the include files more sensible looking. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: include ao_arch_funcs.h at the very end of ao.hKeith Packard2012-09-09
| | | | | | Move it below the definition of the ms5607 init function Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow products without MS5607Keith Packard2012-09-09
| | | | | | | The define for a missing MS5607 was wrong, so anything using the fancy multi-sensor data code would break without an MS5607 in place. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add custom panic noise for self-test failuresKeith Packard2012-08-31
| | | | | | Make it easier to tell which component is failing self test Signed-off-by: Keith Packard <keithp@keithp.com>