Skip to content

Commit

Permalink
Cube Orange Plus ODID Bootloader (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
gus-robotics88 committed Nov 14, 2023
1 parent 5edaa6e commit 819af0e
Show file tree
Hide file tree
Showing 7 changed files with 2,439 additions and 15 deletions.
1 change: 1 addition & 0 deletions Tools/AP_Bootloader/board_types.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,4 @@ AP_HW_SWBOOMBOARD_PERIPH 1403
# OpenDroneID enabled boards. Use 10000 + the base board ID
AP_HW_CubeOrange_ODID 10140
AP_HW_Pixhawk6_ODID 10053
AP_HW_CubeOrangePlus_ODID 10063
Binary file modified Tools/bootloaders/CubeOrangePlus-ODID_bl.bin
Binary file not shown.
2,420 changes: 2,420 additions & 0 deletions Tools/bootloaders/CubeOrangePlus-ODID_bl.hex

Large diffs are not rendered by default.

20 changes: 7 additions & 13 deletions libraries/AP_HAL_ChibiOS/hwdef/CubeOrangePlus-ODID/defaults.parm
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
# setup correct defaults for battery monitoring for cube power brick
BATT2_CURR_PIN 4
BATT2_VOLT_PIN 13
BATT_AMP_PERVLT 39.877
BATT_VOLT_MULT 12.02
BATT2_AMP_PERVLT 39.877
BATT2_VOLT_MULT 12.02
# setup ADSB
ADSB_TYPE 1
SERIAL5_BAUD 57
SERIAL5_PROTOCOL 1
include ../CubeOrangePlus/defaults.parm

# Enable CAN driver
CAN_P1_DRIVER 1
CAN_P2 DRIVER 1

# enforce OpenDroneID. Note that we need to lock down key parameters
# to ensure the integrity of the RemoteID system
Expand All @@ -18,6 +12,6 @@ DID_ENABLE 1 @READONLY
# UAS ID, Type, and UA Type will be set to the value in the Basic ID message and DID_OPTIONS
# will be set to 1.
DID_OPTIONS 5 @READONLY
DID_MAVPORT 2 @READONLY
DID_CANDRIVER 0 @READONLY
DID_MAVPORT -1 @READONLY
DID_CANDRIVER 1 @READONLY
AHRS_EKF_TYPE 3 @READONLY
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
include ../CubeOrangePlus/hwdef-bl.dat

undef USB_STRING_PRODUCT
undef APJ_BOARD_ID

# use a different board ID, so vehicles with this installed are prevented from loading
# the firmware without OpenDroneID enabled
APJ_BOARD_ID 10141
APJ_BOARD_ID 10063
USB_STRING_PRODUCT "CubeOrange+ODID-BL"

# enable and enforce OpenDroneID
define AP_OPENDRONEID_ENABLED 1
6 changes: 5 additions & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/CubeOrangePlus-ODID/hwdef.dat
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
include ../CubeOrangePlus/hwdef.dat

undef USB_STRING_PRODUCT
undef APJ_BOARD_ID

# use a different board ID, so vehicles with this installed are prevented from loading
# the firmware without OpenDroneID enabled
APJ_BOARD_ID 10141
APJ_BOARD_ID 10063
USB_STRING_PRODUCT "CubeOrange+ODID"

# enable and enforce OpenDroneID
define AP_OPENDRONEID_ENABLED 1
1 change: 1 addition & 0 deletions upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./waf --targets bin/arducopter --upload

0 comments on commit 819af0e

Please sign in to comment.