fw/altos
9 years agoaltoslib: Use GPS speed/height values when other sensors are missing
Keith Packard [Tue, 10 Jun 2014 18:31:53 +0000 (11:31 -0700)]
altoslib: Use GPS speed/height values when other sensors are missing

This lets TeleGPS report height/speed values without needing to
customize every AltosState user to pull out GPS values when the other
sensors aren't present.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosuilib: Split battery graph enable out from other adc enables
Keith Packard [Tue, 10 Jun 2014 18:30:36 +0000 (11:30 -0700)]
altosuilib: Split battery graph enable out from other adc enables

This lets TeleGPS just show the battery voltage values without also
adding enable lines for the other flight computer ADC values like
ignitor voltages.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: Check for time going backwards when replaying from file
Keith Packard [Tue, 10 Jun 2014 17:19:43 +0000 (10:19 -0700)]
altoslib: Check for time going backwards when replaying from file

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: Add new 'stateless' flight state for TeleGPS
Keith Packard [Tue, 10 Jun 2014 17:18:44 +0000 (10:18 -0700)]
altoslib: Add new 'stateless' flight state for TeleGPS

TeleGPS has no flight state, so add a new 'stateless' state for code
to handle this case differently than any of the existing states

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: TeleGPS no longer logs satellite information
Keith Packard [Tue, 10 Jun 2014 17:15:47 +0000 (10:15 -0700)]
altoslib: TeleGPS no longer logs satellite information

This doubles the amount of space available to log position information

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib/altosui/telegps: Switch TeleGPS config to motion/interval
Keith Packard [Tue, 10 Jun 2014 17:14:07 +0000 (10:14 -0700)]
altoslib/altosui/telegps: Switch TeleGPS config to motion/interval

TeleGPS had configurable boost-detect values; those have been replaced
with a configurable stop-tracking motion limit and logging/telemetry
interval value.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib/altosui/telegps: Change log size configuration
Keith Packard [Tue, 10 Jun 2014 17:11:03 +0000 (10:11 -0700)]
altoslib/altosui/telegps: Change log size configuration

* Use new log-space value provided by firmware when available.

* Divide that up into 1-8 flights and offer those sizes as options to
  the user instead of a fixed set of sizes.

* Show how many flights each selection will store

* This also checks values provided by the user

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Set TeleGPS default log size to half of avaiable memory
Keith Packard [Tue, 10 Jun 2014 16:55:04 +0000 (09:55 -0700)]
altos: Set TeleGPS default log size to half of avaiable memory

LPC11U14 doesn't have on-chip config space, so we're consuming a block
of external flash. As a result, only 1984kB are available for
logging. Set the default log size to half of that to store two flights.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Simplify tracker logic, removing boost detect
Keith Packard [Tue, 10 Jun 2014 16:52:15 +0000 (09:52 -0700)]
altos: Simplify tracker logic, removing boost detect

This removes the ao_flight_state value from the tracker code and makes
it simply log position information when the device has moved within
the last 10 log intervals. This also changes the configuration
parameters to define what 'motionless' means, and what interval to
configure the GPS receiver for, log data and send telemetry.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoRevert adding state to GPS location packets
Keith Packard [Tue, 10 Jun 2014 16:47:04 +0000 (09:47 -0700)]
Revert adding state to GPS location packets

TeleGPS no longer has ao_flight_state

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoRevert "ao-tools: Parse TeleGPS state value from gps location packet"
Keith Packard [Tue, 10 Jun 2014 16:44:57 +0000 (09:44 -0700)]
Revert "ao-tools: Parse TeleGPS state value from gps location packet"

This reverts commit 428d09294ba0395fedd71346ad00fd90a4cdde97.

9 years agoaltos: Make extra pyro channel firing time configurable
Keith Packard [Tue, 10 Jun 2014 16:42:43 +0000 (09:42 -0700)]
altos: Make extra pyro channel firing time configurable

This adds a 'I' parameter to set the extra pyro channel firing time
(in ticks). This has no effect on the main/drogue channels.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Report total available log space in version command
Keith Packard [Tue, 10 Jun 2014 16:37:43 +0000 (09:37 -0700)]
altos: Report total available log space in version command

