diff options
| author | Bdale Garbee <bdale@gag.com> | 2017-09-18 20:35:00 -0600 | 
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2017-09-18 20:35:00 -0600 | 
| commit | b12e982259817328e348f1aaa91c5c824891e7b9 (patch) | |
| tree | 52ae2d2068fd637dd03938d592e8a7492e49ab9f /altoslib/AltosConfigData.java | |
| parent | b1cf0dab1e28433e06ab02cec033951ea0149ea3 (diff) | |
| parent | e87d56b665ca30a3e5920c23cd60c99b84341aa2 (diff) | |
Merge branch 'master' into branch-1.8
Diffstat (limited to 'altoslib/AltosConfigData.java')
| -rw-r--r-- | altoslib/AltosConfigData.java | 12 | 
1 files changed, 10 insertions, 2 deletions
diff --git a/altoslib/AltosConfigData.java b/altoslib/AltosConfigData.java index 63c34310..dc036867 100644 --- a/altoslib/AltosConfigData.java +++ b/altoslib/AltosConfigData.java @@ -405,7 +405,7 @@ public class AltosConfigData {  		/* HAS_GYRO */  		try { -			if (line.startsWith("IMU call along")) { +			if (line.startsWith("IMU cal along")) {  				String[] bits = line.split("\\s+");  				if (bits.length >= 8) {  					accel_zero_along = Integer.parseInt(bits[3]); @@ -525,6 +525,12 @@ public class AltosConfigData {  		if (pad_orientation != AltosLib.MISSING)  			pad_orientation = source.pad_orientation(); +		if (accel_cal_plus != AltosLib.MISSING) +			accel_cal_plus = source.accel_cal_plus(); + +		if (accel_cal_minus != AltosLib.MISSING) +			accel_cal_minus = source.accel_cal_minus(); +  		/* HAS_LOG */  		if (flight_log_max != AltosLib.MISSING)  			flight_log_max = source.flight_log_max(); @@ -592,6 +598,7 @@ public class AltosConfigData {  		dest.set_flight_log_max(flight_log_max);  		dest.set_ignite_mode(ignite_mode);  		dest.set_pad_orientation(pad_orientation); +		dest.set_accel_cal(accel_cal_plus, accel_cal_minus);  		dest.set_callsign(callsign);  		if (npyro != AltosLib.MISSING)  			dest.set_pyros(pyros); @@ -669,9 +676,10 @@ public class AltosConfigData {  			link.printf("c e %d\n", radio_enable);  		/* HAS_ACCEL */ -		/* UI doesn't support accel cal */  		if (pad_orientation != AltosLib.MISSING)  			link.printf("c o %d\n", pad_orientation); +		if (accel_cal_plus != AltosLib.MISSING && accel_cal_minus != AltosLib.MISSING) +			link.printf("c a %d %d\n", accel_cal_plus, accel_cal_minus);  		/* HAS_LOG */  		if (flight_log_max != 0)  | 
