fw/altos
11 years agomicropeak: Check CRC on downloaded
Keith Packard [Wed, 2 Jan 2013 07:10:04 +0000 (23:10 -0800)]
micropeak: Check CRC on downloaded

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoBuild micropeak by default
Keith Packard [Wed, 2 Jan 2013 07:03:29 +0000 (23:03 -0800)]
Build micropeak by default

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoBuild installable versions of MicroPeak GUI
Keith Packard [Wed, 2 Jan 2013 02:20:23 +0000 (18:20 -0800)]
Build installable versions of MicroPeak GUI

Makes windows/mac/linux versions. Windows version appears to work on
Wine at least.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agomicropeak: Add 'Close' menu item. Fix start location
Keith Packard [Wed, 2 Jan 2013 01:10:55 +0000 (17:10 -0800)]
micropeak: Add 'Close' menu item. Fix start location

Let the window system pick a spot to place the application
windows. This avoids having them all sit on top of one another.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agomicropeak: Fix chart colors
Keith Packard [Wed, 2 Jan 2013 00:57:31 +0000 (16:57 -0800)]
micropeak: Fix chart colors

Need to apply custom colors after setting the theme

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agomicropeak is code complete now.
Keith Packard [Tue, 1 Jan 2013 23:30:11 +0000 (15:30 -0800)]
micropeak is code complete now.

Added save and download functionality. Removed 'new' from file menu.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge remote-tracking branch 'origin/master' into micropeak-logging
Keith Packard [Mon, 31 Dec 2012 22:24:59 +0000 (14:24 -0800)]
Merge remote-tracking branch 'origin/master' into micropeak-logging

11 years agoAllow CC1120 to sit on other SPI busses
Keith Packard [Mon, 31 Dec 2012 22:22:37 +0000 (14:22 -0800)]
Allow CC1120 to sit on other SPI busses

Reading the incoming data bypasses the SPI API and touches the SPI
data register directly; which port that is needs to be specified in
the pins file

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agomicropeak: Add flight stats pane
Keith Packard [Mon, 31 Dec 2012 22:17:26 +0000 (14:17 -0800)]
micropeak: Add flight stats pane

Shows graph or stats in alternate panes

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agomicropeak: Use altosuilib
Keith Packard [Mon, 31 Dec 2012 19:42:57 +0000 (11:42 -0800)]
micropeak: Use altosuilib

This removes a pile of code stolen from altosui

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltoslib: Add units change notification list
Keith Packard [Mon, 31 Dec 2012 19:38:53 +0000 (11:38 -0800)]
altoslib: Add units change notification list

This allows the UI to automatically respond to changes in the
preferred units.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoCreate altosuilib to share code between altosui and micropeak
Keith Packard [Mon, 31 Dec 2012 19:32:56 +0000 (11:32 -0800)]
Create altosuilib to share code between altosui and micropeak

Need to convert altosui to using it, but that shouldn't be hard

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: megadongle radio int is C13, not C14
Keith Packard [Sat, 29 Dec 2012 06:05:31 +0000 (23:05 -0700)]
altos: megadongle radio int is C13, not C14

Hard to get interrupts when listening to the wrong pin

Signed-off-by: Keith Packard <keithp@gag.com>
11 years agoMerge remote-tracking branch 'origin/master' into micropeak-logging
Keith Packard [Sat, 29 Dec 2012 05:50:13 +0000 (21:50 -0800)]
Merge remote-tracking branch 'origin/master' into micropeak-logging

11 years agoaltos: Fix MegaDongle CC1120 chip select pin
Keith Packard [Sat, 29 Dec 2012 02:35:46 +0000 (19:35 -0700)]
altos: Fix MegaDongle CC1120 chip select pin

It's on A0, not C5

Signed-off-by: Keith Packard <keithp@gag.com>
11 years agoaltos: Fix cc1120 debug code to build on megadongle
Keith Packard [Sat, 29 Dec 2012 02:34:33 +0000 (19:34 -0700)]
altos: Fix cc1120 debug code to build on megadongle

RDF function had changed, and APRS isn't available on megadongle.