This provides a more accurate means of determining available log space
than guessing whether some portion of the flash chip holds
configuration data.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoRevert "altos: Write current flight state to GPS data from GPS drivers"
Keith Packard [Tue, 10 Jun 2014 16:36:59 +0000 (09:36 -0700)]
Revert "altos: Write current flight state to GPS data from GPS drivers"

This reverts commit db6003d34595fbd103d5b131912b6a797254f1c5.

9 years agoRevert "altoslib: Parse TeleGPS state value from GPS telemetry packet"
Keith Packard [Sun, 8 Jun 2014 23:08:30 +0000 (16:08 -0700)]
Revert "altoslib: Parse TeleGPS state value from GPS telemetry packet"

This reverts commit d69547796caf74405f8304d23d4ae318315bbd7b.

9 years agoBump to version 1.3.2.4 1.3.2.4
Keith Packard [Sun, 8 Jun 2014 05:37:30 +0000 (22:37 -0700)]
Bump to version 1.3.2.4

9 years agoaltoslib: Recover battery voltage from TeleGPS configuration packet
Keith Packard [Sun, 8 Jun 2014 05:25:17 +0000 (22:25 -0700)]
altoslib: Recover battery voltage from TeleGPS configuration packet

TeleGPS stuffs battery voltage in the apogee_delay slot of the
configuration packet. Pull it out from there and stick it into the
current state.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: TeleMega uses 5.6k/10k divider for v_batt
Keith Packard [Sun, 8 Jun 2014 05:24:08 +0000 (22:24 -0700)]
altoslib: TeleMega uses 5.6k/10k divider for v_batt

I suspect the 15 and 27 values are a 'close approximation' for integer
work on the cc1111 devices

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Enable ADC for TeleGPS v1.0 battery voltage measuring
Keith Packard [Sun, 8 Jun 2014 05:23:19 +0000 (22:23 -0700)]
altos: Enable ADC for TeleGPS v1.0 battery voltage measuring

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Encode TeleGPS battery voltage in configuration packet
Keith Packard [Sun, 8 Jun 2014 04:57:43 +0000 (21:57 -0700)]
altos: Encode TeleGPS battery voltage in configuration packet

TeleGPS doesn't need apogee delay, so re-purpose it for the battery voltage

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: Parse TeleGPS state value from GPS telemetry packet
Keith Packard [Sun, 8 Jun 2014 04:13:40 +0000 (21:13 -0700)]
altoslib: Parse TeleGPS state value from GPS telemetry packet

TeleGPS adds 0x80 to the state value to signify that this otherwise
unused byte contains the current state value

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoao-tools: Parse TeleGPS state value from gps location packet
Keith Packard [Sun, 8 Jun 2014 04:12:44 +0000 (21:12 -0700)]
ao-tools: Parse TeleGPS state value from gps location packet

TeleGPS encodes state in a spare gps location packet byte, masking in
0x80 to signify that the state value is valid

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Make telegps builds depend on ao_tracker.h
Keith Packard [Sun, 8 Jun 2014 04:12:09 +0000 (21:12 -0700)]
altos: Make telegps builds depend on ao_tracker.h

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Reduce tracker GPS buffer to 4 samples
Keith Packard [Sun, 8 Jun 2014 04:11:33 +0000 (21:11 -0700)]
altos: Reduce tracker GPS buffer to 4 samples

We just don't have enough RAM for 8 samples.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Define lat/lon sum variables as 64-bit instead of 16
Keith Packard [Sun, 8 Jun 2014 04:05:01 +0000 (21:05 -0700)]
altos: Define lat/lon sum variables as 64-bit instead of 16

Oops. 16 bits won't hold position information...

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Use 0x80 to indicate valid state value in the GPS location packet
Keith Packard [Sun, 8 Jun 2014 04:02:26 +0000 (21:02 -0700)]
altos: Use 0x80 to indicate valid state value in the GPS location packet

