summaryrefslogtreecommitdiff
path: root/src/core
Commit message (Collapse)AuthorAge
...
* altos: Add logging and telem to telegpsKeith Packard2013-03-30
| | | | | | | | | | | | This turns on telemetry, APRS, RDF and data logging for telegps. Data is logged as soon as GPS has a date to create the right filename, using files of the form YYYYMMDD.LOG which just barely fits in a FAT filename. Telemetry/RDF/APRS are all separately controllable. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Get CC115L radio working.Keith Packard2013-03-29
| | | | | | | | | | | | | | | | This involved figuring out which GPIO signal would reliably indicate that the transmitter was finished; I ended up using the PA_PD bit for this. This also converts all of the radio users to the long packet support as the CC115L has only a 64-byte fifo, not large enough to hold either an RDF tone or a regular AltOS telemetry packet. This also renames the public API for sending APRS packets from ao_radio_send_lots to ao_radio_send_aprs, which is at least more accurate. The workings of that API haven't changed, just the name. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add temporary RF power settingsKeith Packard2013-03-29
| | | | | | | | | | These expose the raw cc115l and rfpa0133 register settings so that we can calibrate them against measured power outputs. I've tested them to verify that they change how much power the board consumes, so they're clearly doing something... Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add new panic flag for bufio misuseKeith Packard2013-03-27
| | | | | | Allow the bufio code to signal a fatal error if someone misuses the API Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix config to not abort radio recv when no recv is availableKeith Packard2013-03-26
| | | | | | | Use the new radio recv define to skip disabling the receiver when there isn't a receiver. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow radio recv and xmit to be separately configuredKeith Packard2013-03-26
| | | | | | | The CC115L is xmit only, so split out the functions and provide defines to check for xmit or recv separately as needed. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add RFPA0133 amplifier driverKeith Packard2013-03-26
| | | | | | No configuration of power level yet, just the bare driver. Signed-off-by: Keith Packard <keithp@keithp.com>
* Update avr ao_spi_slave code to match API changesKeith Packard2013-01-13
| | | | | | Made the interface use void * for pointers and uint16_t for lengths Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Actually record ground averages for 6dof sensorKeith Packard2012-12-18
| | | | | | | This gets the long-term averages for the 6dof sensors recorded into the first flight log record. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Average MPU6000 values on ground for later useKeith Packard2012-12-17
| | | | | | | Having long-term ground averages recorded to the eeprom file will make post-flight analysis of the data better. Signed-off-by: Keith Packard <keithp@keithp.com>
* Merge branch 'aprs' into 'master'Keith 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>