From 0b0b359cbce6b818257b44b2a6aee0edcbaee40d Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 2 May 2016 16:13:53 -0700 Subject: altoslib: Deal with TeleMetrum v2.0 MMA6555 being inverted 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 --- altoslib/AltosStateUpdate.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'altoslib/AltosStateUpdate.java') diff --git a/altoslib/AltosStateUpdate.java b/altoslib/AltosStateUpdate.java index cfc010a1..12d4dd41 100644 --- a/altoslib/AltosStateUpdate.java +++ b/altoslib/AltosStateUpdate.java @@ -18,5 +18,5 @@ package org.altusmetrum.altoslib_10; public interface AltosStateUpdate { - public void update_state(AltosState state) throws InterruptedException; -} \ No newline at end of file + public void update_state(AltosState state) throws InterruptedException, AltosUnknownProduct; +} -- cgit v1.2.3