And only set this for tracker products; other products place state in
separate state packets

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoSet version to 1.3.2.3 1.3.2.3
Keith Packard [Sat, 7 Jun 2014 19:17:46 +0000 (12:17 -0700)]
Set version to 1.3.2.3

Mayhem 2014 Saturday 2014-6-7

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Track graph windows as one of the TeleGPS windows
Keith Packard [Sat, 7 Jun 2014 18:52:28 +0000 (11:52 -0700)]
telegps: Track graph windows as one of the TeleGPS windows

TeleGPS exits when the number of windows goes to zero; track graphing
windows in addition to the usual flight monitoring windows.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosuilib: Fix crash when initializing site map cache
Keith Packard [Sat, 7 Jun 2014 18:50:42 +0000 (11:50 -0700)]
altosuilib: Fix crash when initializing site map cache

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosuilib: Add GPS altitude as a possible graph value
Keith Packard [Sat, 7 Jun 2014 18:50:04 +0000 (11:50 -0700)]
altosuilib: Add GPS altitude as a possible graph value

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosuilib: Show GPS instead of (missing) flight data for TeleGPS graphs
Keith Packard [Sat, 7 Jun 2014 18:49:14 +0000 (11:49 -0700)]
altosuilib: Show GPS instead of (missing) flight data for TeleGPS graphs

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: Record whether flight data includes sensor values in AltosFlightStats
Keith Packard [Sat, 7 Jun 2014 18:47:11 +0000 (11:47 -0700)]
altoslib: Record whether flight data includes sensor values in AltosFlightStats

Provide a way to elide the usual flight data from a graph for TeleGPS

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: Add TeleGPS log parsing code
Keith Packard [Sat, 7 Jun 2014 18:46:32 +0000 (11:46 -0700)]
altoslib:  Add TeleGPS log parsing code

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: All products with logging have the 'l' command
Keith Packard [Sat, 7 Jun 2014 18:44:55 +0000 (11:44 -0700)]
altoslib: All products with logging have the 'l' command

Instead of listing products with the 'l' command, just exclude
products that don't have logging from using the 'l' command to collect
the number of stored flights.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Switch TeleGPS to GPS logging format
Keith Packard [Sat, 7 Jun 2014 18:44:07 +0000 (11:44 -0700)]
altos: Switch TeleGPS to GPS logging format

It's customized for TeleGPS uses

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Update other CONFIG_EEPROM users to set LOG_ERASE_MARK
Keith Packard [Sat, 7 Jun 2014 18:41:59 +0000 (11:41 -0700)]
altos: Update other CONFIG_EEPROM users to set LOG_ERASE_MARK

All products placing config and erase marks in on-CPU EEPROM needs to
configure the erase code correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Write tracker logging from tracker thread directly
Keith Packard [Sat, 7 Jun 2014 18:40:41 +0000 (11:40 -0700)]
altos: Write tracker logging from tracker thread directly

Also, logs 8 pre-launch GPS packets so we can get the ground position.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Write current flight state to GPS data from GPS drivers
Keith Packard [Sat, 7 Jun 2014 18:39:10 +0000 (11:39 -0700)]
altos: Write current flight state to GPS data from GPS drivers

This will be useful with TeleGPS which has no other packet containing
flight state.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Add TeleGPS logging format
Keith Packard [Sat, 7 Jun 2014 18:34:29 +0000 (11:34 -0700)]
altos: Add TeleGPS logging format

This is mostly like the mega format, but places the flight state in a
spare byte of the GPS data and writes the gps starting location to the
flight packet.

Log data is written by the main tracker thread; there's no reason for
a separate thread given the GPS update rate and the lack of flight
controls. This means ao_log_gps has an API to be called from there,
rather than a thread to run.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/telemega-v1.0: Adjust config params to make flight erase work
Keith Packard [Sat, 7 Jun 2014 18:01:14 +0000 (11:01 -0700)]
altos/telemega-v1.0: Adjust config params to make flight erase work

Flight erase records are supposed to be written after the ao_config to
eeprom in telemega. They were getting written in the middle of one of
the pyro channel config blocks. Put a bunch of space between the two
by making the config max 1024 bytes instead of 128 bytes.

