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 <keithp@keithp.com>
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) {