Skip to content

Commit 6851fdf

Browse files
committed
feat(config steps): Auto adapt to FC capabilities
1 parent 4521b91 commit 6851fdf

1 file changed

Lines changed: 164 additions & 0 deletions

File tree

ardupilot_methodic_configurator/configuration_steps_ArduCopter.json

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,94 @@
4242
"mandatory_text": "80% mandatory (20% optional)",
4343
"auto_changed_by": "",
4444
"autoimport_nondefault_regexp": ["INS_TCAL1_.*", "INS_TCAL2_.*", "INS_TCAL3_.*"],
45+
"derived_parameters": {
46+
"INS_TCAL2_ENABLE": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
47+
"INS_TCAL2_TMIN": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
48+
"INS_TCAL2_TMAX": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
49+
"INS_TCAL2_ACC1_X": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
50+
"INS_TCAL2_ACC1_Y": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
51+
"INS_TCAL2_ACC1_Z": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
52+
"INS_TCAL2_ACC2_X": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
53+
"INS_TCAL2_ACC2_Y": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
54+
"INS_TCAL2_ACC2_Z": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
55+
"INS_TCAL2_ACC3_X": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
56+
"INS_TCAL2_ACC3_Y": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
57+
"INS_TCAL2_ACC3_Z": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
58+
"INS_TCAL2_GYR1_X": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
59+
"INS_TCAL2_GYR1_Y": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
60+
"INS_TCAL2_GYR1_Z": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
61+
"INS_TCAL2_GYR2_X": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
62+
"INS_TCAL2_GYR2_Y": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
63+
"INS_TCAL2_GYR2_Z": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
64+
"INS_TCAL2_GYR3_X": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
65+
"INS_TCAL2_GYR3_Y": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
66+
"INS_TCAL2_GYR3_Z": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' in fc_parameters)" },
67+
"INS_TCAL3_ENABLE": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
68+
"INS_TCAL3_TMIN": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
69+
"INS_TCAL3_TMAX": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
70+
"INS_TCAL3_ACC1_X": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
71+
"INS_TCAL3_ACC1_Y": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
72+
"INS_TCAL3_ACC1_Z": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
73+
"INS_TCAL3_ACC2_X": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
74+
"INS_TCAL3_ACC2_Y": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
75+
"INS_TCAL3_ACC2_Z": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
76+
"INS_TCAL3_ACC3_X": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
77+
"INS_TCAL3_ACC3_Y": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
78+
"INS_TCAL3_ACC3_Z": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
79+
"INS_TCAL3_GYR1_X": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
80+
"INS_TCAL3_GYR1_Y": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
81+
"INS_TCAL3_GYR1_Z": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
82+
"INS_TCAL3_GYR2_X": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
83+
"INS_TCAL3_GYR2_Y": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
84+
"INS_TCAL3_GYR2_Z": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
85+
"INS_TCAL3_GYR3_X": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
86+
"INS_TCAL3_GYR3_Y": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" },
87+
"INS_TCAL3_GYR3_Z": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' in fc_parameters)" }
88+
},
89+
"delete_parameters": {
90+
"INS_TCAL2_ENABLE": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
91+
"INS_TCAL2_TMIN": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
92+
"INS_TCAL2_TMAX": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
93+
"INS_TCAL2_ACC1_X": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
94+
"INS_TCAL2_ACC1_Y": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
95+
"INS_TCAL2_ACC1_Z": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
96+
"INS_TCAL2_ACC2_X": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
97+
"INS_TCAL2_ACC2_Y": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
98+
"INS_TCAL2_ACC2_Z": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
99+
"INS_TCAL2_ACC3_X": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
100+
"INS_TCAL2_ACC3_Y": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
101+
"INS_TCAL2_ACC3_Z": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
102+
"INS_TCAL2_GYR1_X": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
103+
"INS_TCAL2_GYR1_Y": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
104+
"INS_TCAL2_GYR1_Z": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
105+
"INS_TCAL2_GYR2_X": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
106+
"INS_TCAL2_GYR2_Y": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
107+
"INS_TCAL2_GYR2_Z": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
108+
"INS_TCAL2_GYR3_X": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
109+
"INS_TCAL2_GYR3_Y": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
110+
"INS_TCAL2_GYR3_Z": { "if": "fc_parameters and ('INS_TCAL2_ENABLE' not in fc_parameters)" },
111+
"INS_TCAL3_ENABLE": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
112+
"INS_TCAL3_TMIN": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
113+
"INS_TCAL3_TMAX": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
114+
"INS_TCAL3_ACC1_X": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
115+
"INS_TCAL3_ACC1_Y": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
116+
"INS_TCAL3_ACC1_Z": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
117+
"INS_TCAL3_ACC2_X": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
118+
"INS_TCAL3_ACC2_Y": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
119+
"INS_TCAL3_ACC2_Z": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
120+
"INS_TCAL3_ACC3_X": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
121+
"INS_TCAL3_ACC3_Y": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
122+
"INS_TCAL3_ACC3_Z": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
123+
"INS_TCAL3_GYR1_X": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
124+
"INS_TCAL3_GYR1_Y": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
125+
"INS_TCAL3_GYR1_Z": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
126+
"INS_TCAL3_GYR2_X": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
127+
"INS_TCAL3_GYR2_Y": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
128+
"INS_TCAL3_GYR2_Z": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
129+
"INS_TCAL3_GYR3_X": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
130+
"INS_TCAL3_GYR3_Y": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" },
131+
"INS_TCAL3_GYR3_Z": { "if": "fc_parameters and ('INS_TCAL3_ENABLE' not in fc_parameters)" }
132+
},
45133
"old_filenames": []
46134
},
47135
"04_board_orientation.param": {
@@ -243,6 +331,22 @@
243331
"mandatory_text": "100% mandatory (0% optional)",
244332
"auto_changed_by": "Mission Planner. If you have not done this step in Mission Planner yet, close this application and use Mission Planner",
245333
"autoimport_nondefault_regexp": ["COMPASS_PRIO[0-9]_ID", "RC[0-9]+_.+", "SERVO[0-9]+_.+"],
334+
"derived_parameters": {
335+
"INS_ACC2SCAL_X": { "if": "fc_parameters and ('INS_ACC2SCAL_X' in fc_parameters)" },
336+
"INS_ACC2SCAL_Y": { "if": "fc_parameters and ('INS_ACC2SCAL_X' in fc_parameters)" },
337+
"INS_ACC2SCAL_Z": { "if": "fc_parameters and ('INS_ACC2SCAL_X' in fc_parameters)" },
338+
"INS_ACC3SCAL_X": { "if": "fc_parameters and ('INS_ACC3SCAL_X' in fc_parameters)" },
339+
"INS_ACC3SCAL_Y": { "if": "fc_parameters and ('INS_ACC3SCAL_X' in fc_parameters)" },
340+
"INS_ACC3SCAL_Z": { "if": "fc_parameters and ('INS_ACC3SCAL_X' in fc_parameters)" }
341+
},
342+
"delete_parameters": {
343+
"INS_ACC2SCAL_X": { "if": "fc_parameters and ('INS_ACC2SCAL_X' not in fc_parameters)" },
344+
"INS_ACC2SCAL_Y": { "if": "fc_parameters and ('INS_ACC2SCAL_X' not in fc_parameters)" },
345+
"INS_ACC2SCAL_Z": { "if": "fc_parameters and ('INS_ACC2SCAL_X' not in fc_parameters)" },
346+
"INS_ACC3SCAL_X": { "if": "fc_parameters and ('INS_ACC3SCAL_X' not in fc_parameters)" },
347+
"INS_ACC3SCAL_Y": { "if": "fc_parameters and ('INS_ACC3SCAL_X' not in fc_parameters)" },
348+
"INS_ACC3SCAL_Z": { "if": "fc_parameters and ('INS_ACC3SCAL_X' not in fc_parameters)" }
349+
},
246350
"old_filenames": ["11_mp_setup_mandatory_hardware.param"]
247351
},
248352
"13_general_configuration.param": {
@@ -459,6 +563,66 @@
459563
"mandatory_text": "80% mandatory (20% optional)",
460564
"auto_changed_by": "MAGFit Webtool and YOU manually uploaded the result to the FC already",
461565
"autoimport_nondefault_regexp": ["COMPASS_DIA[0-9]*_.*", "COMPASS_MOT[0-9]*_.*", "COMPASS_MOTCT", "COMPASS_ODI[0-9]*_.*", "COMPASS_OFS[0-9]*_.*", "COMPASS_ORIENT[0-9]*", "COMPASS_SCALE[0-9]*"],
566+
"derived_parameters": {
567+
"COMPASS_DIA2_X": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
568+
"COMPASS_DIA2_Y": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
569+
"COMPASS_DIA2_Z": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
570+
"COMPASS_MOT2_X": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
571+
"COMPASS_MOT2_Y": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
572+
"COMPASS_MOT2_Z": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
573+
"COMPASS_ODI2_X": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
574+
"COMPASS_ODI2_Y": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
575+
"COMPASS_ODI2_Z": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
576+
"COMPASS_OFS2_X": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
577+
"COMPASS_OFS2_Y": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
578+
"COMPASS_OFS2_Z": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
579+
"COMPASS_ORIENT2": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
580+
"COMPASS_SCALE2": { "if": "fc_parameters and ('COMPASS_ORIENT2' in fc_parameters)" },
581+
"COMPASS_DIA3_X": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" },
582+
"COMPASS_DIA3_Y": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" },
583+
"COMPASS_DIA3_Z": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" },
584+
"COMPASS_MOT3_X": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" },
585+
"COMPASS_MOT3_Y": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" },
586+
"COMPASS_MOT3_Z": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" },
587+
"COMPASS_ODI3_X": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" },
588+
"COMPASS_ODI3_Y": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" },
589+
"COMPASS_ODI3_Z": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" },
590+
"COMPASS_OFS3_X": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" },
591+
"COMPASS_OFS3_Y": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" },
592+
"COMPASS_OFS3_Z": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" },
593+
"COMPASS_ORIENT3": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" },
594+
"COMPASS_SCALE3": { "if": "fc_parameters and ('COMPASS_ORIENT3' in fc_parameters)" }
595+
},
596+
"delete_parameters": {
597+
"COMPASS_DIA2_X": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
598+
"COMPASS_DIA2_Y": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
599+
"COMPASS_DIA2_Z": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
600+
"COMPASS_MOT2_X": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
601+
"COMPASS_MOT2_Y": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
602+
"COMPASS_MOT2_Z": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
603+
"COMPASS_ODI2_X": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
604+
"COMPASS_ODI2_Y": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
605+
"COMPASS_ODI2_Z": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
606+
"COMPASS_OFS2_X": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
607+
"COMPASS_OFS2_Y": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
608+
"COMPASS_OFS2_Z": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
609+
"COMPASS_ORIENT2": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
610+
"COMPASS_SCALE2": { "if": "fc_parameters and ('COMPASS_ORIENT2' not in fc_parameters)" },
611+
"COMPASS_DIA3_X": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" },
612+
"COMPASS_DIA3_Y": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" },
613+
"COMPASS_DIA3_Z": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" },
614+
"COMPASS_MOT3_X": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" },
615+
"COMPASS_MOT3_Y": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" },
616+
"COMPASS_MOT3_Z": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" },
617+
"COMPASS_ODI3_X": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" },
618+
"COMPASS_ODI3_Y": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" },
619+
"COMPASS_ODI3_Z": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" },
620+
"COMPASS_OFS3_X": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" },
621+
"COMPASS_OFS3_Y": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" },
622+
"COMPASS_OFS3_Z": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" },
623+
"COMPASS_ORIENT3": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" },
624+
"COMPASS_SCALE3": { "if": "fc_parameters and ('COMPASS_ORIENT3' not in fc_parameters)" }
625+
},
462626
"old_filenames": ["23_inflight_magnetometer_fit_results.param"]
463627
},
464628
"26_quick_tune_setup.param": {

0 commit comments

Comments
 (0)