Set the log erase marker to 0x55 -- eeprom comes from the factory as
0x00, so we use any value other than 0x55 to indicate 'unused' erase
slots.

Save space for more flight erase blocks; we've  got plenty.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Clear out eeprom erase records when writing entry 0
Keith Packard [Sat, 7 Jun 2014 17:54:14 +0000 (10:54 -0700)]
altos: Clear out eeprom erase records when writing entry 0

When writing config/erase to eeprom, there's no 'erase' operation as
on-chip eeprom is writable at a byte level. As such, we can't tell
when the erase blocks get reset when the config gets written. When
this happens, erase block 0 gets written explicitly, so just use that
call to trigger explicit erasing of the data.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Allow value other than 0 for marking erased flights
Keith Packard [Sat, 7 Jun 2014 17:09:51 +0000 (10:09 -0700)]
altos: Allow value other than 0 for marking erased flights

on-chip eeprom doesn't erase to 0xff, so let TeleMega use a different
value.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Allow AO_CONFIG_MAX_SIZE to be configured. Validate it.
Keith Packard [Sat, 7 Jun 2014 17:05:21 +0000 (10:05 -0700)]
altos: Allow AO_CONFIG_MAX_SIZE to be configured. Validate it.

TeleMega config is 200 bytes. AO_CONFIG_MAX_SIZE was 128. That didn't
work out well when logging erased flight information. Allow TeleMega
to use a larger value (1k), and then do a compiler hack to make sure
the defined value is at least as large as the ao_config structure.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Move ao_tracker.c to kernel
Keith Packard [Sat, 7 Jun 2014 14:41:11 +0000 (07:41 -0700)]
altos: Move ao_tracker.c to kernel

Doesn't make sense to be in product

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Add telegps-v1.0 code and loader 1.3.2.2
Keith Packard [Fri, 6 Jun 2014 04:42:10 +0000 (21:42 -0700)]
altos: Add telegps-v1.0 code and loader

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/telegps-v0.3: Remove ao_flight_number from main program
Keith Packard [Fri, 6 Jun 2014 04:40:39 +0000 (21:40 -0700)]
altos/telegps-v0.3: Remove ao_flight_number from main program

We've got logging enabled now

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/telegps-v0.3: Disable APRS by default. Set log max to 1M
Keith Packard [Fri, 6 Jun 2014 04:39:50 +0000 (21:39 -0700)]
altos/telegps-v0.3: Disable APRS by default. Set log max to 1M

And adjust default radio cal to be a bit closer

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Force telemetry on by default for v0.3 TeleGPS boards
Keith Packard [Fri, 6 Jun 2014 04:37:38 +0000 (21:37 -0700)]
altos: Force telemetry on by default for v0.3 TeleGPS boards

These don't have a USB connect indicator, so just turn on telemetry by
default

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/lpc: HAS_USB_CONNECT has been changed to mean a custom pin
Keith Packard [Fri, 6 Jun 2014 04:36:16 +0000 (21:36 -0700)]
altos/lpc: HAS_USB_CONNECT has been changed to mean a custom pin

The LPC stuff isn't actually very useful and TeleGPS uses a custom pin
instead, and was using HAS_USB_CONNECT to mean the same thing. That
wasn't good.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Fix config to set default log size for all devices with log
Keith Packard [Fri, 6 Jun 2014 04:35:41 +0000 (21:35 -0700)]
altos: Fix config to set default log size for all devices with log

Not just devices with flight

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Add AO_LOG_FLIGHT packet to TeleGPS logs
Keith Packard [Fri, 6 Jun 2014 01:55:26 +0000 (18:55 -0700)]
altos: Add AO_LOG_FLIGHT packet to TeleGPS logs

This encodes the flight number for tracking of data files.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos/telegps-v0.3: Add tracker task
Keith Packard [Fri, 6 Jun 2014 01:49:59 +0000 (18:49 -0700)]
altos/telegps-v0.3: Add tracker task

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Add debug to tracker to force launch
Keith Packard [Fri, 6 Jun 2014 01:49:01 +0000 (18:49 -0700)]
altos: Add debug to tracker to force launch

