Skip to content

Commit 7d5e19f

Browse files
committed
fix(configuration sequence): do not blindly import batt monitor settings from FC
1 parent e46fc10 commit 7d5e19f

4 files changed

Lines changed: 36 additions & 16 deletions

File tree

ardupilot_methodic_configurator/configuration_steps_ArduCopter.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@
237237
},
238238
"delete_parameters": {
239239
"ESC_HW_POLES": {},
240+
"KDE_NPOLE": {},
240241
"SERVO_BLH_POLES": {},
241242
"SERVO_FTW_POLES": {}
242243
},
@@ -256,10 +257,7 @@
256257
"auto_changed_by": "",
257258
"derived_parameters": {
258259
"BATT_MONITOR": { "New Value": "vehicle_components['Battery Monitor']['FC Connection']['Protocol']", "Change Reason": "Selected in component editor window" },
259-
"BATT_I2C_BUS": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] in ['I2C1', 'I2C2', 'I2C3', 'I2C4']", "New Value": "1 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C2' else 2 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C3' else 3 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C4' else 0", "Change Reason": "Selected in component editor window" },
260-
"BATT_AMP_OFFSET": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'Analog'" },
261-
"BATT_AMP_PERVLT": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'Analog'" },
262-
"BATT_VOLT_MULT": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'Analog'" }
260+
"BATT_I2C_BUS": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] in ['I2C1', 'I2C2', 'I2C3', 'I2C4']", "New Value": "1 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C2' else 2 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C3' else 3 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C4' else 0", "Change Reason": "Selected in component editor window" }
263261
},
264262
"delete_parameters": {
265263
"BATT_I2C_BUS": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] not in ['I2C1', 'I2C2', 'I2C3', 'I2C4']" },
@@ -487,6 +485,13 @@
487485
"MOT_PWM_MAX": { "if": "vehicle_components['ESC']['FC->ESC Connection']['Protocol'] not in ['Normal', 'Brushed', 'PWMAngle', 'PWMRange']", "New Value": "2000", "Change Reason": "Digital ESC protocol maximum is per definition 2000" },
488486
"MOT_PWM_MIN": { "if": "vehicle_components['ESC']['FC->ESC Connection']['Protocol'] not in ['Normal', 'Brushed', 'PWMAngle', 'PWMRange']", "New Value": "1000", "Change Reason": "Digital ESC protocol minimum is per definition 1000" }
489487
},
488+
"delete_parameters": {
489+
"ESC_HW_POLES": {},
490+
"KDE_NPOLE": {},
491+
"SERVO_BLH_POLES": {},
492+
"SERVO_BLH_TRATE": {},
493+
"SERVO_FTW_POLES": {}
494+
},
490495
"old_filenames": ["14_motor.param", "15_motor.param"],
491496
"plugin": {
492497
"name": "motor_test",

ardupilot_methodic_configurator/configuration_steps_ArduPlane.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@
237237
},
238238
"delete_parameters": {
239239
"ESC_HW_POLES": {},
240+
"KDE_NPOLE": {},
240241
"SERVO_BLH_POLES": {},
241242
"SERVO_FTW_POLES": {}
242243
},
@@ -256,10 +257,7 @@
256257
"auto_changed_by": "",
257258
"derived_parameters": {
258259
"BATT_MONITOR": { "New Value": "vehicle_components['Battery Monitor']['FC Connection']['Protocol']", "Change Reason": "Selected in component editor window" },
259-
"BATT_I2C_BUS": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] in ['I2C1', 'I2C2', 'I2C3', 'I2C4']", "New Value": "1 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C2' else 2 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C3' else 3 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C4' else 0", "Change Reason": "Selected in component editor window" },
260-
"BATT_AMP_OFFSET": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'Analog'" },
261-
"BATT_AMP_PERVLT": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'Analog'" },
262-
"BATT_VOLT_MULT": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'Analog'" }
260+
"BATT_I2C_BUS": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] in ['I2C1', 'I2C2', 'I2C3', 'I2C4']", "New Value": "1 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C2' else 2 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C3' else 3 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C4' else 0", "Change Reason": "Selected in component editor window" }
263261
},
264262
"delete_parameters": {
265263
"BATT_I2C_BUS": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] not in ['I2C1', 'I2C2', 'I2C3', 'I2C4']" },
@@ -487,6 +485,13 @@
487485
"MOT_PWM_MAX": { "if": "vehicle_components['ESC']['FC->ESC Connection']['Protocol'] not in ['Normal', 'Brushed', 'PWMAngle', 'PWMRange']", "New Value": "2000", "Change Reason": "Digital ESC protocol maximum is per definition 2000" },
488486
"MOT_PWM_MIN": { "if": "vehicle_components['ESC']['FC->ESC Connection']['Protocol'] not in ['Normal', 'Brushed', 'PWMAngle', 'PWMRange']", "New Value": "1000", "Change Reason": "Digital ESC protocol minimum is per definition 1000" }
489487
},
488+
"delete_parameters": {
489+
"ESC_HW_POLES": {},
490+
"KDE_NPOLE": {},
491+
"SERVO_BLH_POLES": {},
492+
"SERVO_BLH_TRATE": {},
493+
"SERVO_FTW_POLES": {}
494+
},
490495
"old_filenames": ["14_motor.param", "15_motor.param"],
491496
"plugin": {
492497
"name": "motor_test",

ardupilot_methodic_configurator/configuration_steps_Heli.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@
237237
},
238238
"delete_parameters": {
239239
"ESC_HW_POLES": {},
240+
"KDE_NPOLE": {},
240241
"SERVO_BLH_POLES": {},
241242
"SERVO_FTW_POLES": {}
242243
},
@@ -256,10 +257,7 @@
256257
"auto_changed_by": "",
257258
"derived_parameters": {
258259
"BATT_MONITOR": { "New Value": "vehicle_components['Battery Monitor']['FC Connection']['Protocol']", "Change Reason": "Selected in component editor window" },
259-
"BATT_I2C_BUS": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] in ['I2C1', 'I2C2', 'I2C3', 'I2C4']", "New Value": "1 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C2' else 2 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C3' else 3 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C4' else 0", "Change Reason": "Selected in component editor window" },
260-
"BATT_AMP_OFFSET": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'Analog'" },
261-
"BATT_AMP_PERVLT": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'Analog'" },
262-
"BATT_VOLT_MULT": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'Analog'" }
260+
"BATT_I2C_BUS": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] in ['I2C1', 'I2C2', 'I2C3', 'I2C4']", "New Value": "1 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C2' else 2 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C3' else 3 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C4' else 0", "Change Reason": "Selected in component editor window" }
263261
},
264262
"delete_parameters": {
265263
"BATT_I2C_BUS": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] not in ['I2C1', 'I2C2', 'I2C3', 'I2C4']" },
@@ -487,6 +485,13 @@
487485
"MOT_PWM_MAX": { "if": "vehicle_components['ESC']['FC->ESC Connection']['Protocol'] not in ['Normal', 'Brushed', 'PWMAngle', 'PWMRange']", "New Value": "2000", "Change Reason": "Digital ESC protocol maximum is per definition 2000" },
488486
"MOT_PWM_MIN": { "if": "vehicle_components['ESC']['FC->ESC Connection']['Protocol'] not in ['Normal', 'Brushed', 'PWMAngle', 'PWMRange']", "New Value": "1000", "Change Reason": "Digital ESC protocol minimum is per definition 1000" }
489487
},
488+
"delete_parameters": {
489+
"ESC_HW_POLES": {},
490+
"KDE_NPOLE": {},
491+
"SERVO_BLH_POLES": {},
492+
"SERVO_BLH_TRATE": {},
493+
"SERVO_FTW_POLES": {}
494+
},
490495
"old_filenames": ["14_motor.param", "15_motor.param"],
491496
"plugin": {
492497
"name": "motor_test",

ardupilot_methodic_configurator/configuration_steps_Rover.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@
237237
},
238238
"delete_parameters": {
239239
"ESC_HW_POLES": {},
240+
"KDE_NPOLE": {},
240241
"SERVO_BLH_POLES": {},
241242
"SERVO_FTW_POLES": {}
242243
},
@@ -256,10 +257,7 @@
256257
"auto_changed_by": "",
257258
"derived_parameters": {
258259
"BATT_MONITOR": { "New Value": "vehicle_components['Battery Monitor']['FC Connection']['Protocol']", "Change Reason": "Selected in component editor window" },
259-
"BATT_I2C_BUS": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] in ['I2C1', 'I2C2', 'I2C3', 'I2C4']", "New Value": "1 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C2' else 2 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C3' else 3 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C4' else 0", "Change Reason": "Selected in component editor window" },
260-
"BATT_AMP_OFFSET": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'Analog'" },
261-
"BATT_AMP_PERVLT": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'Analog'" },
262-
"BATT_VOLT_MULT": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'Analog'" }
260+
"BATT_I2C_BUS": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] in ['I2C1', 'I2C2', 'I2C3', 'I2C4']", "New Value": "1 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C2' else 2 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C3' else 3 if vehicle_components['Battery Monitor']['FC Connection']['Type'] == 'I2C4' else 0", "Change Reason": "Selected in component editor window" }
263261
},
264262
"delete_parameters": {
265263
"BATT_I2C_BUS": { "if": "vehicle_components['Battery Monitor']['FC Connection']['Type'] not in ['I2C1', 'I2C2', 'I2C3', 'I2C4']" },
@@ -487,6 +485,13 @@
487485
"MOT_PWM_MAX": { "if": "vehicle_components['ESC']['FC->ESC Connection']['Protocol'] not in ['Normal', 'Brushed', 'PWMAngle', 'PWMRange']", "New Value": "2000", "Change Reason": "Digital ESC protocol maximum is per definition 2000" },
488486
"MOT_PWM_MIN": { "if": "vehicle_components['ESC']['FC->ESC Connection']['Protocol'] not in ['Normal', 'Brushed', 'PWMAngle', 'PWMRange']", "New Value": "1000", "Change Reason": "Digital ESC protocol minimum is per definition 1000" }
489487
},
488+
"delete_parameters": {
489+
"ESC_HW_POLES": {},
490+
"KDE_NPOLE": {},
491+
"SERVO_BLH_POLES": {},
492+
"SERVO_BLH_TRATE": {},
493+
"SERVO_FTW_POLES": {}
494+
},
490495
"old_filenames": ["14_motor.param", "15_motor.param"],
491496
"plugin": {
492497
"name": "motor_test",

0 commit comments

Comments
 (0)