summaryrefslogtreecommitdiff
path: root/src/kernel/ao_telemetry.c
Commit message (Collapse)AuthorAge
* altos: HMC5883 output order is X Z YKeith Packard2017-06-11
| | | | | | | | | | Re-label everything to have the correct names. This doesn't actually change the code at all, so the eeprom and telemetry is all compatible. Matching changes on the host side will be required to actually process the data correctly, of course. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/kernel: Allow TeleGPS v2 to scale battery in telemKeith Packard2017-04-30
| | | | | | | | | TeleGPS v2 uses the STMF0 processor instead of the LPC11, which means the ADC range is different. As the raw ADC value was getting sent to represent battery voltage in the config packet, we need to scale that for the different processor. This patch allows that to happen. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Split out TeleMini v3 log/telem labelingKeith Packard2017-02-20
| | | | | | | Allow the ground software to know which TeleMini version is in use, even though they are very similar with only ADC values differing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't switch to flight 0 when log fills in flightKeith Packard2016-07-27
| | | | | | | | | If the log is full at startup, we want to transmit flight 0 to let the ground station know. However, we don't want to switch to flight 0 in flight, so save the initial telemetry flight number (0 or the real flight number) at startup and use that throughout the flight. 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: Insert inter telemetry-packet delayKeith Packard2016-01-10
| | | | | | The receivers take some time to reset the radio between packets, so make sure we don't send back-to-back telemetry too quickly by delaying after sending each telemetry packet.
* altos: Replace ao_alarm/ao_clear_alarm with ao_sleep_forKeith Packard2015-02-13
| | | | | | | | | | | | | | | | Having arbitrary alarms firing in the middle of complicated device logic makes no sense at all. Therefore only correct use of ao_alarm and ao_clear_alarm was around a specific ao_sleep call, with correct recovery in case the alarm fires. This patch replaces all uses of ao_alarm/ao_sleep/ao_clear_alarm with ao_sleep_for, a new function which takes the alarm timeout directly. A few cases which weren't simply calling ao_sleep have been reworked to pass the timeout value down to the place where sleep *is* being called, and having that code deal with the return correctly. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow TeleMega to be built without MPU6000Keith Packard2014-11-16
| | | | | | | Robert Braibish's board has a dead MPU6000; this fix lets the TeleMega firmware build without that driver so the rest of the board could be verified. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix up telemetry delay computationsKeith Packard2014-10-25
| | | | | | | | | | | | | | | | With RDF, APRS and telemetry all being sent at varying rates, computing when to send the next radio data is not as simple as sending telemetry and then figuring out whether to send RDF and/or APRS. Fix this by computing times for the next telemetry/rdf/aprs packet, and only sending each when that time has passed. Compute the delay until the next radio activity as the minimum time to any transmission. This also adds code to the config bits to reset the radio times whenever something changes that might affect which radio data to send next. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove old AO_SEND_ALL_BARO bitsKeith Packard2014-10-25
| | | | | | | This was used for testing the original TeleMini which couldn't log data at full speed. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix ability to disable telemetry by setting interval to 0Keith Packard2014-09-11
| | | | | | | | | For non-zero telemetry intervals, the radio code limits the value based on the data rate. However, a zero interval means that telemetry should be entirely disabled, so that value should be left alone when checking. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Extend GPS altitudes to at least 24 bits everywhereKeith Packard2014-07-10
| | | | | | | | Telemetry gets a special 'mode' flag indicating that 24-bit data is present; log files get new data and log readers are expected to detect that via the firmware version number. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telemini-v2.0: Add memory decorations to new telemetry variablesKeith Packard2014-07-09
| | | | | | This lets TeleMini-v2.0 compile. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Call ao_telemetry_reset_interval when telemetry rate changesKeith Packard2014-07-05
| | | | | | | This lets the radio code adjust the telemetry packet sending pattern when the data rate changes. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Reduce configuration data telemetry to once per 5 secondsKeith Packard2014-07-05
| | | | | | | This data is constant, so we don't need to send it very often. Once every five seconds should be plenty. Signed-off-by: Keith Packard <keithp@keithp.com>
* Revert adding state to GPS location packetsKeith Packard2014-06-10
| | | | | | TeleGPS no longer has ao_flight_state Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Encode TeleGPS battery voltage in configuration packetKeith Packard2014-06-07
| | | | | | TeleGPS doesn't need apogee delay, so re-purpose it for the battery voltage Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use 0x80 to indicate valid state value in the GPS location packetKeith Packard2014-06-07
| | | | | | | And only set this for tracker products; other products place state in separate state packets Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Stick flight state in GPS location packetsKeith Packard2014-06-05
| | | | | | Useful for TeleGPS Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Rename 'core' to 'kernel'Keith Packard2014-04-05
core remains a bad name to use -- dirvish skips files (and directories, it seems) with that name. Signed-off-by: Keith Packard <keithp@keithp.com>