This lets us test the move from pad to drogue state

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: tracker distance computation flipped arguments around
Keith Packard [Fri, 6 Jun 2014 01:47:27 +0000 (18:47 -0700)]
altos: tracker distance computation flipped arguments around

ao_distance takes (lat, lon, lat, lon) not (lat, lat, lon, lon)

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Fix tracker start state
Keith Packard [Fri, 6 Jun 2014 01:45:18 +0000 (18:45 -0700)]
altos: Fix tracker start state

Make sure log can start by scanning existing logs
Enable RDF by default
Turn off telemetry until we decide whether to turn it on in the loop
Allow TeleGPS v0.3 to run without ADC

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Stick flight state in GPS location packets
Keith Packard [Fri, 6 Jun 2014 01:44:26 +0000 (18:44 -0700)]
altos: Stick flight state in GPS location packets

Useful for TeleGPS

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Have tracker average 5 GPS samples before moving to pad mode
Keith Packard [Fri, 6 Jun 2014 01:35:45 +0000 (18:35 -0700)]
altos: Have tracker average 5 GPS samples before moving to pad mode

Avoids early GPS noise right after lock

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Change tracker not-moving speed to 2m/s and document
Keith Packard [Fri, 6 Jun 2014 01:33:33 +0000 (18:33 -0700)]
altos: Change tracker not-moving speed to 2m/s and document

Just adjust to avoid sensing motion from GPS noise

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: ao_distance was overflowing when checking for longitude wrap
Keith Packard [Fri, 6 Jun 2014 01:31:06 +0000 (18:31 -0700)]
altos: ao_distance was overflowing when checking for longitude wrap

Need to shift everyone right one bit to fit in 32 bits

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Allow cc115l driver to be built without radio power control
Keith Packard [Fri, 6 Jun 2014 00:24:57 +0000 (17:24 -0700)]
altos: Allow cc115l driver to be built without radio power control

TeleGPS just wants full power, so remove the configuration option

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Include sensor logging task only on flight boards
Keith Packard [Fri, 6 Jun 2014 00:14:28 +0000 (17:14 -0700)]
altos: Include sensor logging task only on flight boards

This lets TeleGPS use the logging infrastructure without wasting a
task to log sensor data

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Add tracker task for TeleGPS
Keith Packard [Fri, 6 Jun 2014 00:12:06 +0000 (17:12 -0700)]
altos: Add tracker task for TeleGPS

This replaces the flight code to monitor GPS state and switch flight
states between startup/pad/drogue

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Add ao_distance.c to compute cartesian distances on the globe
Keith Packard [Fri, 6 Jun 2014 00:10:28 +0000 (17:10 -0700)]
altos: Add ao_distance.c to compute cartesian distances on the globe

This is not a great circle distance, but should be good enough for
points reasonably close together

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Update icon and icon building
Keith Packard [Thu, 5 Jun 2014 23:52:36 +0000 (16:52 -0700)]
telegps: Update icon and icon building

Switch to satellite icon, build the osx and windows icons.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosuilib: Let the user hand-edit the preload map radius
Keith Packard [Thu, 5 Jun 2014 23:50:29 +0000 (16:50 -0700)]
altosuilib: Let the user hand-edit the preload map radius

In case they want more than 5

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agodoc: Create release notes for version 1.4
Keith Packard [Tue, 3 Jun 2014 06:43:54 +0000 (23:43 -0700)]
doc: Create release notes for version 1.4

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Trap AltosConfigDataException in telegps config
Keith Packard [Tue, 3 Jun 2014 05:59:23 +0000 (22:59 -0700)]
telegps: Trap AltosConfigDataException in telegps config

This was added for pyro configuration errors in AltosUI

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltoslib: Add missing AltosConfigDataException file
Keith Packard [Tue, 3 Jun 2014 05:23:31 +0000 (22:23 -0700)]
altoslib: Add missing AltosConfigDataException file

