summaryrefslogtreecommitdiff
path: root/src/kernel
Commit message (Collapse)AuthorAge
* altos: Only set CMAC RSSI value on valid packet receivedKeith Packard2015-05-24
| | | | | | | | This ignores spurious packets for the purpose of showing the RSSI value in telelco/telefire, avoiding warning about 'low RSSI' when the radio receives noise. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add the ability to configure a different USB vendor IDKeith Packard2015-03-19
| | | | | | | ChaosKey will use an OpenMoko vid/pid, so we need the ability to configure a different USB vendor ID for each product. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Missing pad field in TMv2 data packetKeith Packard2015-03-02
| | | | | | | | | | The normal ARM padding would have filled this in correctly, but it's best to be explicit about the structure. This also adds a test to make sure the resulting telemetry declaration is exactly 32 bytes, Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make APRS format (compressed/uncompressed) configurableKeith Packard2015-03-02
| | | | | | | | This provides a choice of compressed vs uncompressed when sending APRS packets to deal with receivers that still do not have support for the more useful compressed format. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow software to offer other USB interface classes than CDCKeith Packard2015-02-28
| | | | | | | This lets some boards offer non-CDC class USB interfaces so that the modem driver doesn't pick them up. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: embed ao_alarm and ao_clear_alarm in ao_sleep_forKeith Packard2015-02-14
| | | | | | | sdcc won't embed these itself, and thus consumes too much flash for telemetrum-v1.0 Signed-off-by: Keith Packard <keithp@keithp.com>
* 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: Separate out ao_tracker force from dbgKeith Packard2015-02-07
| | | | | | | Allow enabling telemetry when USB is connected without also enabling the motion debugging output. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Always include a check for stdio overflowKeith Packard2015-02-01
| | | | | | | For some reason, the check for running out of space to record stdio devices was disabled when only one device was expected. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/stmf0: Re-implement fast ADC code for stmf0Keith Packard2015-01-27
| | | | | | | This creates a ring buffer for ADC data so that ADC fetching can run in parallel with other activities. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add support for TeleBT v3.0Keith Packard2015-01-24
| | | | | | | Add support to the BTM driver for non-CC1111 interrupts Add HW flow control to STM serial driver Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Get rid of some accidental debug codeKeith Packard2015-01-22
| | | | | | | I was debugging the accelerometer calibration code and left some printfs in it, which made TM run out of flash space. Signed-off-by: Keith Packard <keithp@keithp.com>
* Set version to 1.5.9.11.5.9.1Keith Packard2015-01-16
|
* 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: Use other TeleDongle LED for CRC-invalid packet reportingKeith Packard2014-11-06
| | | | | | | Instead of blinking out some fake-o RSSI indication, just blink the red LED when a packet with a bad CRC is received. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Declare port register type only in arch headerKeith Packard2014-11-06
| | | | | | | Instead of defaulting to 8 bits, explicitly require declaration of the type of the port register for each architecture. 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: Sort out ao_gps_print altitude fetchingKeith Packard2014-10-25
| | | | | | | | | | ao_gps_print is used by both teledongle/telebt and the host-based GPS test code. The first instance uses the old internal GPS structure, containing just a 16-bit altitude while the second uses an ao_telemetry structure, which contains 32 bits split into two members. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Expose telemetry altitude macros even without GPSKeith Packard2014-10-24
| | | | | | This allows for APRS testing in the new teledongle code Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix syntax error with ao_log_mega change.Keith Packard2014-10-04
| | | | | | Missed a semi-colon. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Record 32-bits for gyro calibration valuesKeith Packard2014-10-04
| | | | | | | | | The gyro ground calibration values are scaled by 512 to provide a bit more precision for the computations. This means they don't fit in 16 bits, so change the format of the flight log record. Also change the reported format so that AltosUI has a chance of figuring it out. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make sure we don't beep out continuity twice in idle modeKeith Packard2014-09-11
| | | | | | | | | | | | | | If the battery voltage report takes longer than the initialiation sequence, we could get to the state reporting after the state had switched from startup to idle. This would result in continuity being reported the first time through the loop. Then, as the state had already changed, we'd pass through the while test and go back to report continuity a second time. Fixed by using the state remembered before beeping out the voltage to decide whether to report the continuity. 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: Allow negative values for pyro configuration dataKeith Packard2014-09-03
| | | | | | | All of the integer pyro configuration parameters may be negative, so parse that correctly. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't add AO_LOG_FLIGHT to existing GPS logsKeith Packard2014-09-01
| | | | | | | When appending to a TeleGPS log, don't stick another flight value into the log. That just confuses the ground station software. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make sure pyro remains valid during delayKeith Packard2014-08-29
| | | | | | | Keep checking pyro status while waiting for delay to expire to make sure nothing changes. Disable pyro channel if something does. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add telerepeat-v1.0Keith Packard2014-08-17
| | | | | | | This uses TeleBT hardware to provide a telemetry repeater, receiving packets on one frequency and re-transmitting them on another. Signed-off-by: Keith Packard <keithp@keithp.com>
* telegps-v1.0: Provide one log and append to itKeith Packard2014-08-17
| | | | | | | | Instead of creating per-flight logs, create a single log and append data to it each time TeleGPS is powered on. This avoids potentially running out of log space just because the device is powered off/on. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Report additional pyro channels via beeperKeith Packard2014-08-14
| | | | | | | Send a beep for each additional pyro channel, low for no igniter, mid for igniter. Does not change the reporting for the apogee/main channels. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Have MicroKite just start recording at startupKeith Packard2014-08-14
| | | | | | | This avoids having MicroKite try to detect boost and has it just start recording data immediately. Signed-off-by: Keith Packard <keithp@keithp.com>
* 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>