From 126456742a6a1f8a19cc9b187c0f59ea565e1d43 Mon Sep 17 00:00:00 2001 From: Michael Oborne Date: Fri, 14 May 2021 16:40:36 +1000 Subject: [PATCH] Hwdef: add Joey --- Tools/bootloaders/CubeOrange-joey_bl.bin | Bin 0 -> 17372 bytes .../hwdef/CubeOrange-joey/defaults.parm | 49 ++++++++++++++ .../hwdef/CubeOrange-joey/hwdef-bl.dat | 16 +++++ .../hwdef/CubeOrange-joey/hwdef.dat | 15 +++++ .../hwdef/CubeOrange-joey/scripts/mode.lua | 60 ++++++++++++++++++ 5 files changed, 140 insertions(+) create mode 100644 Tools/bootloaders/CubeOrange-joey_bl.bin create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/defaults.parm create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/hwdef-bl.dat create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/hwdef.dat create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/scripts/mode.lua diff --git a/Tools/bootloaders/CubeOrange-joey_bl.bin b/Tools/bootloaders/CubeOrange-joey_bl.bin new file mode 100644 index 0000000000000000000000000000000000000000..a582ef1fb893d4194101c20f45862d103824268b GIT binary patch literal 17372 zcmd6Pdwf*Ywf{bk$(%eOLlShD1UWMU7zoNhum;gGnF%M4K@-9D#-Q~~BF&ljV0`oz zd%c$lLFHkuQD|>Wv_+#WzJOq3jXDO2wzbb0F#UyaTT#@(MC%y{%*lf}zwbViAliO@ zzx%tN-yb)8_StK{_g-u5wbx#I4J3_-Pq9QenoWeiAY5Td#p#GUk$+*RT=3QOg=Jrd z-@S$iXAtb)B*L`__aS_}&i^g_?0=)p*ZWLg`Cl9N(f?w-ulN7oNq@TR@8|Td{~yQi z{|Ej5cjoy&p$&VSs6r;Ygb`%-DMEgaaNXHuccpTA zPgg(EdwRnowB+C^6(w6I>rRzatAu>;H%rEKXRn@YlO~2v=WV5}SoL4WId#c+wfZgB zoXY&F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3(Lp_ zWfV5bmITX%W^(HlYA0$(P+LZ7dR6XiXnR{*xgDv@s+~whkowTX_nWJ7Z%5hfZRMRv@l`vKiXfGG zm%b@HiIekV+z+~J73)#=qN?0G(DIJ9awk$45vd4L$9cX#yDIlil-=1@{uELe5vd4L z^+*X-xf@Wn0qu~&h)6|{N{#58To=_z&n2v*De73m)W4hlX6A)+shn)+4{7)njQ}Zs zbS%wohAp8VF@0T*B2GvA2gDhO-$i^e;&%`iB7SQu-Tni_;W4v)DdL{7Ec+VR^r=St zGJLS;I6pjhE>WtTOT@>{C4M(?F3~ZrCrXX6^+XHgFnj@*vt@WOjMCQ)3w-$D$6wv) zITNwwQ{9G>kS@Y6I*Q0b>a(9?$;r)`K?r@*qib1v!?ndrE3RC*awVArmlZF*@`_?; zuY~;A`2NFB*GwWjiEtF*9fT-C7~wgDA0d2uUnHZ@8CKZCHOFnYVV;n#$7E^T@opMEIc- zV_=+gz+SZ7g}J4(Uc%x>Q%lo%bjAWS%_SDbG?yU^KbK`qbJGZ8Hf`qcSeni=gv~%h zvx#BdG-{?1$w4@dzH%4~WIfa61p+|X6EDnbC?ahUXsGc0PasT(6ydK9760y;yl7Jbps~N z3uy<>>89AG?Y2Kp;S0;$%_#~QeU>sL xks2>(Hd>@U|7g6a;{PdSQ)s%$O@x)0Tn+HqI0>ir4%98=kATKgbN_n$zX4uDtE~V4 literal 0 HcmV?d00001 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/defaults.parm new file mode 100644 index 0000000000..47a0b3921d --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/defaults.parm @@ -0,0 +1,49 @@ +BATT_AMP_PERVLT 39.877 +BATT_VOLT_MULT 12.02 +AHRS_EKF_TYPE 2 @READONLY +AHRS_ORIENTATION 2 @READONLY +ATC_ACCEL_P_MAX 160000 @READONLY +ATC_ACCEL_R_MAX 392244 @READONLY +ATC_ACCEL_Y_MAX 35000 @READONLY +ATC_ANG_RLL_P 15.876 @READONLY +ATC_RAT_PIT_D 0.004 @READONLY +ATC_RAT_PIT_I 0.098 @READONLY +ATC_RAT_PIT_P 0.18 @READONLY +ATC_RAT_RLL_D 0.00113 @READONLY +ATC_RAT_RLL_I 0.0401 @READONLY +ATC_RAT_RLL_P 0.0401 @READONLY +BATT_MONITOR 4 +BATT_FS_LOW_ACT 1 @READONLY +BATT_LOW_VOLT 11 +BRD_SAFETYENABLE 0 +CAN_P1_DRIVER 1 +CAN_P2_DRIVER 1 +FENCE_ALT_MAX 15 @READONLY +FENCE_ENABLE 1 +FENCE_RADIUS 100 @READONLY +FLTMODE_CH 6 @READONLY +FLTMODE1 2 @READONLY +FLTMODE2 2 @READONLY +FLTMODE3 2 @READONLY +FLTMODE4 2 @READONLY +FLTMODE5 9 @READONLY +FLTMODE6 9 @READONLY +FRAME_CLASS 1 @READONLY +FS_OPTIONS 0 @READONLY +FS_THR_ENABLE 3 @READONLY +FS_THR_VALUE 950 @READONLY +GPS_TYPE 9 @READONLY +INS_GYRO_FILTER 100 +MOT_THST_HOVER 0.4028862 +NTF_LED_TYPES 231 @READONLY +RC_OPTIONS 0 +RC5_OPTION 41 +RC8_MIN 1000 +RC8_OPTION 17 +SERIAL1_PROTOCOL 2 +WPNAV_ACCEL 100 @READONLY +WPNAV_SPEED 500 @READONLY +SCR_ENABLE 1 @READONLY +SCR_DIR_DISABLE 0 @READONLY +BRD_IMUHEAT_I 0.07 @READONLY +BRD_IMUHEAT_P 50 @READONLY diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/hwdef-bl.dat new file mode 100644 index 0000000000..648d137554 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/hwdef-bl.dat @@ -0,0 +1,16 @@ +# hw definition file for processing by chibios_hwdef.py +# for H743 bootloader + +include ../CubeOrange/hwdef-bl.dat + +undef USB_STRING_PRODUCT +undef USB_STRING_MANUFACTURER +undef APJ_BOARD_ID +undef USB_PRODUCT + +# USB setup +USB_PRODUCT 0x1056 +USB_STRING_MANUFACTURER "CubePilot" +USB_STRING_PRODUCT "Joey-BL" + +APJ_BOARD_ID 1033 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/hwdef.dat new file mode 100644 index 0000000000..30272e1788 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/hwdef.dat @@ -0,0 +1,15 @@ +# hw definition file for processing by chibios_hwdef.py + +include ../CubeOrange/hwdef.dat + +undef USB_STRING_PRODUCT +undef USB_STRING_MANUFACTURER +undef APJ_BOARD_ID +undef USB_PRODUCT + +# USB setup +USB_PRODUCT 0x1057 +USB_STRING_MANUFACTURER "CubePilot" +USB_STRING_PRODUCT "Joey" + +APJ_BOARD_ID 1033 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/scripts/mode.lua b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/scripts/mode.lua new file mode 100644 index 0000000000..c4dff247b2 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-joey/scripts/mode.lua @@ -0,0 +1,60 @@ + +-- 0:Stabilize,1:Acro,2:AltHold,3:Auto,4:Guided,5:Loiter,6:RTL,7:Circle,9:Land,11:Drift,13:Sport,14:Flip,15:AutoTune,16:PosHold,17:Brake,18:Throw,19:Avoid_ADSB,20:Guided_NoGPS,21:Smart_RTL,22:FlowHold,23:Follow,24:ZigZag,25:SystemID,26:Heli_Autorotate +-- and arming:is_armed() + +local MODE_AUTO = 3 +local MODE_LOITER = 5 +local MODE_ALT_HOLD = 2 +local MODE_RTL = 6 +local MODE_LAND = 9 +local counter = 0 + +function update() + local pos = ahrs:get_position() + + if (vehicle:get_mode() == MODE_AUTO or vehicle:get_mode() == MODE_LOITER) then + setfence(true) + elseif vehicle:get_mode() == MODE_ALT_HOLD and not pos then + setfence(false) + elseif vehicle:get_mode() == MODE_ALT_HOLD and pos then + setfence(true) + end + + if (vehicle:get_mode() ~= MODE_AUTO and vehicle:get_mode() ~= MODE_LOITER and vehicle:get_mode() ~= MODE_ALT_HOLD and vehicle:get_mode() ~= MODE_RTL and vehicle:get_mode() ~= MODE_LAND) then + if not pos then + vehicle:set_mode(MODE_ALT_HOLD) + gcs:send_text(0, "JoeyFence: Invalid Mode, Changing no gps") + else + vehicle:set_mode(MODE_LOITER) + gcs:send_text(0, "JoeyFence: Invalid Mode, Changing gps") + end + end + + if (counter >= 5 * 5) then + --gcs:send_text(0, "JoeyFence: Running") + counter = 0 + end + + counter = counter + 1 + -- run at 5Hz + return update, 200 +end + +function setfence(enabled) + if (enabled) then + value = param:get('FENCE_ENABLE') + if(value ~= 1) then + param:set('FENCE_ENABLE',1) + gcs:send_text(0, "JoeyFence: Enabled") + end + else + value = param:get('FENCE_ENABLE') + if(value ~= 0) then + param:set('FENCE_ENABLE',0) + gcs:send_text(0, "JoeyFence: Disabled") + end + end +end + +-- start running update loop +return update()