Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Octano Board Type #249

Draft
wants to merge 3 commits into
base: CxPilot-7
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/carbonix_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,12 @@ jobs:
id: check_files
uses: andstor/file-existence-action@v2
with:
files: "build/CubeOrange/*, build/CubeOrangePlus/*, build/CubeOrange-Volanti/*, build/CubeOrangePlus-Volanti/*, build/CubeOrange-Ottano/*, build/CubeOrangePlus-Ottano/*, build/CarbonixF405/*, build/CarbonixF405-no-crystal/*"
files: "build/CubeOrange/*, build/CubeOrangePlus/*, build/CubeOrange-Volanti/*, build/CubeOrangePlus-Volanti/*, build/CubeOrange-Ottano/*, build/CubeOrangePlus-Ottano/*, build/CubeOrange-Octano/*, build/CarbonixF405/*, build/CarbonixF405-no-crystal/*"
fail: true
- name: Gather build output
run: |
mkdir -p temp/others
for dir in CubeOrange CubeOrangePlus CubeOrange-Volanti CubeOrangePlus-Volanti CubeOrange-Ottano CubeOrangePlus-Ottano CarbonixF405 CarbonixF405-no-crystal; do
for dir in CubeOrange CubeOrangePlus CubeOrange-Volanti CubeOrangePlus-Volanti CubeOrange-Ottano CubeOrangePlus-Ottano CubeOrange-Octano CarbonixF405 CarbonixF405-no-crystal; do
mkdir -p temp/others/$dir/bin
cp -vr build/$dir/bin/* temp/others/$dir/bin/
done
Expand All @@ -284,6 +284,7 @@ jobs:
mv temp/others/CubeOrangePlus-Volanti temp/Volanti
mv temp/others/CubeOrange-Ottano temp/Ottano
mv temp/others/CubeOrangePlus-Ottano temp/Ottano
mv temp/others/CubeOrange-Octano temp/Octano
if [ -d "ArduPlane/ReleaseNotes.txt" ]; then
cp -v ArduPlane/ReleaseNotes.txt temp/
else
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cx_build_compare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
exclude:
- gcc: 10
toolchain: chibios-clang
board: ["CubeOrange-Volanti", "CubeOrangePlus-Volanti", "CubeOrange-Ottano", "CubeOrangePlus-Ottano", "CarbonixF405", "CarbonixF405-no-crystal"]
board: ["CubeOrange-Volanti", "CubeOrangePlus-Volanti", "CubeOrange-Ottano", "CubeOrangePlus-Ottano", "CubeOrange-Octano", "CarbonixF405", "CarbonixF405-no-crystal"]
steps:
# git checkout the PR
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Tools/Carbonix_scripts/build_no_clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e
# The board to build for is passed as an argument to the script
BOARD=$1

if [ "$BOARD" == "CubeOrange" ] || [ "$BOARD" == "CubeOrangePlus" ] || [ "$BOARD" == "CubeOrange-Volanti" ] || [ "$BOARD" == "CubeOrangePlus-Volanti" ] || [ "$BOARD" == "CubeOrange-Ottano" ] || [ "$BOARD" == "CubeOrangePlus-Ottano" ] || [ "$BOARD" == "sitl" ]
if [ "$BOARD" == "CubeOrange" ] || [ "$BOARD" == "CubeOrangePlus" ] || [ "$BOARD" == "CubeOrange-Volanti" ] || [ "$BOARD" == "CubeOrangePlus-Volanti" ] || [ "$BOARD" == "CubeOrange-Ottano" ] || [ "$BOARD" == "CubeOrangePlus-Ottano" ] || [ "$BOARD" == "sitl" ] || [ "$BOARD" == "CubeOrange-Octano"]
then
echo "Compiling Plane for $BOARD..."
./waf plane
Expand Down
2 changes: 1 addition & 1 deletion Tools/Carbonix_scripts/carbonix_waf_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e
echo "Running distclean..."
./waf distclean

main_boards=("CubeOrange" "CubeOrangePlus" "CubeOrange-Volanti" "CubeOrangePlus-Volanti" "CubeOrange-Ottano" "CubeOrangePlus-Ottano")
main_boards=("CubeOrange" "CubeOrangePlus" "CubeOrange-Volanti" "CubeOrangePlus-Volanti" "CubeOrange-Ottano" "CubeOrangePlus-Ottano" "CubeOrange-Octano")
for board in "${main_boards[@]}"; do
echo "Compiling ArduPlane for $board..."
./waf configure --board "$board" -g
Expand Down
246 changes: 246 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-Octano/defaults.parm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CubeOrangePlus-Octano ?

Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
@include ../CarbonixCommon/defaults.parm
# Octano-specific parameters
AIRSPEED_CRUISE,26
AIRSPEED_MAX,36
AIRSPEED_MIN,23
ARSPD_TYPE,8
# Battery 1: VTOL Battery (Combined)
BATT_CAPACITY,30000 # Sum of BATT4_CAPACITY and BATT5_CAPACITY
BATT_MONITOR,10 # Sum
BATT_OPTIONS,576 # 6:Send resistance compensated voltage to GCS, 9:Sum monitor measures minimum voltage instead of average
BATT_SUM_MASK,24 # Sum of BATT4 and BATT5
# Battery 2: Avionics Battery
BATT2_CAPACITY,5100
BATT2_CRT_VOLT,22
BATT2_FS_CRT_ACT,1 # RTL
BATT2_LOW_VOLT,23
BATT2_MONITOR,8 # DroneCAN
BATT2_SERIAL_NUM,2 # DroneCAN Battery index to listen to
# Battery 3: Fuel Level Sensor
BATT3_MONITOR,8 # DroneCAN
BATT3_SERIAL_NUM,1 # DroneCAN Battery index to listen to
# Battery 4: VTOL Battery (Left)
BATT4_CAPACITY,15000 # matches BATT5_CAPACITY
BATT4_CRT_VOLT,42
BATT4_ESC_MASK,6 # ESC 2 and 3
BATT4_FS_VOLTSRC,1 # Failsafe on sag-compensated voltage
BATT4_LOW_VOLT,43
BATT4_MONITOR,9 # ESC
BATT4_OPTIONS,64 # 6:Send resistance compensated voltage to GCS
# Battery 5: VTOL Battery (Right)
BATT5_CAPACITY,15000 # matches BATT4_CAPACITY
BATT5_CRT_VOLT,42
BATT5_ESC_MASK,9 # ESC 1 and 4
BATT5_FS_VOLTSRC,1 # Failsafe on sag-compensated voltage
BATT5_LOW_VOLT,43
BATT5_MONITOR,9 # ESC
BATT5_OPTIONS,64 # 6:Send resistance compensated voltage to GCS
# Battery 6: PDB Volt/Current Sensor 1
BATT6_AMP_OFFSET,0.004108
BATT6_AMP_PERVLT,29.98257
BATT6_CURR_PIN,51 # AD7091R VIN1 (BAT_ISen_1)
BATT6_MONITOR,28 # AD7091R
BATT6_VOLT_MULT,16.667
BATT6_VOLT_PIN,50 # AD7091R VIN0 (Vsen_Batt_1), pin shared with BATT7
# Battery 7: PDB Volt/Current Sensor 2
BATT7_AMP_OFFSET,0.004108
BATT7_AMP_PERVLT,29.98257
BATT7_CURR_PIN,52 # AD7091R VIN2 (BAT_ISen_2)
BATT7_MONITOR,28 # AD7091R
BATT7_VOLT_MULT,16.667
BATT7_VOLT_PIN,50 # AD7091R VIN0 (Vsen_Batt_1), pin shared with BATT6
BRD_SAFETY_MASK,2016
CAN_D1_UC_ESC_BM,16711680
CAN_D1_UC_ESC_OF,16
CAN_D2_UC_ESC_BM,16711680
CAN_D2_UC_ESC_OF,16
COMPASS_PRIO1_ID,70411
COMPASS_PRIO2_ID,72963
COMPASS_USE3,0
EFI_COEF1,0.68
EFI_FUEL_DENS,0.8364842
EFI_THRLIN_COEF1,0.8364842
EFI_THRLIN_COEF2,-0.02207897
EFI_THRLIN_COEF3,0.0002301534
EFI_THRLIN_EN,1
EFI_THRLIN_OFS,6
EFI_TYPE,8
GPS_POS1_X,-0.135
GPS_POS1_Y,-1.05
GPS_POS2_X,-0.135
GPS_POS2_Y,1.05
ICE_ENABLE,1
ICE_IDLE_RPM,2400
ICE_IDLE_SLEW,2
ICE_OPTIONS,4
ICE_RPM_CHAN,1
ICE_START_CHAN,6
ICE_START_DELAY,3
ICE_STARTCHN_MIN,950
ICE_STARTER_TIME,5
INS_ACCEL_FILTER,20
INS_GYRO_FILTER,22
INS_HNTC2_BW,12
INS_HNTC2_ENABLE,1
INS_HNTC2_FREQ,35
INS_HNTC2_MODE,2
INS_HNTC2_OPTS,1
INS_HNTC2_REF,1
INS_HNTCH_BW,15
INS_HNTCH_ENABLE,1
INS_HNTCH_FREQ,60
INS_HNTCH_HMNCS,3
INS_HNTCH_MODE,3
INS_HNTCH_OPTS,3
INS_HNTCH_REF,1
INS_LOG_BAT_MASK,5
INS_LOG_BAT_OPT,4
INS_POS1_X,0.82
INS_POS2_X,0.82
INS_POS3_X,0.82
KFF_RDDRMIX,1
NAVL1_LIM_BANK,35 # Set to match ROLL_LIMIT_DEG
NAVL1_PERIOD,27
PTCH_RATE_D,0.0065
PTCH_RATE_FF,0.7402687
PTCH_RATE_FLTD,11
PTCH_RATE_FLTT,3.183099
PTCH_RATE_I,0.7402687 # DISABLE_CHECKS: it is recommended for RATE_I to match RATE_FF on planes, but the metadata gives a limit of 0.6 for this and 3.0 for FF
PTCH_RATE_IMAX,0.4
PTCH_RATE_P,0.2194594
PTCH_RATE_SMAX,110
PTCH_TRIM_DEG,3
PTCH2SRV_RLL,1.05
PTCH2SRV_RMAX_DN,45
PTCH2SRV_RMAX_UP,75
Q_A_ACCEL_P_MAX,20000
Q_A_ACCEL_R_MAX,20000
Q_A_ACCEL_Y_MAX,2250
Q_A_ANG_YAW_P,0.25
Q_A_RAT_PIT_D,0.007
Q_A_RAT_PIT_FLTD,11
Q_A_RAT_PIT_FLTT,11
Q_A_RAT_PIT_I,0.25
Q_A_RAT_PIT_P,0.12
Q_A_RAT_PIT_SMAX,15
Q_A_RAT_RLL_D,0.007
Q_A_RAT_RLL_FLTD,11
Q_A_RAT_RLL_FLTT,11
Q_A_RAT_RLL_I,0.25
Q_A_RAT_RLL_P,0.25
Q_A_RAT_RLL_SMAX,15
Q_A_RAT_YAW_D,0
Q_A_RAT_YAW_FLTE,2.5
Q_A_RAT_YAW_FLTT,11
Q_A_RAT_YAW_I,0.018
Q_A_RAT_YAW_P,0.18
Q_A_RAT_YAW_SMAX,10
Q_A_RATE_P_MAX,45
Q_A_RATE_R_MAX,45
Q_A_RATE_Y_MAX,45
Q_A_SLEW_YAW,2500
Q_ANGLE_MAX,1500
Q_ASSIST_SPEED,18
Q_FRAME_CLASS,4
Q_M_BAT_VOLT_MAX,50.4
Q_M_BAT_VOLT_MIN,39.6
Q_M_SPIN_ARM,0.07
Q_M_SPIN_MIN,0.1 # DISABLE_CHECKS: this parameter should be a range restriction, but only values are defined
Q_M_THST_EXPO,0
Q_M_THST_HOVER,0.25
Q_M_YAW_HEADROOM,100
Q_PLT_Y_RATE,25
Q_TRANS_DECEL,0.9
Q_VFWD_GAIN,0.1
Q_WP_ACCEL_Z,30 # DISABLE_CHECKS: AP limits are based on small quadcopters
Q_WP_SPEED_DN,200
Q_WP_SPEED_UP,220
Q_WVANE_GAIN,1
RELAY1_FUNCTION,4
RELAY2_FUNCTION,2
RELAY2_PIN,108
RLL_RATE_D,0.001917198
RLL_RATE_FF,0.7728607
RLL_RATE_FLTD,11
RLL_RATE_FLTT,3.183099
RLL_RATE_I,0.7728607 # DISABLE_CHECKS: it is recommended for RATE_I to match RATE_FF on planes, but the metadata gives a limit of 0.6 for this and 3.0 for FF
RLL_RATE_IMAX,0.4
RLL_RATE_P,0.09429314
RLL_RATE_SMAX,125
RLL2SRV_RMAX,75
RNGFND1_GNDCLEAR,27
RNGFND1_POS_X,0.93
RNGFND1_TYPE,24
ROLL_LIMIT_DEG,35 # Set to match NAVL1_LIM_BANK
RPM1_TYPE,3
SCALING_SPEED,24
SERIAL1_BAUD,57
SERIAL1_PROTOCOL,24
SERIAL2_BAUD,115
SERIAL3_BAUD,115
SERIAL3_PROTOCOL,23
SERIAL4_BAUD,57
SERIAL4_PROTOCOL,2
SERIAL5_PROTOCOL,28
SERIAL6_BAUD,115
SERIAL6_PROTOCOL,2
SERVO_32_ENABLE,1
SERVO1_FUNCTION,0
SERVO2_FUNCTION,0
SERVO3_FUNCTION,0
SERVO4_FUNCTION,0
SERVO5_MAX,1950
SERVO5_MIN,980
SERVO6_MAX,2000
SERVO6_MIN,1000
SERVO7_MAX,2000
SERVO7_MIN,1000
SERVO8_MAX,2000
SERVO8_MIN,1000
SERVO9_MAX,2000
SERVO9_MIN,1000
SERVO17_FUNCTION,33
SERVO17_MAX,2000
SERVO17_MIN,1000
SERVO18_FUNCTION,34
SERVO18_MAX,2000
SERVO18_MIN,1000
SERVO19_FUNCTION,35
SERVO19_MAX,2000
SERVO19_MIN,1000
SERVO20_FUNCTION,36
SERVO20_MAX,2000
SERVO20_MIN,1000
SERVO21_FUNCTION,37
SERVO21_MAX,2000
SERVO21_MIN,1000
SERVO22_FUNCTION,38
SERVO22_MAX,2000
SERVO22_MIN,1000
SERVO23_FUNCTION,39
SERVO23_MAX,2000
SERVO23_MIN,1000
SERVO24_FUNCTION,40
SERVO24_MAX,2000
SERVO24_MIN,1000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need SCR_LD_CHECKSUM and SCR_LD_CHECKSUM ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is very much a placeholder draft. Don't worry about reviewing it in detail yet.

TECS_CLMB_MAX,4
TECS_INTEG_GAIN,0.15
TECS_LAND_ARSPD,24
TECS_PITCH_MAX,16
TECS_PITCH_MIN,-8
TECS_PTCH_DAMP,0.4
TECS_RLL2THR,20
TECS_SINK_MAX,2.7
TECS_SINK_MIN,2.4
TECS_SPDWEIGHT,0.5
TECS_THR_DAMP,0.4
TECS_TIME_CONST,4
TECS_VERT_ACC,6
THR_SLEWRATE,50
TRIM_THROTTLE,60
WP_LOITER_RAD,250
WP_RADIUS,150
YAW2SRV_DAMP,0.6
YAW2SRV_IMAX,1000
YAW2SRV_INT,1
YAW2SRV_SLIP,3.5
4 changes: 4 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-Octano/hwdef.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include ../CubeOrange/hwdef.dat
include ../CarbonixCommon/cx_cubecarrier.inc
USE_BOOTLOADER_FROM_BOARD CubeOrange
define NUM_SERVO_CHANNELS 32
Loading