9 years agoaltosui: Display error message when parsing pyro channel values fails
Keith Packard [Tue, 3 Jun 2014 05:07:39 +0000 (22:07 -0700)]
altosui: Display error message when parsing pyro channel values fails

Build an exception handling chain to get numeric parse errors
propagated all the way back to the original 'save' command and up into
a dialog window, including the pyro channel, field and value that were
in error.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosui: Fix pyro channel value formatting
Keith Packard [Tue, 3 Jun 2014 05:06:22 +0000 (22:06 -0700)]
altosui: Fix pyro channel value formatting

Was using %6.1f for 1 and 2 fraction digit values as the
conditional structure for figuring out which format to use was
broken.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Fetch/store only 8 bits for pyro state values
Keith Packard [Tue, 3 Jun 2014 05:05:11 +0000 (22:05 -0700)]
altos: Fetch/store only 8 bits for pyro state values

These fields are uint8_t, not int16_t. Fetching and storing 16 bits is
a bad idea.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Maximum pyro configuration parameter has 4 bytes in the name
Keith Packard [Tue, 3 Jun 2014 05:04:11 +0000 (22:04 -0700)]
altos: Maximum pyro configuration parameter has 4 bytes in the name

"f>=" needs four bytes, not just three to store the whole string. If
we only store three, then we never manage to compare correctly as the
null terminating byte is missing.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Configuring pyro channels can use more than 48 characters
Keith Packard [Tue, 3 Jun 2014 05:03:26 +0000 (22:03 -0700)]
altos: Configuring pyro channels can use more than 48 characters

Increase the command buffer from 48 to 128 bytes to hold the longest
pyro configuration commands

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Allow sparse GPS data logging for TeleGPS
Keith Packard [Sat, 31 May 2014 00:27:10 +0000 (17:27 -0700)]
altos: Allow sparse GPS data logging for TeleGPS

When the device hasn't moved for a while, stop logging data. Start as
soon as it moves again.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Test APRS altitude encoding
Keith Packard [Sat, 31 May 2014 00:30:08 +0000 (17:30 -0700)]
altos: Test APRS altitude encoding

Verify fixed point version against naïve implementation

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltos: Switch APRS altitude encoding computation to fixed point
Keith Packard [Sat, 31 May 2014 00:24:51 +0000 (17:24 -0700)]
altos: Switch APRS altitude encoding computation to fixed point

APRS altitude is logarithmically encoded, so this implementation
includes a fixed point log-base-2 function along with a bit of other
fixed point stuff. This eliminates all floating point from TeleGPS,
saving around 4kB of code space.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Add config for tracker starting distances
Keith Packard [Sat, 31 May 2014 00:17:42 +0000 (17:17 -0700)]
telegps: Add config for tracker starting distances

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Fixup windows fat build harder
Keith Packard [Fri, 30 May 2014 05:03:48 +0000 (22:03 -0700)]
telegps: Fixup windows fat build harder

9 years agoTeleGPS firmware isn't quite ready, don't include in windows fat build yet
Keith Packard [Fri, 30 May 2014 04:48:11 +0000 (21:48 -0700)]
TeleGPS firmware isn't quite ready, don't include in windows fat build yet

9 years agoCapture windows build error messages
Keith Packard [Fri, 30 May 2014 04:37:53 +0000 (21:37 -0700)]
Capture windows build error messages

9 years agotelegps: Add missing TeleGPSGraphUI.java file
Keith Packard [Thu, 29 May 2014 23:39:26 +0000 (16:39 -0700)]
telegps: Add missing TeleGPSGraphUI.java file

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoBuild telegps distribution bits with 'make fat'
Keith Packard [Thu, 29 May 2014 21:40:39 +0000 (14:40 -0700)]
Build telegps distribution bits with 'make fat'

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Add graph display
Keith Packard [Thu, 29 May 2014 21:36:14 +0000 (14:36 -0700)]
telegps: Add graph display

