Keith Packard [Sat, 7 Feb 2015 09:05:57 +0000 (01:05 -0800)]
altos/lpc: Give up on interrupt-driven SPI driver
There are just too many limitations in when interrupts are delivered
to make them useful. Instead, just drive the SPI directly with the
CPU. At higher spi speeds (6Mhz or more), it's probably faster to do
it this way anyways.
Keith Packard [Sat, 7 Feb 2015 04:40:05 +0000 (20:40 -0800)]
altosuilib: Don't show 'Sats in view' for TeleGPS eeprom graphing
We don't log the visible sats from TeleGPS, only the basic GPS
info. Have AltosFlightStats track whether sat info is present, then
use that to elide the Sats In View graph entry as needed.
Keith Packard [Sat, 7 Feb 2015 04:36:44 +0000 (20:36 -0800)]
altosuilib: EEProm download from TeleGPS doesn't have states
As TeleGPS doesn't have flight states, the EEProm download progress
bar shouldn't show 'state invalid', and it should use a different
scale for each block.
Fix this by having AltosConfigData know which devices have state based
on their log format, then mark the progress bar state limits as
'invalid/invalid' instead of 'boost/landed'. Then have the progress
bar use that to set a more reasonable scale for each block.
Keith Packard [Fri, 6 Feb 2015 12:45:17 +0000 (04:45 -0800)]
altoslib: Store MS5607 data in AltosConfigData for use by AltosMs5607
When doing 'Monitor Idle', we fetch new config data each iteration and
pass that to each of the readers, including ms5607. Instead of
re-fetching the config data there, just store the ms5607 parameters
when we fetch it the first time and copy it over.
Keith Packard [Fri, 6 Feb 2015 11:32:27 +0000 (03:32 -0800)]
micropeak: Support both FTDI and Altus Metrum USB IDs
The windows driver only returns FTDI devices when
altos_ftdi_list_start is invoked, so we need to call both that and the
regular altos_list_start to get all of the devices.
Keith Packard [Fri, 6 Feb 2015 09:29:56 +0000 (01:29 -0800)]
libaltos: Use more SetupDi API to get Windows 7 listing devices
My Windows 7 box doesn't include 'SymbolicName' in the registry, but
SetupDiGetDeviceInstanceId *does* return something that includes
vid/pid/serial, so use that in preference.
Keith Packard [Fri, 6 Feb 2015 00:08:44 +0000 (16:08 -0800)]
altos/lpc: Clean up USB endpoint access functions
The USB device endpoints can have two pointers in them, but we use
only the first. Fix the access functions to take an index as to which
we want so that we can disable the other address registers with them
instead of requiring open-coded access.
Keith Packard [Thu, 5 Feb 2015 04:30:15 +0000 (20:30 -0800)]
altos/telebt-v3.0: Set initial radio cal to a sensible value
CC1200 uses a different xtal than CC1120, so the default calibration
needs to change. This value hit 434.550 on SN 2407, so it seems like a
reasonable place to start.
Keith Packard [Sun, 1 Feb 2015 15:44:52 +0000 (16:44 +0100)]
altos/stmf0: Support PA11/PA12 remapping
Small pin-count versions of the STMF0 can remap PA11/PA12 on the same
pins as PA9/PA10. These are used by USB, so have the USB driver deal
with remapping them.
Keith Packard [Sun, 1 Feb 2015 15:36:51 +0000 (16:36 +0100)]
altos/stm: Add ability to delay STDIO usage for serial ports
Bluetooth needs to delay adding the serial port to stdio until the
link is up and running. The cc1111 serial driver had
DELAY_SERIAL_*_STDIN bits which have been added to the STM serial driver.
Keith Packard [Tue, 27 Jan 2015 06:16:18 +0000 (22:16 -0800)]
altos/usbtrng-v2.0: Add random output command
Read chunks of random ADC data, do some CRC16 computations to de-bias
and merge 4 bytes of input data into 2 bytes of output data, then dump
that out over USB.
Keith Packard [Tue, 27 Jan 2015 06:12:40 +0000 (22:12 -0800)]
altos/stmf0: Add faster USB path
This adds a way to allocate private USB buffers for sending data
without needing to copy it again. It requires ensuring that all
accesses are 16 bits aligned to 16 bit boundaries.
Keith Packard [Fri, 23 Jan 2015 05:31:45 +0000 (21:31 -0800)]
altos/lpc: Fix double-buffered USB changes
These got merged when we were down in Auckland, but before they'd been
finished. Transmitting worked fine, but receiving was mis-configuring
the OUT buffer size in the hardware.
Keith Packard [Tue, 23 Dec 2014 01:11:51 +0000 (17:11 -0800)]
altos: Adjust CC1200 RSSI reporting value
On the test setup, we were about 13dB off, so tweak the settings to
suit. This result wasn't tested; it's just a rough offset until we get
a production run of TeleDongle boards back to do more systematic
measurements.
Keith Packard [Tue, 23 Dec 2014 01:10:33 +0000 (17:10 -0800)]
altos: Document cc115l power measured at RF setting 0x03 as -31.75dBm
We built a custom TeleGPS load for radio sensitivity measurements with
the lowest documented power level setting (0x03), and measured the
power out at that value of -31.75dBm on the test board.
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.