Signed-off-by: Keith Packard <keithp@gag.com>
11 years agoLots more work on the MicroPeak application
Keith Packard [Sat, 29 Dec 2012 00:34:48 +0000 (16:34 -0800)]
Lots more work on the MicroPeak application

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd file chooser for MicroPeak
Keith Packard [Tue, 25 Dec 2012 22:45:49 +0000 (14:45 -0800)]
Add file chooser for MicroPeak

Needs reasonable directory tracking

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoStart building MicroPeak GUI tool
Keith Packard [Tue, 25 Dec 2012 22:23:29 +0000 (14:23 -0800)]
Start building MicroPeak GUI tool

Download, save and analyze MicroPeak flight data

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge branch 'master' into micropeak-logging
Keith Packard [Tue, 25 Dec 2012 22:20:42 +0000 (14:20 -0800)]
Merge branch 'master' into micropeak-logging

11 years agoMove libaltos to top level
Keith Packard [Tue, 25 Dec 2012 22:19:19 +0000 (14:19 -0800)]
Move libaltos to top level

This will let it be shared by the new MicroPeak gui

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Actually record ground averages for 6dof sensor
Keith Packard [Wed, 19 Dec 2012 07:15:20 +0000 (23:15 -0800)]
altos: Actually record ground averages for 6dof sensor

This gets the long-term averages for the 6dof sensors recorded into
the first flight log record.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Clean up graph a bit, remove shapes, improve tooltips
Keith Packard [Wed, 19 Dec 2012 06:59:36 +0000 (22:59 -0800)]
altosui: Clean up graph a bit, remove shapes, improve tooltips

Sometimes graphs would get shapes at each datapoint which was
annoyingly cluttered. And, the tooltips used a format that was
difficult to interpret.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add distinct LED pattern before writing log data
Keith Packard [Tue, 18 Dec 2012 08:39:37 +0000 (00:39 -0800)]
altos: Add distinct LED pattern before writing log data

Otherwise, the whole log looks like a an extra altitude digit.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Make micropeak 'serial' interface work
Keith Packard [Tue, 18 Dec 2012 06:58:49 +0000 (22:58 -0800)]
altos: Make micropeak 'serial' interface work

I prototyped the mpserial interface on a breadboard and tuned the
circuit to register the LED correctly. Then adjusted the serial code
to send bits at the right speed and format.

The logging contents are now in hexdecimal with a CCITT CRC-16
computed to verify correct reception.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Average MPU6000 values on ground for later use
Keith Packard [Tue, 18 Dec 2012 01:03:41 +0000 (17:03 -0800)]
altos: Average MPU6000 values on ground for later use

Having long-term ground averages recorded to the eeprom file will make
post-flight analysis of the data better.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Re-enable beeper on megametrum
Keith Packard [Mon, 17 Dec 2012 00:52:15 +0000 (16:52 -0800)]
altos: Re-enable beeper on megametrum

I turned it off during radio testing and forgot to fix that before committing...

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add new MARC status pin interrupt bits to megadongle
Keith Packard [Mon, 17 Dec 2012 00:08:33 +0000 (16:08 -0800)]
altos: Add new MARC status pin interrupt bits to megadongle

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge branch 'aprs' into 'master'
Keith Packard [Mon, 17 Dec 2012 00:06:41 +0000 (16:06 -0800)]
Merge branch 'aprs' into 'master'

11 years agoaltos: Wire up another CC1120 GPIO to get MARC status changes
Keith Packard [Mon, 17 Dec 2012 00:04:05 +0000 (16:04 -0800)]
altos: Wire up another CC1120 GPIO to get MARC status changes

When the radio drops out of RX or TX mode due to an error, it changes
the MARC status, and sends pulse down a configured GPIO. Use this to
tell when something 'bad' happened during TX or RX so that we can
recover from losing the SPI bus in the middle of transmission or
reception.

Without this, the radio would change state and we'd never know,
leaving the radio code waiting for an interrupt that would never arrive.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Test APRS rounding by using coordinates near the boundary
Keith Packard [Sun, 16 Dec 2012 21:31:45 +0000 (13:31 -0800)]
altos: Test APRS rounding by using coordinates near the boundary

