From b3474fb33a58e78b3b8f36958dd44768e49f3edc Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 25 Apr 2018 23:07:46 -0700 Subject: [PATCH] altoslib: Flush settings restoration commands after accel cal To avoid mangling settings when the user doesn't 'save' things, restore the original accel cal values and orientation after finishing accelerometer calibration. Signed-off-by: Keith Packard --- altoslib/AltosAccelCal.java | 1 + 1 file changed, 1 insertion(+) diff --git a/altoslib/AltosAccelCal.java b/altoslib/AltosAccelCal.java index 03d9fbf2..75592d9e 100644 --- a/altoslib/AltosAccelCal.java +++ b/altoslib/AltosAccelCal.java @@ -183,6 +183,7 @@ public class AltosAccelCal implements Runnable { if (config_data.accel_cal_plus != AltosLib.MISSING && config_data.accel_cal_minus != AltosLib.MISSING) link.printf("c a %d %d\n", config_data.accel_cal_plus, config_data.accel_cal_minus); + link.flush_output(); stop_link(); } if (new_config != null) { -- 2.30.2