altoslib: Deal with TeleMetrum v2.0 MMA6555 being inverted
authorKeith Packard <keithp@keithp.com>
Mon, 2 May 2016 23:13:53 +0000 (16:13 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 2 May 2016 23:18:54 +0000 (16:18 -0700)
Dumping the MMA655X data with the 'A' command provides the raw sensor
value. On TM v2.0 boards, the sensor is inverted, and all of the
firmware uses the inverted value except for the 'dump the raw data'
command. As a result, MonitorIdle was using the un-inverted value and
displaying mystic values.

I've fixed this in the ground station code by checking the product
name and conditionally inverting the value (4095 - value) for
TeleMetrum v2.0 products. Unknown products will generate a warning
dialog on AltosUI so we'll catch places where we've failed to add a
new product name.

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

No differences found