This selects lat/lon and altitude near the rounding boundary to check
that the resulting APRS data is correctly computed.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Document what HAS_BOOT_RADIO does in the m25 driver
Keith Packard [Sun, 16 Dec 2012 21:30:20 +0000 (13:30 -0800)]
altos: Document what HAS_BOOT_RADIO does in the m25 driver

HAS_BOOT_RADIO causes the m25 driver to abort any ongoing receive in
case that is holding the SPI bus.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Round APRS data correctly
Keith Packard [Sun, 16 Dec 2012 21:29:31 +0000 (13:29 -0800)]
altos: Round APRS data correctly

Apply rounding once at the start of the computation, then truncate
after that.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltoslib: unconfigured radio frequency data is now -1, not 0
Keith Packard [Sun, 16 Dec 2012 21:25:54 +0000 (13:25 -0800)]
altoslib: unconfigured radio frequency data is now -1, not 0

This changed when AltosConfigData was cleaned up, so now frequency
settings must check for positive numbers rather than non-zero.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agodoc: Add warning about matching battery voltage.
Keith Packard [Sat, 15 Dec 2012 23:07:07 +0000 (15:07 -0800)]
doc: Add warning about matching battery voltage.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agodoc: Add paragraph noting differences in JST polarity
Keith Packard [Sat, 15 Dec 2012 22:47:22 +0000 (14:47 -0800)]
doc: Add paragraph noting differences in JST polarity

Looks like the 'standard' polarity for 3.7V lipos using JST connectors
in RC aircraft is swapped from what Spark Fun uses. Note that in the
docs to try and keep people from wrecking hardware.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge branch 'micropeak-1.1'
Keith Packard [Sat, 15 Dec 2012 03:29:50 +0000 (19:29 -0800)]
Merge branch 'micropeak-1.1'

11 years agoaltoslib: Discard previous flight state on SN change
Keith Packard [Sat, 15 Dec 2012 03:28:49 +0000 (19:28 -0800)]
altoslib: Discard previous flight state on SN change

A previous change discarded previous *telemetry* state, but failed to
discard any previous overall flight state. This would reset some of
the data fields, but wouldn't reset the GPS state and max measurements.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltoslib: Only list flight logs for boards that we know have them
Keith Packard [Sat, 15 Dec 2012 03:27:56 +0000 (19:27 -0800)]
altoslib: Only list flight logs for boards that we know have them

Boards that don't have flight logs will generate a nice 'Syntax Error'
and fail to initialize.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Log baro readings for MicroPeak
Keith Packard [Fri, 14 Dec 2012 19:11:39 +0000 (11:11 -0800)]
altos: Log baro readings for MicroPeak

This logs barometric data every 192ms (more or less) to the 504
remaining bytes of internal EEPROM storage in the ATtiny85. This
provides 48.192 seconds of logging.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Note that Lithium battery may be included with MicroPeak micropeak-1.1
Keith Packard [Thu, 13 Dec 2012 06:53:36 +0000 (22:53 -0800)]
altos: Note that Lithium battery may be included with MicroPeak

I'm not willing to say that we'll always be able to include a battery,
but we can certainly try, and they're certainly cheap enough that we
should.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge branch 'micropeak-1.1'
Keith Packard [Thu, 13 Dec 2012 06:36:59 +0000 (22:36 -0800)]
Merge branch 'micropeak-1.1'

11 years agodoc: Update MicroPeak doc to include EEPROM and programming info
Keith Packard [Thu, 13 Dec 2012 06:35:05 +0000 (22:35 -0800)]
doc: Update MicroPeak doc to include EEPROM and programming info

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge branch 'micropeak-1.1'
Keith Packard [Wed, 12 Dec 2012 19:10:14 +0000 (11:10 -0800)]
Merge branch 'micropeak-1.1'

11 years agoaltos: Log in-flight data for MicroPeak
Keith Packard [Wed, 12 Dec 2012 19:01:48 +0000 (11:01 -0800)]
altos: Log in-flight data for MicroPeak

