Keith Packard [Sat, 27 Feb 2010 23:14:04 +0000 (15:14 -0800)]
Fix up LED colors for each product.
Different products assign different color LEDs to the two available
LED drivers (P1_0, P1_1). Make the LED color pin assignments
per-product (in ao_pins.h), then deal with not always having a green LED.
Keith Packard [Sat, 27 Feb 2010 23:11:44 +0000 (15:11 -0800)]
Eliminate deadlock when writing config from radio link
Writing the 'Saved\r\n' string would fill the packet buffer and cause
a flush to occur, which would need to wait for the radio link to
receive and transmit a packet. The radio link always re-fetches the
radio channel number when lighting up the radio, so it need to look in
the config space. If the config mutex was held by the config writing
process while the radio was trying to get the channel number, then
we'd get a deadlock.
Keith Packard [Fri, 26 Feb 2010 00:33:34 +0000 (16:33 -0800)]
Allow product names to have suffixes (like board revisions)
When looking for a board by product name, just look at the prefix of
the name instead of requiring an exact match. This will allow products
to have board version suffixes.
Keith Packard [Sun, 21 Feb 2010 04:22:16 +0000 (20:22 -0800)]
Change altos build process to support per-product compile-time changes
This creates per-product subdirectories and recompiles everything for
each product, allowing per-product compile-time changes for things
like peripheral pin assignments and attached serial devices.
Keith Packard [Sun, 14 Feb 2010 00:42:27 +0000 (16:42 -0800)]
Log GPS data on pad after boost detect.
This wakes up the two GPS reporting tasks and gets them to report out
any existing GPS data to the log file. To make sure the timestamps in
that GPS data are accurate, this also records GPS time on receipt of
the GPS data instead of when that is logged.
Keith Packard [Mon, 11 Jan 2010 00:31:50 +0000 (16:31 -0800)]
Switch to using internal cc1111 temperature sensor
v0.2 has no temperature sensor, and several of the v0.1 boards didn't
get a temperature sensor loaded. Use the internal temperature sensor
on the cc1111 in all cases instead.
Keith Packard [Sun, 10 Jan 2010 06:06:19 +0000 (22:06 -0800)]
Force idle mode by shorting the SPI clock to ground at boot time.
This allows you to override the flight mode detection code in case the
accelerometer calibration is broken somehow. Hold the SPI clock shoted
to ground until the LED comes on, then remove it.
Keith Packard [Sun, 20 Dec 2009 04:32:18 +0000 (20:32 -0800)]
Remove dbg driver code from telemetrum/teledongle
The only board with debug outputs is the TI dongle at this point, so
the debug modules were disabled in TM and TD some time
ago. Unfortunately, the code was not removed then.
Keith Packard [Sat, 19 Dec 2009 19:34:16 +0000 (11:34 -0800)]
Use ao_radio_get/ao_radio_put in packet code.
The ao_radio_get function both acquires the mutex *and* configures the
radio channel and frequency. Failing to use this in the packet code
would leave the radio frequency unconfigured.
Keith Packard [Sun, 6 Dec 2009 03:50:38 +0000 (19:50 -0800)]
Allow radio calibration to be set from ao-load
This moves the initial radio calibration value into const memory where
it will be used if no eeprom configuration value is available, either
on an unprogrammed board with eeprom or a device without an eeprom.
Keith Packard [Sat, 5 Dec 2009 07:38:26 +0000 (23:38 -0800)]
Add radio calibration configuration.
The crystal we use is only good for 20ppm, which generates a fairly
significant error bounds at our RF frequency. This commit adds a
configuration variable that sets the RF frequency control variable so
that the output frequency can be adjusted.
Keith Packard [Sun, 22 Nov 2009 09:10:44 +0000 (01:10 -0800)]
Automatically extract flight number for eeprom and telem filenames.
Extract flight number from either telemetry or eeprom files and use
that in the resulting filenames. To ensure that files remain unique,
add a new field, -seq-%03d. This is appended only when the sequence
number is non-zero as it shouldn't occur in normal usage.
This also eliminates some duplicate filename creation code in the
library and aoview sources.
Keith Packard [Sun, 22 Nov 2009 06:12:21 +0000 (22:12 -0800)]
ao-postflight: compute barometric alt for each GPS position
Print that to the --gps file, and use that in the --kml file for the
altitude. Gives a very different picture of our flight tracks,
presumably far more accurate (at least in altitude).
Keith Packard [Sun, 22 Nov 2009 02:57:45 +0000 (18:57 -0800)]
Decode HDOP data from skytraq GPS
The hdop data was getting dropped on the floor, but is rather useful
when deciding if the GPS position is crazy or not. This reports HDOP *
5 (giving a useful range of .2-50).
Keith Packard [Mon, 16 Nov 2009 00:20:18 +0000 (16:20 -0800)]
Stop using SiRF state info.
With the switch to the skytraq GPS unit, we don't have the same level
of detail in the GPS stream, so stop reporting that in the telemetry
stream, in the UI and writing it to eeprom.
Keith Packard [Sun, 15 Nov 2009 23:59:01 +0000 (15:59 -0800)]
Add flight number to telemetry stream.
This makes it easier to tie the telemetry and eeprom files together as
they're now both labeled with serial and flight numbers, which should
be unique.
Keith Packard [Sun, 15 Nov 2009 06:24:37 +0000 (22:24 -0800)]
Share telemetry parsing code in cc library.
ao-view had a private copy of the telemetry parsing code which
included the ability to parse the newer version of that file. Those
changes have been moved to the library version and the private copy removed.
Keith Packard [Sun, 15 Nov 2009 06:17:24 +0000 (22:17 -0800)]
Loosen tolerances for main->landed transition
Detecting that the rocket has landed is required for the system to
flush the eeprom log and re-enable the RDF beacon. This patch changes
the landed state entry requirements for the accelerometer to require
only that the accelerometer stay within a quarter of a g (down from
1/10g) and changes the testing interval from 20 seconds to 5
seconds.
The requirement that the barometric altitude be within 1000m of the
launch altitude and that the barometer change by no more than 0.05kPa
are unchanged.
Keith Packard [Thu, 5 Nov 2009 05:42:51 +0000 (21:42 -0800)]
Explicitly use USB I/O routines in packet code
Using the implicit stdio functions (putchar/getchar/flush) would
result in essentially random redirection of each, depending on whether
the packet code had characters available when getchar was called. This
would cause lockups in putchar.
Keith Packard [Thu, 5 Nov 2009 05:32:07 +0000 (21:32 -0800)]
In USB pollchar, wait for packet before re-checking USB out len
This probably wouldn't actually cause a problem, but it seems more
reliable to wait for a packet interrupt before re-reading the packet
OUT len register. This could avoid spinning while waiting for a USB
packet, which seems like a good thing.
Keith Packard [Thu, 5 Nov 2009 05:29:37 +0000 (21:29 -0800)]
In packet master, move USB flush from packet thread to echo thread
This keeps the packet thread from blocking on USB and also makes the
flush happen after every packet (slightly more USB traffic, but
packets are slow anyway).