summaryrefslogtreecommitdiff
path: root/src/kernel
Commit message (Collapse)AuthorAge
...
* altos: Make ao_gps_print deal with telem containing 32-bit altitude valuesKeith Packard2014-07-13
| | | | | | | ao_gps_print is used with new telem packets from a few places; use AO_TELEMETRY_LOCATION_ALTITUDE when necessary. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Interrupt radio receive when changing data rateKeith Packard2014-07-13
| | | | | | | This aborts any pending radio receive when changing the data rate so that the radio can be reprogrammed to receive at the correct rate. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use 32-bits for flight state data (alt/speed/accel)Keith Packard2014-07-10
| | | | | | | Stores 32-bits for all of the flight parameters. Uses 64-bit intermediates for kalman computation. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Record pdop value in TeleMetrumV2 logKeith Packard2014-07-10
| | | | | | There's only one byte free, so we'll record the pdop value 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: Add smaller pa to altitude table for TeleMiniKeith Packard2014-07-09
| | | | | | | TeleMini doesn't have space for the larger table, and the smaller one isn't that much less accurate at lower altitudes. 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>
* Add support for the "kite" micropeak variantKeith Packard2014-07-06
| | | | | | | This uses a 100m 'launch detect' altitude and logs data every 19.2s instead of every .192s. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Rework packet receive for cc1120Keith Packard2014-07-05
| | | | | | | | | | Instead of blocking on PQT, just set up the receiver to start going and when the first bit interrupt comes in, grab the SPI bus if possible and configure it for reception. This improves sensitivity in the radio by a significant amount while making the code conceptually a bit nicer. 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: Add config support for 2400 and 9600 baud telemetry ratesKeith Packard2014-07-05
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add defines for 2400 and 9600 baud telemetry ratesKeith Packard2014-07-05
| | | | 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>
* altos: Use TeleMetrum v1.9 board for MegaDongle experimentsKeith Packard2014-07-05
| | | | | | | This configures the MegaDongle v0.1 directory to use the pin assignments in TeleMetrum v1.9 boards. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: ao_rssi subsystem needs to use AO_LED_TYPE instead of uint8_tKeith Packard2014-07-05
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add optional debugging to print out pyro firing statusKeith Packard2014-06-24
| | | | | | | This dumps pyro check failures for ao_flight_test so you can see why pyro charges aren't firing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make APRS SSID configurableKeith Packard2014-06-22
| | | | | | | This uses the low-digit from the serial number by default, but lets the user change it if desired. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telegps: Create new flight if current flight is erasedKeith Packard2014-06-12
| | | | | | | | | | | telegps is unique in that USB may be connected while a flight is active and sensible things should happen. If a flight is being recorded and gets erased, then a new flight should be started. This is done by hooking in the flight erase code and calling out to the tracker code to figure out whether to switch to a new flight or not. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Define ao_log_mutex in ao_log.c rather than every log productKeith Packard2014-06-12
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telegps: Keep ring of recent GPS positions to detect motion quicklyKeith Packard2014-06-12
| | | | | | | Instead of comparing only against the last logged value, keep a ring and start logging as soon as we move away from the furthest one in the ring. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Show current flight number for TeleGPSKeith Packard2014-06-12
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telegps: Don't log data when plugged in to USBKeith Packard2014-06-12
| | | | | | | We don't want to accidentally log stuff when you're just trying to charge the battery. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Simplify tracker logic, removing boost detectKeith Packard2014-06-10
| | | | | | | | | | This removes the ao_flight_state value from the tracker code and makes it simply log position information when the device has moved within the last 10 log intervals. This also changes the configuration parameters to define what 'motionless' means, and what interval to configure the GPS receiver for, log data and send telemetry. 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: Make extra pyro channel firing time configurableKeith Packard2014-06-10
| | | | | | | This adds a 'I' parameter to set the extra pyro channel firing time (in ticks). This has no effect on the main/drogue channels. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Report total available log space in version commandKeith Packard2014-06-10
| | | | | | | | This provides a more accurate means of determining available log space than guessing whether some portion of the flash chip holds configuration data. 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: Reduce tracker GPS buffer to 4 samplesKeith Packard2014-06-07
| | | | | | We just don't have enough RAM for 8 samples. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Define lat/lon sum variables as 64-bit instead of 16Keith Packard2014-06-07
| | | | | | Oops. 16 bits won't hold position information... 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: Write tracker logging from tracker thread directlyKeith Packard2014-06-07
| | | | | | Also, logs 8 pre-launch GPS packets so we can get the ground position. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add TeleGPS logging formatKeith Packard2014-06-07
| | | | | | | | | | | | | This is mostly like the mega format, but places the flight state in a spare byte of the GPS data and writes the gps starting location to the flight packet. Log data is written by the main tracker thread; there's no reason for a separate thread given the GPS update rate and the lack of flight controls. This means ao_log_gps has an API to be called from there, rather than a thread to run. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clear out eeprom erase records when writing entry 0Keith Packard2014-06-07
| | | | | | | | | | When writing config/erase to eeprom, there's no 'erase' operation as on-chip eeprom is writable at a byte level. As such, we can't tell when the erase blocks get reset when the config gets written. When this happens, erase block 0 gets written explicitly, so just use that call to trigger explicit erasing of the data. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow value other than 0 for marking erased flightsKeith Packard2014-06-07
| | | | | | | on-chip eeprom doesn't erase to 0xff, so let TeleMega use a different value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow AO_CONFIG_MAX_SIZE to be configured. Validate it.Keith Packard2014-06-07
| | | | | | | | | TeleMega config is 200 bytes. AO_CONFIG_MAX_SIZE was 128. That didn't work out well when logging erased flight information. Allow TeleMega to use a larger value (1k), and then do a compiler hack to make sure the defined value is at least as large as the ao_config structure. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Move ao_tracker.c to kernelKeith Packard2014-06-07
| | | | | | Doesn't make sense to be in product Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix config to set default log size for all devices with logKeith Packard2014-06-05
| | | | | | Not just devices with flight 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: ao_distance was overflowing when checking for longitude wrapKeith Packard2014-06-05
| | | | | | Need to shift everyone right one bit to fit in 32 bits Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Include sensor logging task only on flight boardsKeith Packard2014-06-05
| | | | | | | This lets TeleGPS use the logging infrastructure without wasting a task to log sensor data Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add ao_distance.c to compute cartesian distances on the globeKeith Packard2014-06-05
| | | | | | | This is not a great circle distance, but should be good enough for points reasonably close together Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fetch/store only 8 bits for pyro state valuesKeith Packard2014-06-02
| | | | | | | These fields are uint8_t, not int16_t. Fetching and storing 16 bits is a bad idea. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Maximum pyro configuration parameter has 4 bytes in the nameKeith Packard2014-06-02
| | | | | | | | "f>=" needs four bytes, not just three to store the whole string. If we only store three, then we never manage to compare correctly as the null terminating byte is missing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Configuring pyro channels can use more than 48 charactersKeith Packard2014-06-02
| | | | | | | Increase the command buffer from 48 to 128 bytes to hold the longest pyro configuration commands Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow sparse GPS data logging for TeleGPSKeith Packard2014-05-30
| | | | | | | When the device hasn't moved for a while, stop logging data. Start as soon as it moves again. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fake flight code changes in kernel and stmKeith Packard2014-05-27
| | | | | | | Redirects data input from local sensors to USB sourced data, leaving USB enabled when the computer goes into pad mode. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Move ao_config declarations to ao_config.hKeith Packard2014-05-25
| | | | | | No sense leaving these in ao.h, and it's nice to make that file smaller Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add config values for tracker start motion limitsKeith Packard2014-05-21
| | | | | | | | TeleGPS switches from 'pad' to 'drogue' states after the device moves a specified distance from the initial starting point. These values can be configured, and this is the configuration for them. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't define ao_ignite_decivolt without ignitersKeith Packard2014-05-21
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Expose ao_gps_set_rate from u-blox driverKeith Packard2014-05-21
| | | | | | This lets applications set the desired GPS update rate to reduce power usage Signed-off-by: Keith Packard <keithp@keithp.com>