This logs the low 16 bits of the pressure value to the remaining
on-chip eeprom. It can be read out with a standard AVR programming
dongle.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add load-slow target for MicroPeak
Keith Packard [Wed, 12 Dec 2012 18:57:03 +0000 (10:57 -0800)]
altos: Add load-slow target for MicroPeak

This sets the programming clock to 1/4 of the 250kHz clock used by the
MicroPeak firmware, allowing the device to be reprogrammed.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Tim Van Milligan suggestion for µP -- delay before showing last flight
Keith Packard [Wed, 12 Dec 2012 07:43:30 +0000 (23:43 -0800)]
altos: Tim Van Milligan suggestion for µP -- delay before showing last flight

This gives the user time to move their finger out of the way of the LED.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge branch 'micropeak-1.1'
Keith Packard [Tue, 11 Dec 2012 22:42:43 +0000 (14:42 -0800)]
Merge branch 'micropeak-1.1'

11 years agoaltos: Increase MicroPeak blink times a bit
Keith Packard [Tue, 11 Dec 2012 22:41:53 +0000 (14:41 -0800)]
altos: Increase MicroPeak blink times a bit

make the 0 longer (1 sec now), and make the time between digits longer
(also 1 sec now)

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge branch 'micropeak-1.1'
Keith Packard [Mon, 10 Dec 2012 02:33:31 +0000 (18:33 -0800)]
Merge branch 'micropeak-1.1'

11 years agoaltos: Use alt_t value to hold displayed height in micropeak micropeak-build-2012-12-09
Keith Packard [Mon, 10 Dec 2012 02:28:33 +0000 (18:28 -0800)]
altos: Use alt_t value to hold displayed height in micropeak

Heights are 32 bits (to get .1 meter resolution) in micropeak; make
sure we have enough bits while blinking out the computed value.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Make sure pa to altitude conversion is done with 32 bits
Keith Packard [Mon, 10 Dec 2012 02:27:49 +0000 (18:27 -0800)]
altos: Make sure pa to altitude conversion is done with 32 bits

We need 32 bits to hold intermediate values, even if the final
altitude is reported in only 16 bits.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Store altitude in 32-bits for MicroPeak
Keith Packard [Sun, 9 Dec 2012 22:32:35 +0000 (14:32 -0800)]
altos: Store altitude in 32-bits for MicroPeak

Needs all 32 bits to store .1 meter resolution

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Stop including profiling and stack guard code in megametrum
Keith Packard [Sat, 8 Dec 2012 06:49:34 +0000 (22:49 -0800)]
altos: Stop including profiling and stack guard code in megametrum

These take CPU time and memory and are intended only for debugging

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Fix aprs test to not allow callsign configuration
Keith Packard [Sat, 8 Dec 2012 01:38:17 +0000 (17:38 -0800)]
altos: Fix aprs test to not allow callsign configuration

There's no configuration to take a callsign from...

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Add APRS interval configuration to UI
Keith Packard [Sat, 8 Dec 2012 01:35:15 +0000 (17:35 -0800)]
altosui: Add APRS interval configuration to UI

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge branch 'master' into aprs
Keith Packard [Sat, 8 Dec 2012 01:34:10 +0000 (17:34 -0800)]
Merge branch 'master' into aprs

11 years agoaltosui: Call config UI from AltosConfigData directly
Keith Packard [Sat, 8 Dec 2012 01:27:48 +0000 (17:27 -0800)]
altosui: Call config UI from AltosConfigData directly

Don't make AltosConfig have a pile of config code, stick that in
AltosConfigData instead. This uses a new interface, AltosConfigValues
to get from AltosConfigData to the UI.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Use configured callsign in APRS packets
Keith Packard [Sat, 8 Dec 2012 01:20:02 +0000 (17:20 -0800)]
altos: Use configured callsign in APRS packets

Instead of hard-coding my own call sign...

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Make APRS interval configurable
Keith Packard [Sat, 8 Dec 2012 01:18:32 +0000 (17:18 -0800)]
altos: Make APRS interval configurable

