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>
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>
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>
Move libaltos to top level

This will let it be shared by the new MicroPeak gui

Signed-off-by: Keith Packard <keithp@keithp.com>
Merge branch 'master' into micropeak-logging
Start building MicroPeak GUI tool

Download, save and analyze MicroPeak flight data

Signed-off-by: Keith Packard <keithp@keithp.com>
Add file chooser for MicroPeak

Needs reasonable directory tracking

Signed-off-by: Keith Packard <keithp@keithp.com>
update stlink-pins document to make it clear 4-pin MicroMaTch is our
standard STM32L programming connector, and the big MM thing was v0.1 only
Lots more work on the MicroPeak application

Signed-off-by: Keith Packard <keithp@keithp.com>
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>
altos: Fix MegaDongle CC1120 chip select pin

It's on A0, not C5

Signed-off-by: Keith Packard <keithp@gag.com>
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Merge remote-tracking branch 'origin/master' into micropeak-logging
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>
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>
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>
micropeak: Use altosuilib

This removes a pile of code stolen from altosui

Signed-off-by: Keith Packard <keithp@keithp.com>
micropeak: Add flight stats pane

Shows graph or stats in alternate panes

Signed-off-by: Keith Packard <keithp@keithp.com>
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>
Merge remote-tracking branch 'origin/master' into micropeak-logging