Keith Packard [Mon, 24 Nov 2014 02:56:40 +0000 (18:56 -0800)]
altos/cc1200: With PQT wide open, we can't use PQT_REACHED for start
Because we're allowing even signals only weakly correlated with the
preamble through to sync detection, we can't use the PQT_REACHED
symbol to tell when a packet header has been seen. Instead, just look
for SYNC_FOUND.
Keith Packard [Mon, 24 Nov 2014 02:31:15 +0000 (18:31 -0800)]
altos/cc1200: Wait for packet to be placed in FIFO during receive
This changes the receive code to use MCU_STATUS, waiting for
MARC_STATUS1 to indicate that the packet is in the fifo before reading
it out.
It also fixes the receive timeout code to keep receiving if the
preamble or sync have been seen when the timeout fires. This makes
TeleLCO able to use short timeouts during scanning while still
successfully receiving packets.
Keith Packard [Sun, 16 Nov 2014 06:52:42 +0000 (22:52 -0800)]
altosdroid: Save AltosState and restore at startup
Instead of re-parsing the old logfile, save the current state in the
preferences database and restore at restart of the
TelemetryService. This makes the state get restored even before the BT
connection is recovered.
Keith Packard [Sun, 16 Nov 2014 06:50:31 +0000 (22:50 -0800)]
altoslib: add AltosPreferences state save/restore interfaces
This serializes an entire AltosState object and stores it in the
preferences database for later retrieval. AltosDroid uses this to
recover the old state data when restarting.
Keith Packard [Fri, 7 Nov 2014 00:00:06 +0000 (16:00 -0800)]
altos: Stop attempting to ramp power on CC115L
The PA register on the 115L isn't in any way monotonic, making the old
code broken. Just rempve it instead of fixing it; we don't ramp
anywhere else...
Keith Packard [Sun, 26 Oct 2014 02:56:25 +0000 (19:56 -0700)]
altos: Fix up telemetry delay computations
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.
Keith Packard [Sat, 25 Oct 2014 17:20:07 +0000 (10:20 -0700)]
altos: Increase PQT value for cc1200 improving sensitivity
The PQT value indicates how 'good' the preamble is; higher values
allow a lower quality of preamble to pass the test, permitting more
packets to be decoded.
Keith Packard [Sat, 25 Oct 2014 17:17:48 +0000 (10:17 -0700)]
altos: Sort out ao_gps_print altitude fetching
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.
Keith Packard [Sat, 4 Oct 2014 07:04:39 +0000 (00:04 -0700)]
altos: Record 32-bits for gyro calibration values
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.
Keith Packard [Sat, 27 Sep 2014 05:53:39 +0000 (22:53 -0700)]
altos: Make sure we drop the SPI mutex when aborting cc1120 recv
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.
Keith Packard [Sat, 13 Sep 2014 22:52:56 +0000 (15:52 -0700)]
altosui: Bring up main window when doing --replay or --graph
This shows the main window when replaying or graphing files so that
you can interact with that, changing the global configuration or doing
other stuff.
Keith Packard [Fri, 12 Sep 2014 02:56:13 +0000 (19:56 -0700)]
altos: Make sure we don't beep out continuity twice in idle mode
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.
Keith Packard [Thu, 11 Sep 2014 22:00:25 +0000 (15:00 -0700)]
altos: Fix ability to disable telemetry by setting interval to 0
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.
Keith Packard [Thu, 11 Sep 2014 21:14:07 +0000 (14:14 -0700)]
altoslib: Stop re-loading previous flight when starting telemetry monitoring
This feature is necessary on AltosDroid because there's no other UI
for reloading an old flight. It's not useful on the desktop where you
really just want to see new telemetry; old telemetry is availbale
through the 'graph flight' or 'replay' mechanisms.
AltosDroid uses a different class for reading telemetry data, so we
can just remove this feature from altoslib at this point.
This inhibits the installation of the shared mime info data file and
updating of the shared mime database. Necessary if you want to use a
distribution-specific shared mime installation hook, like dh_installmime
Keith Packard [Sun, 7 Sep 2014 03:43:32 +0000 (20:43 -0700)]
altoslib: Increase timeouts when using low baud rate remote protocol
When using 2400 or 9600 baud remote link rates, we need to increase
the packet timeout from 500ms to much longer values to avoid annoying
the user with timeout warnings.
Keith Packard [Sun, 7 Sep 2014 03:41:58 +0000 (20:41 -0700)]
altoslib: Update local callsign/baud rate when using remote protocol
We've had code to synchronously update the local and remote radio
frequencies when doing configuration over the remote link. This patch
adds the same code when changing the call sign and baud rate.
Keith Packard [Sun, 7 Sep 2014 03:39:37 +0000 (20:39 -0700)]
altos: Reduce deviation at 2400/9600 baud
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.