This provides a separate configuration value for APRS, allowing the
interval between APRS reports to vary.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Fix up APRS packet sending code in cc1120 driver
Keith Packard [Fri, 7 Dec 2012 18:15:25 +0000 (10:15 -0800)]
altos: Fix up APRS packet sending code in cc1120 driver

This fixes the FIFO management, ensuring that the data are streamed
into the radio fast enough to keep the packet continuous. Sounds like
it works, but testing with an actual APRS receiver is required.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge branch 'master' into aprs
Keith Packard [Fri, 7 Dec 2012 18:14:11 +0000 (10:14 -0800)]
Merge branch 'master' into aprs

11 years agoaltos: fix functions calling pollchar to use 'int' to hold the value
Keith Packard [Fri, 7 Dec 2012 18:05:51 +0000 (10:05 -0800)]
altos: fix functions calling pollchar to use 'int' to hold the value

AO_READ_AGAIN doesn't fit in a char anymore now that stdio is 8-bit
clean, everyone using pollchar must use an 'int' variable to capture
the whole value from pollchar.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltosui: Use AltosConfigData for altosui configuration dialog
Keith Packard [Fri, 7 Dec 2012 16:32:22 +0000 (08:32 -0800)]
altosui: Use AltosConfigData for altosui configuration dialog

Instead of a separate config language parser, share with altoslib

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltoslib: Make AltosConfigData parse all of the config data
Keith Packard [Fri, 7 Dec 2012 01:08:39 +0000 (17:08 -0800)]
altoslib: Make AltosConfigData parse all of the config data