Moved the altosui graph files to altosuilib and fixed things up.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agojava: Refactor AltosFlightDisplay units and font update handling
Keith Packard [Thu, 29 May 2014 21:03:58 +0000 (14:03 -0700)]
java: Refactor AltosFlightDisplay units and font update handling

Make AltosFlightDisplay explicitly implement AltosFontListener and
AltosUnitsListener interfaces to make everyone use the same API. Then,
actually go implement units listeners so that changing units updates
all of the active displays immediately

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Add info table
Keith Packard [Thu, 29 May 2014 17:16:15 +0000 (10:16 -0700)]
telegps: Add info table

Move a couple of files from altosui to altosuilib, hook up the info
table after changing it to implement the AltosFlightDisplay interface

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Add flash device functionality
Keith Packard [Thu, 29 May 2014 05:53:06 +0000 (22:53 -0700)]
telegps: Add flash device functionality

Move bits from altosui to altosuilib and use those.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Auto-connect to any base stations plugged in at startup
Keith Packard [Thu, 29 May 2014 05:45:23 +0000 (22:45 -0700)]
telegps: Auto-connect to any base stations plugged in at startup

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Don't try to ship TeleGPS firmware yet
Keith Packard [Thu, 29 May 2014 05:06:43 +0000 (22:06 -0700)]
telegps: Don't try to ship TeleGPS firmware yet

It's not quite ready. Instead, ship TBT and TD firmware.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Add 'Info' tab
Keith Packard [Thu, 29 May 2014 04:56:52 +0000 (21:56 -0700)]
telegps: Add 'Info' tab

This contains a summary of the tracking info, including position,
speed and course.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Hook up data download dialog
Keith Packard [Thu, 29 May 2014 03:58:01 +0000 (20:58 -0700)]
telegps: Hook up data download dialog

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Add scan UI
Keith Packard [Thu, 29 May 2014 03:48:59 +0000 (20:48 -0700)]
telegps: Add scan UI

Move scan UI bits into altosuilib, allow telegps to not show telemetry
format options.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Add preferences dialog
Keith Packard [Thu, 29 May 2014 03:24:04 +0000 (20:24 -0700)]
telegps: Add preferences dialog

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Add device configuration dialogs
Keith Packard [Thu, 29 May 2014 03:19:44 +0000 (20:19 -0700)]
telegps: Add device configuration dialogs

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Use altosui's Instdrv NSIS plugin for telegps
Keith Packard [Thu, 29 May 2014 03:00:10 +0000 (20:00 -0700)]
telegps: Use altosui's Instdrv NSIS plugin for telegps

Instead of copying it, just point at it

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Working towards building fat versions of telegps application
Keith Packard [Thu, 29 May 2014 02:50:52 +0000 (19:50 -0700)]
telegps: Working towards building fat versions of telegps application

Lots more of the bits necessary for windows/macosx

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agodoc: Add outline of TeleGPS doc
Keith Packard [Thu, 29 May 2014 02:45:01 +0000 (19:45 -0700)]
doc: Add outline of TeleGPS doc

No actual content, mostly a place holder to make the build work

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoMark version 1.3.2.2
Keith Packard [Thu, 29 May 2014 02:44:21 +0000 (19:44 -0700)]
Mark version 1.3.2.2

Preliminary 1.3.3 version (1.4?)

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agotelegps: Add first version of telegps
Keith Packard [Wed, 28 May 2014 23:08:30 +0000 (16:08 -0700)]
telegps: Add first version of telegps

Not much implemented yet, but a shell of the UI and the map

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoaltosui/altosuilib: Shuffle lots more code from altosui into
Keith Packard [Wed, 28 May 2014 23:06:14 +0000 (16:06 -0700)]
altosui/altosuilib: Shuffle lots more code from altosui into
altosuilib

All of the bluetooth management stuff, and AltosSerial.

Signed-off-by: Keith Packard <keithp@keithp.com>
9 years agoDocument the need for ~/altusmetrumllc/google-maps-api-key
Keith Packard [Wed, 28 May 2014 17:43:09 +0000 (10:43 -0700)]
Document the need for ~/altusmetrumllc/google-maps-api-key

Stick this in Releasing

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