summaryrefslogtreecommitdiff
path: root/src/drivers
Commit message (Collapse)AuthorAge
...
* altos: Complete cc1200 driverKeith Packard2014-10-24
| | | | | | | | | | Deal with differences between cc1120 and cc1200, including built-in packet support and various register changes. This now works to send and receive telemetry, as well as send APRS and RDF. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Copy cc1120 driver to cc1200 driver and hack a bitKeith Packard2014-10-05
| | | | | | | | | | The cc1200 is similar to the cc1120, although many registers have changed. This driver can send a bare carrier and an RDF tone, but does not yet receive or transmit telemetry data. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make sure we drop the SPI mutex when aborting cc1120 recvKeith Packard2014-09-26
| | | | | | | | | | The cc1120 receive code is 'twisty', in that it acquires the SPI mutex in the middle of an interrupt handler so that it can quickly start the radio when the signal comes in. This means we have to be careful to drop that mutex in all paths which leave the receive code, including when the packet receive is aborted mid-way through the process. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Scale packet master receive delay by baud rateKeith Packard2014-09-06
| | | | | | | Increase the time we wait for return packets based on the remote protocol baud rate. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Reduce deviation at 2400/9600 baudKeith Packard2014-09-06
| | | | | | | | | | There's no reason to use 20.5kHz deviation at 2400 and 9600 baud, and if we get a better receiver, we'll want to use narrower deviation to have less bandwidth sucking noise into the radio. The new values are (nominally) 5.125kHz deviation for 9600 baud and 1.5kHz deviation for 2400 baud. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telefire: Add firing length to manual pad commandKeith Packard2014-09-03
| | | | | | | | This adds an optional length of time (in 1/10s of a second) to the ao_pad_manual function to enable testing of igniters without needing to use TeleLCO. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/telefire,telelco: Add HAS_RADIO_RATE to launch system softwareKeith Packard2014-07-12
| | | | | | | This lets us set the rate to a lower value to improve range. 9600 baud works great; 2400 baud makes the initial search take a long time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Scale DOP values by 10 in GPS driversKeith Packard2014-07-10
| | | | | | sky traq was scaling by 5, ublox was scaling by 100. 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: 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: Add telemetry rate support to CC1120 driverKeith Packard2014-07-05
| | | | | | This supports the new 2400 and 9600 baud rates Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Packet reception tuning for cc1120 driverKeith Packard2014-07-05
| | | | | | | This adjusts the cc1120 receive parameters to increase sensitivity at the expense of reporting many more invalid packets to the UI. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add 2400 and 9600 baud telemetry support to cc115l driverKeith Packard2014-07-05
| | | | 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/aprs: Encode last serial number in SSID. Transmit serial in commentKeith Packard2014-06-20
| | | | | | | | This makes it a lot easier to tell which device is sending information, and to receive data from multiple devices on the same receiver. Signed-off-by: Keith Packard <keithp@keithp.com>
* Revert "altos: Write current flight state to GPS data from GPS drivers"Keith Packard2014-06-10
| | | | This reverts commit db6003d34595fbd103d5b131912b6a797254f1c5.
* altos: Write current flight state to GPS data from GPS driversKeith Packard2014-06-07
| | | | | | | This will be useful with TeleGPS which has no other packet containing flight state. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow cc115l driver to be built without radio power controlKeith Packard2014-06-05
| | | | | | TeleGPS just wants full power, so remove the configuration option Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Switch APRS altitude encoding computation to fixed pointKeith Packard2014-05-30
| | | | | | | | | APRS altitude is logarithmically encoded, so this implementation includes a fixed point log-base-2 function along with a bit of other fixed point stuff. This eliminates all floating point from TeleGPS, saving around 4kB of code space. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make MS5607 PROM a public variableKeith Packard2014-05-25
| | | | | | | This will let the fake flight code update it as necessary, without creating a new interface in ao_ms5607.c 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>
* altos: Fix cc115l debug buildKeith Packard2014-05-21
| | | | | | | New compiler warning flags and moving to the nxp require a few minor changes in the code to make it work. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Allow APRS to send just battery voltageKeith Packard2014-05-21
| | | | | | Don't require apogee and main voltages as well Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make quadrature debounce per-pin rather than per-deviceKeith Packard2014-05-15
| | | | | | | Debouncing per-pin means we don't lose transitions, which makes counting a lot more precise. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add LED test command to pca9922 driverKeith Packard2014-05-12
| | | | | | This lets you control the LEDs from the command line to test things. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Simplify quadrature trackingKeith Packard2014-05-09
| | | | | | | | | | | | Set the timer to 200Hz for a 5ms debounce interval. Then, simply look for transitions ending in both bits in the encoder being off, which indicates the the encoder is resting in a detent. If bit '2' is turning off, the encoder was rotated clockwise, otherwise the encoder was rotated counter clockwise. This is a lot more reliable, although still not perfect. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up trailing whitespace in ao_pad.cKeith Packard2014-05-08
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: ublox driver always offers course data when it has a fixKeith Packard2014-05-08
| | | | | | | Set the AO_GPS_COURSE_VALID bit to signal that this part of the GPS data is valid. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: For telelco discovery packets, retry 5 times with shorter timeoutKeith Packard2014-04-30
| | | | | | | | A timeout of 10ms is more than enough to receive a query packet, but if we miss it during device discovery, it's a pain, so retry 5 times to make sure we find everyone. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Put locked/unlocked GPS status in APRS commentsKeith Packard2014-02-09
| | | | | | | | | | | Replace the 'S' (which marks the field showing sats in view) with either 'L' or 'U' to tell the user whether the GPS receiver is locked or unlocked. This also removes the colons in the comment field to shorten it. This makes it fit on one line of my FT1D display. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Re-send previous GPS position in APRS if lock is lostKeith Packard2014-02-09
| | | | | | | | | APRS radios often show only the last received APRS packet, which means that erasing the last known GPS position when we lose lock by sending 0/0/0 is unhelpful. Instead, just send the last known position, and make sure that we send 0/0/0 before we're locked the first time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Report nsat in view in APRS packetKeith Packard2014-02-08
| | | | | | | This adds the number of sats in view (as opposed to the number of sats in solution) to the APRS packet. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Don't write more than 12 sat infos in ublox driverKeith Packard2014-02-08
| | | | | | | This was overwriting memory past the end of the ao_gps_tracking_data array, which isn't a good idea. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Eliminate warnings in FAT codeKeith Packard2014-02-08
| | | | | | | The FAT file system code wasn't cleaned up when the warning fixes were done recently. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add watchdog timer taskKeith Packard2014-02-08
| | | | | | | This new task frobs a pin periodically to inform the hardware that the operating system is running. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: report 0/0/0 for APRS position when GPS is not lockedKeith Packard2014-02-06
| | | | | | | We were reporting whatever the GPS device sent, even if it wasn't reporting a valid status. That's not terribly useful. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Report battery, apogee and main voltages over APRSKeith Packard2014-01-15
| | | | | | This makes APRS more usable when you mute the RF audio on the HT. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Switch APRS to compressed position formatKeith Packard2014-01-14
| | | | | | This provides lat/lon/alt in fewer bytes while improving precision. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: cc115l driver tone_run wasn't recording number of tonesKeith Packard2013-12-20
| | | | | | This would prevent the cc115l driver from ever sending tones. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up warnings for LPC productsKeith Packard2013-12-20
| | | | | | Unused varibles, functions and parameters. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add default button return value from ao_button_getKeith Packard2013-12-20
| | | | | | | This "can't" happen, but it's not unreasonable to have a default return value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up -Wextra warningsKeith Packard2013-12-20
| | | | | | | Unused variables, mismatching signed/unsigned and a few other misc warnings. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up some minor warnings from -WallKeith Packard2013-12-20
| | | | | | Unused variables, functions and labels, missing enums in switch. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Execute self-test on MMA655X partKeith Packard2013-12-20
| | | | | | | | | | This doesn't check for fine calibration, just makes sure the part is within the broad tolerances specified by the manufacturer. The subtle fix here was actually getting reset working -- there was a typo in the bitpattern definition which caused the reset to fail, making it hard to self-test the part, as self-test is only valid before the part is running. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Try IMU self-test 10 times before giving upKeith Packard2013-12-18
| | | | | | | | This should keep the device from failing to boot unless the IMU is actually broken. Oh, and if self test does fail, this places the flight computer in 'Invalid' state rather than panic. Signed-off-by: Keith Packard <keithp@keithp.com>
* Add ublox checksum generating programKeith Packard2013-11-12
|
* altos: Change ao_mpu6000_gyro arg to floatKeith Packard2013-10-27
| | | | | | This lets callers pass more precision than just the original sensor value Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add gyro-based orientation trackingKeith Packard2013-10-25
| | | | | | | This tracks the angle-from-vertical as an additional input to the pyro channels. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix GPS test frameworks to handle shared ao_gps_new variableKeith Packard2013-10-25
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Merge GPS logging into a single functionKeith Packard2013-10-14
| | | | | | | | | | | | Create a new global, ao_gps_new, which indicates new GPS position and satellite data. Use ao_gps_new as the new sleep/wakeup address. Merge the separate gps position/satellite logging tasks into a single function which waits for new data and writes out the changed values. Signed-off-by: Keith Packard <keithp@keithp.com>