It was missing quite a few. This also speeds up parsing of config from
TeleScience, TeleBT and TeleTerra by not listing flight info on those
products (where it doesn't make sense).

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltoslib: Make AltosMs5607 capable of parsing ms5607 info lines
Keith Packard [Fri, 7 Dec 2012 01:07:25 +0000 (17:07 -0800)]
altoslib: Make AltosMs5607 capable of parsing ms5607 info lines

This moves the parsing from AltosMs5607Query

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Change 'flight-number' to 'current-flight'
Keith Packard [Fri, 7 Dec 2012 01:06:17 +0000 (17:06 -0800)]
altos: Change 'flight-number' to 'current-flight'

Avoids ambiguity with stored flight info, which starts lines with 'flight'.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Shrink 'ao_version' by calling printf fewer times
Keith Packard [Fri, 7 Dec 2012 00:29:36 +0000 (16:29 -0800)]
altos: Shrink 'ao_version' by calling printf fewer times

Each printf call costs quite a bit of code space on the cc1111, so
instead of making multiple short calls, make one longer one.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Send APRS packets even during ascent
Keith Packard [Thu, 6 Dec 2012 18:30:46 +0000 (10:30 -0800)]
altos: Send APRS packets even during ascent

If you're using APRS, presumably you want to watch the rocket going up too.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Allow telemetry, rdf and APRS to be individually controlled
Keith Packard [Thu, 6 Dec 2012 18:28:14 +0000 (10:28 -0800)]
altos: Allow telemetry, rdf and APRS to be individually controlled

But, only when APRS is available so that TeleMetrum and TeleMini don't
change behaviour

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Hook up APRS to telemetry loop
Keith Packard [Thu, 6 Dec 2012 18:23:39 +0000 (10:23 -0800)]
altos: Hook up APRS to telemetry loop

Send APRS packet once every 2 seconds

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Hook APRS up to the radio
Keith Packard [Thu, 6 Dec 2012 18:12:11 +0000 (10:12 -0800)]
altos: Hook APRS up to the radio

This adds an arbitrary-length packet writing function to the radio
code.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Prepare APRS for use within altos itself
Keith Packard [Thu, 6 Dec 2012 07:39:47 +0000 (23:39 -0800)]
altos: Prepare APRS for use within altos itself

Make all variables static, const-ify constants, change the public
name of the single entry point.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Start restructuring APRS code to create and send packets
Keith Packard [Thu, 6 Dec 2012 06:23:46 +0000 (22:23 -0800)]
altos: Start restructuring APRS code to create and send packets

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Remove a bunch of time bits from the APRS code
Keith Packard [Thu, 6 Dec 2012 05:37:47 +0000 (21:37 -0800)]
altos: Remove a bunch of time bits from the APRS code

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Remove APRS sine-wave table
Keith Packard [Thu, 6 Dec 2012 05:34:05 +0000 (21:34 -0800)]
altos: Remove APRS sine-wave table

We're generating a lovely square wave, which appears to be decoded
just fine thankyouverymuch.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: More APRS trimming
Keith Packard [Thu, 6 Dec 2012 05:25:29 +0000 (21:25 -0800)]
altos: More APRS trimming

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Remove more unused APRS code
Keith Packard [Thu, 6 Dec 2012 05:22:55 +0000 (21:22 -0800)]
altos: Remove more unused APRS code

Getting down to a reasonable amount of code.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Reduce printf calls in APRS packet generation
Keith Packard [Thu, 6 Dec 2012 05:13:37 +0000 (21:13 -0800)]
altos: Reduce printf calls in APRS packet generation

Merge all of the data into a single printf call

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Strip out everything but the basic position reporting from APRS
Keith Packard [Thu, 6 Dec 2012 05:08:19 +0000 (21:08 -0800)]
altos: Strip out everything but the basic position reporting from APRS

Any useful data will be sent over the digital link; APRS is strictly
for position tracking

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoSigned-off-by: Keith Packard <keithp@keithp.com>
Keith Packard [Thu, 6 Dec 2012 05:01:59 +0000 (21:01 -0800)]
Signed-off-by: Keith Packard <keithp@keithp.com>
altos: Switch APRS to standard position reporting form

Stop using NMEA sentences for position

11 years agoaltos: Add missing ao_aprs.h file
Keith Packard [Thu, 6 Dec 2012 04:11:35 +0000 (20:11 -0800)]
altos: Add missing ao_aprs.h file

This has defines for the planned APRS interface

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Generate all of the APRS messages
Keith Packard [Thu, 6 Dec 2012 04:10:54 +0000 (20:10 -0800)]
altos: Generate all of the APRS messages

Note that two of them are in NMEA form, which some receivers appear
not to parse

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add test scaffolding for APRS
Keith Packard [Thu, 6 Dec 2012 03:44:09 +0000 (19:44 -0800)]
altos: Add test scaffolding for APRS

This moves some test code out of ao_aprs.c and into ao_aprs_test.c,
and then adds Makefile fragments to compile and run the resulting
program, creating a wav file as output

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Make aprs code output encoded packets to stdout
Keith Packard [Thu, 6 Dec 2012 03:30:27 +0000 (19:30 -0800)]
altos: Make aprs code output encoded packets to stdout

This generates a .wav file containing a single APRS packet. This has
been tested and appears to be successfully decoded by an APRS receiver.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add Pico Beacon code as ao_aprs.c
Keith Packard [Wed, 5 Dec 2012 17:59:16 +0000 (09:59 -0800)]
altos: Add Pico Beacon code as ao_aprs.c

Pico Beacon hooks a GPS to an AD9954 DDS radio chip with a PIC. It
directly synthesizes the necessary AX.25 packets to do APRS
reporting. We're going to appropriate the code for use in Mega Metrum
to (optionally) broadcast APRS packets.

http://ad7zj.net/kd7lmo/aprsbeacon_code.html

Signed-off-by: Keith Packard <keithp@keithp.com>
(

11 years agoaltos: Break out GPS speed resetting sequence
Keith Packard [Tue, 4 Dec 2012 17:45:01 +0000 (09:45 -0800)]
altos: Break out GPS speed resetting sequence

To set the GPS speed, we delay for 1/2 sec, change speed, then delay
for another 1/2 sec.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: shrink ao_companion_status by merging printf calls
Keith Packard [Tue, 4 Dec 2012 17:43:56 +0000 (09:43 -0800)]
altos: shrink ao_companion_status by merging printf calls

Multiple printf calls are longer than one big one, so merge these
together to save some code space

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAnother ao-mega addition which shouldn't be here
Keith Packard [Tue, 4 Dec 2012 16:48:05 +0000 (08:48 -0800)]
Another ao-mega addition which shouldn't be here

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoao-tools. Oops, let 'ao-mega' slip into build.
Keith Packard [Tue, 4 Dec 2012 09:34:03 +0000 (01:34 -0800)]
ao-tools. Oops, let 'ao-mega' slip into build.

This is a tool to parse ao-mega eeprom files; not sure it'll be that
useful, and it's certainly not usable *yet*.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoao-sky-flash: Clean up debug printfs a bit
Keith Packard [Tue, 4 Dec 2012 09:30:39 +0000 (01:30 -0800)]
ao-sky-flash: Clean up debug printfs a bit

This makes debugging output a bit cleaner

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Make skytraq reflashing code try both 9600 and 4800 baud
Keith Packard [Sat, 1 Dec 2012 04:51:47 +0000 (20:51 -0800)]
altos: Make skytraq reflashing code try both 9600 and 4800 baud

This lets it communicate with the ROM code which boots at 4800 baud
instead of 9600 baud.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoao-tools: Add ao-sky-flash to update GPS firmware
Keith Packard [Sat, 1 Dec 2012 01:36:40 +0000 (17:36 -0800)]
ao-tools: Add ao-sky-flash to update GPS firmware

This uses a new feature of AltOS to directly connect the GPS chip to
the USB link to reprogram the former.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add support for reflashing skytraq GPS chips
Keith Packard [Sat, 1 Dec 2012 00:10:43 +0000 (16:10 -0800)]
altos: Add support for reflashing skytraq GPS chips

This simply switches the skytraq port to 115200 baud and then
essentially connects it directly to the USB port by forwarding bytes
in both directions.

Once started, the only way out is to reboot the board.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Expose GPS serial fifo on MegaMetrum
Keith Packard [Sat, 1 Dec 2012 00:08:41 +0000 (16:08 -0800)]
altos: Expose GPS serial fifo on MegaMetrum

Necessary for direct access by the GPS reflashing code

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add ao_task_minimize_latency to reduce IRQ delays
Keith Packard [Sat, 1 Dec 2012 00:05:19 +0000 (16:05 -0800)]
altos: Add ao_task_minimize_latency to reduce IRQ delays

When set, this causes the task switching code to avoid blocking IRQs
while looking for an idle task as that can increase IRQ latencies
enough to drop characters at 115200 baud on the cc1111. Note that this
*also* eliminates the ability to use low power modes as we cannot know
at any point whether some interrupt has come along and woken a task.

Has no effect when using task queues as those require IRQs to be
blocked while looking at the queue. Shouldn't be a problem there
though as the check for no running tasks is very cheap.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Use ao_xmemcpy in ao_log_telem.c
Keith Packard [Sat, 1 Dec 2012 00:04:24 +0000 (16:04 -0800)]
altos: Use ao_xmemcpy in ao_log_telem.c

This eliminates the libc generic version in TeleTerra

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Add support for 115200 baud serial rates
Keith Packard [Sat, 1 Dec 2012 00:03:45 +0000 (16:03 -0800)]
altos: Add support for 115200 baud serial rates

Necessary for flashing skytraq chips

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Make stdio 8-bit clean by making pollchar return int
Keith Packard [Sat, 1 Dec 2012 00:01:07 +0000 (16:01 -0800)]
altos: Make stdio 8-bit clean by making pollchar return int

We were stealing one value (0xff) in the return value from pollchar to
indicate 'not ready yet'. Instead of doing that, use the integer value
-1 and have pollchar return an int instead of a char. That
necessitated cleaning a few other bits to make sure that 0xff wouldn't
get promoted to -1 on accident.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoaltos: Share cc1111 reset/debug-start code
Keith Packard [Fri, 30 Nov 2012 23:10:59 +0000 (15:10 -0800)]
altos: Share cc1111 reset/debug-start code

These sequences are very similar, differing only in whether the dbg
clock line is toggled while holding reset low for a while.

Signed-off-by: Keith Packard <keithp@keithp.com>