summaryrefslogtreecommitdiff
path: root/src/core
Commit message (Collapse)AuthorAge
* altos: Allow megametrum to be built without using the mag sensorKeith Packard2012-06-27
| | | | | | | I'm having trouble getting it working reliably, so we'll like disable it for now. This patch makes that possible. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Unroll viterbi state loop for >30% performance boostKeith Packard2012-06-27
| | | | | | 9.3ms vs 14.7ms, a clear win. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up radio CRC handlingKeith Packard2012-06-27
| | | | | | | Make the FEC code just set the CRC_OK bit like the cc1111 radio does; eliminates a bunch of weird conventions across the FEC API. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't try to grab radio while firing MM ignitersKeith Packard2012-06-27
| | | | | | | If you're in idle mode, you stop forever as the packet mode receiver will own the radio mutex forever. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: ao_ignite.c is no longer cc1111 specificKeith Packard2012-06-26
| | | | | | Move it to core Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add debugging code to check for stack overflowKeith Packard2012-06-26
| | | | | | | | Stack overflow often happens from interrupt handlers sitting on top of a task stack. Check for this during ao_wakeup as that is often called during interrupt processing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make gcc happy with ao_telemetry_set_intervalKeith Packard2012-06-26
| | | | | | Using unsigned locals made GCC sad as it was compared with a signed value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Turn radio-related bits of ao_flight_mm.cKeith Packard2012-06-26
| | | | | | Now that MM has full radio functionality, we can make it work right. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: custom hex printer for telemetry packetsKeith Packard2012-06-26
| | | | | | Using printf is way too slow with pdclib; just hand-write hex byte output. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Optimize FEC encode and decodeKeith Packard2012-06-26
| | | | | | | | | | | | | Integrate interleaving, CRC and padding within the decode/encode functions. Provide for ISR priorities so that the 1120 RX interrupt takes precedence over the other interrupts or we risk losing bits. Optimize the viterbi decoder a bit (goes from 10ms per packet to 7ms per packet). Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add GPS logging code for MegaMetrumKeith Packard2012-06-26
| | | | | | | MM uses a different logging format with larger log blocks, so restructure the GPS logging code to fill them up Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make cc1111 radio control functions staticKeith Packard2012-06-26
| | | | | | No need to publish these; they're all private to cc1111 Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: rename ao_viterbi.c to ao_fec_rx.cKeith Packard2012-06-26
| | | | | | Keep it parallel with ao_fec_tx.c Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Incremental viterbi decodeKeith Packard2012-06-25
| | | | | | | | Decode radio input one interleave block at a time. This overlaps the decode computation with the packet reception, leading to lower latency in an attempt to keep up with the transmitter. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: decode cc1120 received packetsKeith Packard2012-06-25
| | | | | | Call the fec decode function, compute RSSI and check CRC Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Get cc1120 packet reception workingKeith Packard2012-06-25
| | | | | | Interrupt-per-bit, but it seems to work Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Forgot ao_telemetry.hKeith Packard2012-06-25
| | | | | | Not much builds without this... Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: improve FEC apis to reduce data copyingKeith Packard2012-06-23
| | | | | | | | | Integrate interleaving and whitening into encode and decode steps. Add CRC checking function for receive. Make ao_fec_test program round-trip the data and verify correctness. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: fix comment about decoding last byte of FEC dataKeith Packard2012-06-23
| | | | | | There aren't *any* forward bits to use when decoding the last byte. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: optimize Viterbi implementationKeith Packard2012-06-23
| | | | | | Minimize data usage, make data arrays static Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: incremental viterbi decodeKeith Packard2012-06-23
| | | | | | | Decode bits incrementally. Don't bother decoding the last byte; it's always a pad byte. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Start optimizing viterbi decoderKeith Packard2012-06-22
| | | | | | | | Only need two cost arrays (previous and next). Create constant full-width decoder table instead of expanding bits into bytes for each decode step. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add the simplest possible viterbi decoderKeith Packard2012-06-22
| | | | | | | I think I understand how it works now. It's not exactly speedy, and it uses a lot of memory. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Move FEC code to coreKeith Packard2012-06-21
| | | | | | It's not a driver as it's not specific to the 1120 chip Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add full MM telemetryKeith Packard2012-06-21
| | | | | | | | Create two new telemetry packets to hold all of the MM data. This patch also splits the telemetry structures out of ao.h Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make sure ao_storage_config is set before reading config blockKeith Packard2012-06-17
| | | | | | | | ao_storage_read does in fact call ao_storage_setup, but we need the value of ao_storage_config *before* calling ao_storage_read, so call ao_storage_setup first. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add telemetry to megametrumKeith Packard2012-06-17
| | | | | | Now that the radio works Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't lose IRQ disabled state in ao_sleepKeith Packard2012-06-17
| | | | | | | | | | | | Using ao_arch_critical around the wchan setting will force interrupts to be re-enabled before ao_yield records the state of that bit, potentially causing problems with functions not atomically testing and sleeping. Tasks that need to set wchan with interrupts disabled should have interrupts disabled when entering ao_sleep already. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: ao_storage_read already calls ao_storage_setupKeith Packard2012-06-17
| | | | | | No need to call twice. Signed-off-by: Keith Packard <keithp@keithp.com>
* Temporarily disable packet and telem on MMKeith Packard2012-06-15
| | | | | | While work on the radio code progresses Signed-off-by: Keith Packard <keithp@keithp.com>
* Allow product to override maximum number of command lists (NUM_CMDS)Keith Packard2012-06-15
| | | | | | Just in case some product wants to save memory, or have more. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: typo in ao_monitor prevented ground station from including codeKeith Packard2012-06-04
| | | | | | | This created ground station software that couldn't actually receive and report telemetry packets. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make 'v' command dump pressure sensor ROM valuesKeith Packard2012-06-04
| | | | | | Avoids needing a new command Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: fix test builds of non-accel flight codeKeith Packard2012-06-04
| | | | | | | Remove references to accel variables when building baro-only flight test code. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Legacy telemetry needs original ADC recordKeith Packard2012-06-04
| | | | | | | | The legacy telemetry packets included the raw ADC structure directly, so make sure that doesn't change further, allowing teledongle firmware to remain compatible with old TM firmware. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Intgrate hmc5883 sensor into adc ringKeith Packard2012-06-02
| | | | | | | Creates a task to poll the mag sensor and place the data into the sensor data ring. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Enable some debugging during flight mode on MMKeith Packard2012-06-02
| | | | | | | | Until we've got the radio working, there's no way to see inside the MM state without using USB. Add a diagnostic command to dump out the internal flight state variables. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add support for MegaAccel daughter card.Keith Packard2012-06-01
| | | | | | | | | Switches all acceleration computation to using the MegaAccel accelerometer to ensure support for high-g flights. MPU6000 values continue to be logged as normal Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: add high-z accel and mag sensor to megametrum loggingKeith Packard2012-06-01
| | | | | | These nicely fill the 32-byte sensor log record Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Mark full and mega logging correctly in 'v' commandKeith Packard2012-06-01
| | | | | | Make sure megametrum reports 'log format 5'. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove debug printf from accel auto-calKeith Packard2012-05-28
| | | | | | Otherwise, this goes way too slow Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Shrink telemetry generation codeKeith Packard2012-05-28
| | | | | | otherwise TM doesn't build anymore Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make telescience-v0.1 build with new ao_data structKeith Packard2012-05-27
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make telenano build with new ao_data structureKeith Packard2012-05-27
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make telemini-v1.0 compile with new ao_data structureKeith Packard2012-05-27
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make telemetrum-v1.0 build with new ao_data structureKeith Packard2012-05-27
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make telemetrum-v1.1 compile with new ao_data structureKeith Packard2012-05-27
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Split out mm-specific versions of sampling codeKeith Packard2012-05-27
| | | | | | Avoid breaking telemetrum (too much) by splitting this stuff apart. Signed-off-by: Keith Packard <keithp@keithp.com>
* Get megametrum ready to at least log flight dataKeith Packard2012-05-25
| | | | | | Doesn't track flight state changes correctly. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Finish ms5607 supportKeith Packard2012-05-18
| | | | | | | | | | This has the MS5607 polling once each tick for pressure and temperature and then saving that in a global variable. The command UI provides for dumping the prom data so that an eeprom file can have raw sensor data along with the conversion factors necessary to compute useful values. Signed-off-by: Keith Packard <keithp@keithp.com>