diff --git a/.github/workflows/carbonix_build.yml b/.github/workflows/carbonix_build.yml index 9436f0bf4a..5c13d4dc7f 100644 --- a/.github/workflows/carbonix_build.yml +++ b/.github/workflows/carbonix_build.yml @@ -168,7 +168,7 @@ jobs: - name: build Carbonix Flight Controller shell: bash run: | - boards=("CubeOrange" "CarbonixCubeOrange" "sitl") + boards=("CubeOrange" "CarbonixCubeOrange" "CarbonixCubeOrangePlus" "sitl") for board in "${boards[@]}"; do echo "Compiling AP_Periph for $board..." ./Tools/scripts/build_bootloaders.py "$board" @@ -191,7 +191,7 @@ jobs: id: check_files uses: andstor/file-existence-action@v2 with: - files: "build/CubeOrange/*, build/CarbonixCubeOrange/*, build/sitl/*, build/CarbonixF405/*, build/Volanti-M1/*, build/Volanti-M2/*, build/Volanti-M3/*, build/Volanti-M4/*, build/Volanti-M5/*, build/Volanti-LWing/*, build/Volanti-RWing/*, build/Volanti-LTail/*, build/Volanti-RTail/*, build/Ottano-M1/*, build/Ottano-M2/*, build/Ottano-M3/*, build/Ottano-M4/*, build/Ottano-M5/*, build/Ottano-LWing/*, build/Ottano-RWing/*, build/Ottano-LTail/*, build/Ottano-RTail/*" + files: "build/CarbonixCubeOrangePlus/*, build/CubeOrange/*, build/CarbonixCubeOrange/*, build/sitl/*, build/CarbonixF405/*, build/Volanti-M1/*, build/Volanti-M2/*, build/Volanti-M3/*, build/Volanti-M4/*, build/Volanti-M5/*, build/Volanti-LWing/*, build/Volanti-RWing/*, build/Volanti-LTail/*, build/Volanti-RTail/*, build/Ottano-M1/*, build/Ottano-M2/*, build/Ottano-M3/*, build/Ottano-M4/*, build/Ottano-M5/*, build/Ottano-LWing/*, build/Ottano-RWing/*, build/Ottano-LTail/*, build/Ottano-RTail/*" fail: true - name: Install zip utility run: sudo apt-get install zip diff --git a/Tools/Carbonix_scripts/build_no_clean.sh b/Tools/Carbonix_scripts/build_no_clean.sh index f516940ed7..88f888e67c 100755 --- a/Tools/Carbonix_scripts/build_no_clean.sh +++ b/Tools/Carbonix_scripts/build_no_clean.sh @@ -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" == "CarbonixCubeOrange" ] || [ "$BOARD" == "sitl" ] +if [ "$BOARD" == "CubeOrange" ] || [ "$BOARD" == "CarbonixCubeOrange" ] || [ "$BOARD" == "CarbonixCubeOrangePlus" ] || [ "$BOARD" == "sitl" ] then echo "Compiling Plane for $BOARD..." ./waf plane diff --git a/Tools/Carbonix_scripts/carbonix_waf_build.sh b/Tools/Carbonix_scripts/carbonix_waf_build.sh index 75448f716a..87892dc5f7 100755 --- a/Tools/Carbonix_scripts/carbonix_waf_build.sh +++ b/Tools/Carbonix_scripts/carbonix_waf_build.sh @@ -21,7 +21,7 @@ fi echo "Running distclean..." ./waf distclean -main_boards=("CarbonixCubeOrange" "CubeOrange" "sitl") +main_boards=("CarbonixCubeOrangePlus" "CarbonixCubeOrange" "CubeOrange" "sitl") for board in "${main_boards[@]}"; do echo "Compiling Plane for $board..." diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CarbonixCubeOrangePlus/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/CarbonixCubeOrangePlus/defaults.parm new file mode 100644 index 0000000000..0f4375987e --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CarbonixCubeOrangePlus/defaults.parm @@ -0,0 +1,15 @@ +# setup default read only parameters here +SERVO1_FUNCTION 33 @READONLY +SERVO2_FUNCTION 34 @READONLY +SERVO3_FUNCTION 35 @READONLY +SERVO4_FUNCTION 36 @READONLY +SERVO5_FUNCTION 70 @READONLY +SERVO7_FUNCTION 21 @READONLY +SERVO8_FUNCTION -1 @READONLY +SERVO9_FUNCTION 94 @READONLY +SERVO10_FUNCTION 4 @READONLY +SERVO11_FUNCTION 19 @READONLY +EK3_ENABLE 1 @READONLY +BRD_SAFETYOPTION 3 @READONLY +BATT2_MONITOR 28 @READONLY +BATT3_MONITOR 28 @READONLY diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CarbonixCubeOrangePlus/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/CarbonixCubeOrangePlus/hwdef-bl.dat new file mode 100644 index 0000000000..34b86217d1 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CarbonixCubeOrangePlus/hwdef-bl.dat @@ -0,0 +1,4 @@ +# hw definition file for processing by chibios_hwdef.py +# for H743 bootloader + +include ../CubeOrangePlus/hwdef-bl.dat diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CarbonixCubeOrangePlus/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/CarbonixCubeOrangePlus/hwdef.dat new file mode 100644 index 0000000000..e5377c0ea1 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CarbonixCubeOrangePlus/hwdef.dat @@ -0,0 +1,336 @@ +# hw definition file for processing by chibios_hwdef.py + +include ../CubeOrangePlus/hwdef.dat + +undef HAL_NAVEKF3_AVAILABLE +undef HAL_NAVEKF2_AVAILABLE +undef HAL_EXTERNAL_AHRS_ENABLED +undef HAL_INS_TEMPERATURE_CAL_ENABLE +undef HAL_VISUALODOM_ENABLED +undef EK3_FEATURE_EXTERNAL_NAV +undef AP_VOLZ_ENABLED +undef AP_ROBOTISSERVO_ENABLED +undef AP_FETTEC_ONEWIRE_ENABLED +undef AP_AIRSPEED_ANALOG_ENABLED +undef AP_AIRSPEED_ASP5033_ENABLED +undef AP_AIRSPEED_DLVR_ENABLED +undef AP_AIRSPEED_MS4525_ENABLED +undef AP_AIRSPEED_MS5525_ENABLED +undef AP_AIRSPEED_MSP_ENABLED +undef AP_AIRSPEED_NMEA_ENABLED +undef AP_AIRSPEED_SDP3X_ENABLED +undef AP_AIRSPEED_UAVCAN_ENABLED +undef AP_BATTMON_FUELFLOW_ENABLE +undef AP_BATTMON_FUELLEVEL_PWM_ENABLE +undef AP_BATTMON_FUELLEVEL_ANALOG_ENABLE +undef AP_BATTMON_SMBUS_ENABLE +undef HAL_BATTMON_INA2XX_ENABLED +undef HAL_RUNCAM_ENABLED +undef MODE_ZIGZAG_ENABLED +undef MODE_SYSTEMID_ENABLED +undef MODE_SPORT_ENABLED +undef MODE_FOLLOW_ENABLED +undef MODE_TURTLE_ENABLED +undef MODE_GUIDED_NOGPS_ENABLED +undef MODE_FLOWHOLD_ENABLED +undef MODE_FLIP_ENABLED +undef HAL_PICCOLO_CAN_ENABLE +undef HAL_TORQEEDO_ENABLED +undef AP_GPS_UBLOX_ENABLED +undef AP_GPS_SBP2_ENABLED +undef AP_GPS_SBP_ENABLED +undef AP_GPS_ERB_ENABLED +undef AP_GPS_GSOF_ENABLED +undef AP_GPS_NMEA_ENABLED +undef AP_GPS_MAV_ENABLED +undef AP_GPS_NOVA_ENABLED +undef AP_GPS_SBF_ENABLED +undef AP_GPS_SIRF_ENABLED +undef HAL_MOUNT_ENABLED +undef HAL_MOUNT_ALEXMOS_ENABLED +undef HAL_MOUNT_GREMSY_ENABLED +undef HAL_MOUNT_SERVO_ENABLED +undef HAL_MOUNT_SIYI_ENABLED +undef HAL_SOLO_GIMBAL_ENABLED +undef HAL_MOUNT_STORM32MAVLINK_ENABLED +undef HAL_MOUNT_STORM32SERIAL_ENABLED +undef AP_ICENGINE_ENABLED +undef HAL_EFI_ENABLED +undef HAL_EFI_NWPWU_ENABLED +undef HAL_GENERATOR_ENABLED +undef HAL_ADSB_ENABLED +undef HAL_ADSB_SAGETECH_ENABLED +undef HAL_ADSB_SAGETECH_MXS_ENABLED +undef HAL_ADSB_UAVIONIX_MAVLINK_ENABLED +undef HAL_ADSB_UCP_ENABLED +undef AP_AIS_ENABLED +undef HAL_MSP_ENABLED +undef HAL_MSP_SENSORS_ENABLED +undef HAL_MSP_GPS_ENABLED +undef HAL_MSP_COMPASS_ENABLED +undef HAL_MSP_OPTICALFLOW_ENABLED +undef HAL_MSP_RANGEFINDER_ENABLED +undef HAL_WITH_MSP_DISPLAYPORT +undef OSD_ENABLED +undef HAL_PLUSCODE_ENABLE +undef OSD_PARAM_ENABLED +undef HAL_OSD_SIDEBAR_ENABLE +undef HAL_WITH_DSP +undef HAL_DISPLAY_ENABLED +undef HAL_NMEA_OUTPUT_ENABLED +undef HAL_BARO_WIND_COMP_ENABLED +undef GRIPPER_ENABLED +undef HAL_SPRAYER_ENABLED +undef LANDING_GEAR_ENABLED +undef WINCH_ENABLED +undef HAL_QUADPLANE_ENABLED +undef HAL_SOARING_ENABLED +undef HAL_LANDING_DEEPSTALL_ENABLED +undef AP_RANGEFINDER_ENABLED +undef AP_RANGEFINDER_ANALOG_ENABLED +undef AP_RANGEFINDER_BBB_PRU_ENABLED +undef AP_RANGEFINDER_BEBOP_ENABLED +undef AP_RANGEFINDER_BENEWAKE_CAN_ENABLED +undef AP_RANGEFINDER_BENEWAKE_TF02_ENABLED +undef AP_RANGEFINDER_BENEWAKE_TF03_ENABLED +undef AP_RANGEFINDER_BENEWAKE_TFMINI_ENABLED +undef AP_RANGEFINDER_BENEWAKE_TFMINIPLUS_ENABLED +undef AP_RANGEFINDER_BLPING_ENABLED +undef AP_RANGEFINDER_GYUS42V2_ENABLED +undef AP_RANGEFINDER_HC_SR04_ENABLED +undef AP_RANGEFINDER_LANBAO_ENABLED +undef AP_RANGEFINDER_LEDDARONE_ENABLED +undef AP_RANGEFINDER_LEDDARVU8_ENABLED +undef AP_RANGEFINDER_LIGHTWARE_SERIAL_ENABLED +undef AP_RANGEFINDER_LWI2C_ENABLED +undef AP_RANGEFINDER_MAVLINK_ENABLED +undef AP_RANGEFINDER_MAXBOTIX_SERIAL_ENABLED +undef AP_RANGEFINDER_MAXSONARI2CXL_ENABLED +undef AP_RANGEFINDER_NMEA_ENABLED +undef AP_RANGEFINDER_PULSEDLIGHTLRF_ENABLED +undef AP_RANGEFINDER_PWM_ENABLED +undef AP_RANGEFINDER_SIM_ENABLED +undef AP_RANGEFINDER_TRI2C_ENABLED +undef AP_RANGEFINDER_TERARANGER_SERIAL_ENABLED +undef AP_RANGEFINDER_UAVCAN_ENABLED +undef AP_RANGEFINDER_USD1_CAN_ENABLED +undef AP_RANGEFINDER_USD1_SERIAL_ENABLED +undef AP_RANGEFINDER_VL53L0X_ENABLED +undef AP_RANGEFINDER_VL53L1X_ENABLED +undef AP_RANGEFINDER_WASP_ENABLED +undef HAL_PARACHUTE_ENABLED +undef AP_FENCE_ENABLED +undef HAL_PROXIMITY_ENABLED +undef AC_AVOID_ENABLED +undef AC_OAPATHPLANNER_ENABLED +undef AP_OPTICALFLOW_ENABLED +undef AP_OPTICALFLOW_CXOF_ENABLED +undef AP_OPTICALFLOW_HEREFLOW_ENABLED +undef AP_OPTICALFLOW_MAV_ENABLED +undef AP_OPTICALFLOW_ONBOARD_ENABLED +undef AP_OPTICALFLOW_PX4FLOW_ENABLED +undef AP_OPTICALFLOW_PIXART_ENABLED +undef AP_OPTICALFLOW_UPFLOW_ENABLED +undef AP_BARO_BMP085_ENABLED +undef AP_BARO_BMP280_ENABLED +undef AP_BARO_BMP388_ENABLED +undef AP_BARO_DPS280_ENABLED +undef AP_BARO_DUMMY_ENABLED +undef AP_BARO_EXTERNALAHRS_ENABLED +undef AP_BARO_FBM320_ENABLED +undef AP_BARO_ICM20789_ENABLED +undef AP_BARO_KELLERLD_ENABLED +undef AP_BARO_LPS2XH_ENABLED +undef AP_BARO_MS56XX_ENABLED +undef AP_BARO_MSP_ENABLED +undef AP_BARO_SPL06_ENABLED +undef AP_BARO_UAVCAN_ENABLED +undef AP_BARO_ICP101XX_ENABLED +undef AP_BARO_ICP201XX_ENABLED +undef RPM_ENABLED +undef AP_AIRSPEED_ENABLED +undef BEACON_ENABLED +undef GPS_MOVING_BASELINE +undef HAL_CRSF_TELEM_ENABLED +undef HAL_CRSF_TELEM_TEXT_SELECTION_ENABLED +undef HAL_HIGH_LATENCY2_ENABLED +undef HAL_HOTT_TELEM_ENABLED +undef HAL_SPEKTRUM_TELEM_ENABLED +undef AP_LTM_TELEM_ENABLED +undef AP_MOTORS_FRAME_QUAD_ENABLED +undef AP_MOTORS_FRAME_HEXA_ENABLED +undef AP_MOTORS_FRAME_OCTA_ENABLED +undef AP_MOTORS_FRAME_DECA_ENABLED +undef AP_MOTORS_FRAME_DODECAHEXA_ENABLED +undef AP_MOTORS_FRAME_Y6_ENABLED +undef AP_MOTORS_FRAME_OCTAQUAD_ENABLED +undef HAL_SMARTAUDIO_ENABLED +undef AP_TRAMP_ENABLED +undef AP_ICENGINE_TCA9554_STARTER_ENABLED + + +define HAL_NAVEKF3_AVAILABLE 1 +define HAL_NAVEKF2_AVAILABLE 0 +define HAL_EXTERNAL_AHRS_ENABLED 1 +define HAL_INS_TEMPERATURE_CAL_ENABLE 1 +define HAL_VISUALODOM_ENABLED 0 +define EK3_FEATURE_EXTERNAL_NAV 1 +define AP_VOLZ_ENABLED 0 +define AP_ROBOTISSERVO_ENABLED 0 +define AP_FETTEC_ONEWIRE_ENABLED 0 +define AP_AIRSPEED_ANALOG_ENABLED 0 +define AP_AIRSPEED_ASP5033_ENABLED 0 +define AP_AIRSPEED_DLVR_ENABLED 1 +define AP_AIRSPEED_MS4525_ENABLED 0 +define AP_AIRSPEED_MS5525_ENABLED 0 +define AP_AIRSPEED_MSP_ENABLED 0 +define AP_AIRSPEED_NMEA_ENABLED 0 +define AP_AIRSPEED_SDP3X_ENABLED 0 +define AP_AIRSPEED_UAVCAN_ENABLED 1 +define AP_BATTMON_FUELFLOW_ENABLE 1 +define AP_BATTMON_FUELLEVEL_PWM_ENABLE 1 +define AP_BATTMON_FUELLEVEL_ANALOG_ENABLE 1 +define AP_BATTMON_SMBUS_ENABLE 0 +define HAL_BATTMON_INA2XX_ENABLED 0 +define HAL_RUNCAM_ENABLED 0 +define MODE_ZIGZAG_ENABLED 0 +define MODE_SYSTEMID_ENABLED 0 +define MODE_SPORT_ENABLED 0 +define MODE_FOLLOW_ENABLED 0 +define MODE_TURTLE_ENABLED 0 +define MODE_GUIDED_NOGPS_ENABLED 0 +define MODE_FLOWHOLD_ENABLED 0 +define MODE_FLIP_ENABLED 0 +define HAL_PICCOLO_CAN_ENABLE 0 +define HAL_TORQEEDO_ENABLED 0 +define AP_GPS_UBLOX_ENABLED 1 +define AP_GPS_SBP2_ENABLED 0 +define AP_GPS_SBP_ENABLED 0 +define AP_GPS_ERB_ENABLED 0 +define AP_GPS_GSOF_ENABLED 0 +define AP_GPS_NMEA_ENABLED 0 +define AP_GPS_MAV_ENABLED 1 +define AP_GPS_NOVA_ENABLED 0 +define AP_GPS_SBF_ENABLED 0 +define AP_GPS_SIRF_ENABLED 0 +define HAL_MOUNT_ENABLED 1 +define HAL_MOUNT_ALEXMOS_ENABLED 1 +define HAL_MOUNT_GREMSY_ENABLED 1 +define HAL_MOUNT_SERVO_ENABLED 1 +define HAL_MOUNT_SIYI_ENABLED 1 +define HAL_SOLO_GIMBAL_ENABLED 1 +define HAL_MOUNT_STORM32MAVLINK_ENABLED 1 +define HAL_MOUNT_STORM32SERIAL_ENABLED 1 +define AP_ICENGINE_ENABLED 1 +define HAL_EFI_ENABLED 1 +define HAL_EFI_NWPWU_ENABLED 0 +define HAL_GENERATOR_ENABLED 1 +define HAL_ADSB_ENABLED 1 +define HAL_ADSB_SAGETECH_ENABLED 1 +define HAL_ADSB_SAGETECH_MXS_ENABLED 1 +define HAL_ADSB_UAVIONIX_MAVLINK_ENABLED 1 +define HAL_ADSB_UCP_ENABLED 1 +define AP_AIS_ENABLED 0 +define HAL_MSP_ENABLED 0 +define HAL_MSP_SENSORS_ENABLED 0 +define HAL_MSP_GPS_ENABLED 0 +define HAL_MSP_COMPASS_ENABLED 0 +define HAL_MSP_OPTICALFLOW_ENABLED 0 +define HAL_MSP_RANGEFINDER_ENABLED 0 +define HAL_WITH_MSP_DISPLAYPORT 0 +define OSD_ENABLED 0 +define HAL_PLUSCODE_ENABLE 0 +define OSD_PARAM_ENABLED 0 +define HAL_OSD_SIDEBAR_ENABLE 0 +define HAL_WITH_DSP 1 +define HAL_DISPLAY_ENABLED 0 +define HAL_NMEA_OUTPUT_ENABLED 0 +define HAL_BARO_WIND_COMP_ENABLED 0 +define GRIPPER_ENABLED 0 +define HAL_SPRAYER_ENABLED 0 +define LANDING_GEAR_ENABLED 0 +define WINCH_ENABLED 0 +define HAL_QUADPLANE_ENABLED 1 +define HAL_SOARING_ENABLED 0 +define HAL_LANDING_DEEPSTALL_ENABLED 0 +define AP_RANGEFINDER_ENABLED 1 +define AP_RANGEFINDER_ANALOG_ENABLED 0 +define AP_RANGEFINDER_BBB_PRU_ENABLED 0 +define AP_RANGEFINDER_BEBOP_ENABLED 0 +define AP_RANGEFINDER_BENEWAKE_CAN_ENABLED 0 +define AP_RANGEFINDER_BENEWAKE_TF02_ENABLED 0 +define AP_RANGEFINDER_BENEWAKE_TF03_ENABLED 0 +define AP_RANGEFINDER_BENEWAKE_TFMINI_ENABLED 0 +define AP_RANGEFINDER_BENEWAKE_TFMINIPLUS_ENABLED 0 +define AP_RANGEFINDER_BLPING_ENABLED 0 +define AP_RANGEFINDER_GYUS42V2_ENABLED 0 +define AP_RANGEFINDER_HC_SR04_ENABLED 0 +define AP_RANGEFINDER_LANBAO_ENABLED 0 +define AP_RANGEFINDER_LEDDARONE_ENABLED 0 +define AP_RANGEFINDER_LEDDARVU8_ENABLED 0 +define AP_RANGEFINDER_LIGHTWARE_SERIAL_ENABLED 1 +define AP_RANGEFINDER_LWI2C_ENABLED 0 +define AP_RANGEFINDER_MAVLINK_ENABLED 0 +define AP_RANGEFINDER_MAXBOTIX_SERIAL_ENABLED 0 +define AP_RANGEFINDER_MAXSONARI2CXL_ENABLED 0 +define AP_RANGEFINDER_NMEA_ENABLED 0 +define AP_RANGEFINDER_PULSEDLIGHTLRF_ENABLED 0 +define AP_RANGEFINDER_PWM_ENABLED 0 +define AP_RANGEFINDER_SIM_ENABLED 0 +define AP_RANGEFINDER_TRI2C_ENABLED 0 +define AP_RANGEFINDER_TERARANGER_SERIAL_ENABLED 0 +define AP_RANGEFINDER_UAVCAN_ENABLED 1 +define AP_RANGEFINDER_USD1_CAN_ENABLED 0 +define AP_RANGEFINDER_USD1_SERIAL_ENABLED 0 +define AP_RANGEFINDER_VL53L0X_ENABLED 0 +define AP_RANGEFINDER_VL53L1X_ENABLED 0 +define AP_RANGEFINDER_WASP_ENABLED 0 +define HAL_PARACHUTE_ENABLED 1 +define AP_FENCE_ENABLED 1 +define HAL_PROXIMITY_ENABLED 1 +define AC_AVOID_ENABLED 1 +define AC_OAPATHPLANNER_ENABLED 1 +define AP_OPTICALFLOW_ENABLED 0 +define AP_OPTICALFLOW_CXOF_ENABLED 0 +define AP_OPTICALFLOW_HEREFLOW_ENABLED 0 +define AP_OPTICALFLOW_MAV_ENABLED 0 +define AP_OPTICALFLOW_ONBOARD_ENABLED 0 +define AP_OPTICALFLOW_PX4FLOW_ENABLED 0 +define AP_OPTICALFLOW_PIXART_ENABLED 0 +define AP_OPTICALFLOW_UPFLOW_ENABLED 0 +define AP_BARO_BMP085_ENABLED 0 +define AP_BARO_BMP280_ENABLED 0 +define AP_BARO_BMP388_ENABLED 0 +define AP_BARO_DPS280_ENABLED 0 +define AP_BARO_DUMMY_ENABLED 0 +define AP_BARO_EXTERNALAHRS_ENABLED 1 +define AP_BARO_FBM320_ENABLED 0 +define AP_BARO_ICM20789_ENABLED 0 +define AP_BARO_KELLERLD_ENABLED 0 +define AP_BARO_LPS2XH_ENABLED 0 +define AP_BARO_MS56XX_ENABLED 1 +define AP_BARO_MSP_ENABLED 0 +define AP_BARO_SPL06_ENABLED 0 +define AP_BARO_UAVCAN_ENABLED 1 +define AP_BARO_ICP101XX_ENABLED 0 +define AP_BARO_ICP201XX_ENABLED 0 +define RPM_ENABLED 1 +define AP_AIRSPEED_ENABLED 1 +define BEACON_ENABLED 0 +define GPS_MOVING_BASELINE 1 +define HAL_CRSF_TELEM_ENABLED 1 +define HAL_CRSF_TELEM_TEXT_SELECTION_ENABLED 0 +define HAL_HIGH_LATENCY2_ENABLED 1 +define HAL_HOTT_TELEM_ENABLED 0 +define HAL_SPEKTRUM_TELEM_ENABLED 0 +define AP_LTM_TELEM_ENABLED 0 +define AP_MOTORS_FRAME_QUAD_ENABLED 1 +define AP_MOTORS_FRAME_HEXA_ENABLED 0 +define AP_MOTORS_FRAME_OCTA_ENABLED 0 +define AP_MOTORS_FRAME_DECA_ENABLED 0 +define AP_MOTORS_FRAME_DODECAHEXA_ENABLED 0 +define AP_MOTORS_FRAME_Y6_ENABLED 0 +define AP_MOTORS_FRAME_OCTAQUAD_ENABLED 0 +define HAL_SMARTAUDIO_ENABLED 0 +define AP_TRAMP_ENABLED 0 +define AP_ICENGINE_TCA9554_STARTER_ENABLED 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CarbonixCubeOrangePlus/scripts/CX_LED_driver.lua b/libraries/AP_HAL_ChibiOS/hwdef/CarbonixCubeOrangePlus/scripts/CX_LED_driver.lua new file mode 100644 index 0000000000..7af9391232 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/CarbonixCubeOrangePlus/scripts/CX_LED_driver.lua @@ -0,0 +1,49 @@ + +-- LED is switched on using motor function +local MOTOR_LED_FUNCTION = 94 + +-- Ensure that the out2_function min = 200 and max = 10000 +local MOTOR_LED_PWM_VAL_TRIM = 5000 +local MOTOR_LED_PWM_VAL_MIN = 200 +local MOTOR_LED_PWM_VAL_MAX = 10000 +local MOTOR_LED_PWM_VAL_OFF = 0 + +-- Arming check interval +local LED_CYCLE_TIME = 2000 + + +local LED_servo = SRV_Channels:find_channel(MOTOR_LED_FUNCTION) + + +gcs:send_text(0, "LED -- BEGIN") + + +-- LED is switched ON using a PWM signal configured as MOTOR_LED_FUNCTION +-- This is done to overcome the design limitations on CPN +local function switch_LED(LED_val) + + if (LED_servo ~= null) then + SRV_Channels:set_output_pwm_chan_timeout(LED_servo, LED_val, LED_CYCLE_TIME) + end + + return check_arming, LED_CYCLE_TIME +end + + + +-- Function to continuously check if the vehicle is armed or not +-- ARMED -> LED_ON +-- DISARMED -> LED_OFF +local function check_arming() + vehicle_armed = arming:is_armed() + + if vehicle_armed == true then + switch_LED(MOTOR_LED_PWM_VAL_MAX) + else + switch_LED(MOTOR_LED_PWM_VAL_MIN) + end + + return check_arming, LED_CYCLE_TIME +end + +return check_arming(), 10000