From: Keith Packard Date: Thu, 26 Apr 2018 06:07:46 +0000 (-0700) Subject: altoslib: Flush settings restoration commands after accel cal X-Git-Tag: 1.8.6~1^2~99 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=b3474fb33a58e78b3b8f36958dd44768e49f3edc;hp=0d691170a96545a9e57aad454de87541cea8c292 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 --- 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) {