Skip to content

Commit

Permalink
LUA : restructure to manage prearm-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Pradeep-Carbonix authored and robertlong13 committed Dec 30, 2024
1 parent 8ca2895 commit 0afcc7c
Show file tree
Hide file tree
Showing 12 changed files with 420 additions and 247 deletions.
36 changes: 33 additions & 3 deletions Tools/autotest/pysim/vehicleinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,19 +440,49 @@ def __init__(self):
"waf_target": "bin/arduplane",
"model": "quadplane:@ROMFS/models/Ottano.json",
"default_params_filename": "../../build/ottano-headless.parm",
"scripts": ["../../libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/*.lua"],
"scripts": [
"../../libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/*.lua",
(
"../../libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/modules/*.lua",
"modules"
),
(
"../../libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/aircraft/ottano.lua",
"modules/aircraft.lua"
),
],
},
"volanti-headless": {
"waf_target": "bin/arduplane",
"model": "quadplane:@ROMFS/models/Volanti.json",
"default_params_filename": "../../build/volanti-headless.parm",
"scripts": ["../../libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/*.lua"],
"scripts": [
"../../libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/*.lua",
(
"../../libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/modules/*.lua",
"modules"
),
(
"../../libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/aircraft/volanti.lua",
"modules/aircraft.lua"
),
],
},
"volanti-realflight": {
"waf_target": "bin/arduplane",
"model": "flightaxis",
"default_params_filename": "../../build/volanti-realflight.parm",
"scripts": ["../../libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/*.lua"],
"scripts": [
"../../libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/*.lua",
(
"../../libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/modules/*.lua",
"modules"
),
(
"../../libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/aircraft/volanti.lua",
"modules/aircraft.lua"
),
],
"external": True,
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,17 @@
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/cx_vtol_info.lua</source_path>
<destination_path>cx_vtol_info.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/modules/bit_esc.lua</source_path>
<destination_path>modules/bit_esc.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/modules/msg.lua</source_path>
<destination_path>modules/msg.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/aircraft/ottano.lua</source_path>
<destination_path>modules/aircraft.lua</destination_path>
</lua_script>
</lua_script_list>
</data>
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,17 @@
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/cx_vtol_info.lua</source_path>
<destination_path>cx_vtol_info.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/modules/bit_esc.lua</source_path>
<destination_path>modules/bit_esc.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/modules/msg.lua</source_path>
<destination_path>modules/msg.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/aircraft/ottano.lua</source_path>
<destination_path>modules/aircraft.lua</destination_path>
</lua_script>
</lua_script_list>
</data>
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,17 @@
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/cx_vtol_info.lua</source_path>
<destination_path>cx_vtol_info.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/modules/bit_esc.lua</source_path>
<destination_path>modules/bit_esc.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/modules/msg.lua</source_path>
<destination_path>modules/msg.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/aircraft/volanti.lua</source_path>
<destination_path>modules/aircraft.lua</destination_path>
</lua_script>
</lua_script_list>
</data>
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,17 @@
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/cx_vtol_info.lua</source_path>
<destination_path>cx_vtol_info.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/modules/bit_esc.lua</source_path>
<destination_path>modules/bit_esc.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/modules/msg.lua</source_path>
<destination_path>modules/msg.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/aircraft/volanti.lua</source_path>
<destination_path>modules/aircraft.lua</destination_path>
</lua_script>
</lua_script_list>
</data>
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,17 @@
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/cx_vtol_info.lua</source_path>
<destination_path>cx_vtol_info.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/modules/bit_esc.lua</source_path>
<destination_path>modules/bit_esc.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/modules/msg.lua</source_path>
<destination_path>modules/msg.lua</destination_path>
</lua_script>
<lua_script>
<source_path>libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/scripts/aircraft/volanti.lua</source_path>
<destination_path>modules/aircraft.lua</destination_path>
</lua_script>
</lua_script_list>
</data>
4 changes: 2 additions & 2 deletions libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/defaults.parm
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ RTL_RADIUS,200
SCHED_LOOP_RATE,200 # Loop Rate for Control in flight Controller set to 200Hz from 400Hz Results SW-171.
SCR_ENABLE,1
SCR_HEAP_SIZE,200000
SCR_LD_CHECKSUM,8357358
SCR_RUN_CHECKSUM,8357358
SCR_LD_CHECKSUM,1341533
SCR_RUN_CHECKSUM,1341533
SCR_VM_I_COUNT,100000
SERVO1_FUNCTION,33 # Motor 1
SERVO10_FUNCTION,4 # Aileron R
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
return "Ottano"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
return "Volanti"
Loading

0 comments on commit 0afcc7c

Please sign in to comment.