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

hwdef fixups #215

Merged
merged 3 commits into from
Oct 15, 2024
Merged
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: 4 additions & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/CarbonixCommon/features.inc
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ undef AP_MOTORS_FRAME_Y6_ENABLED
undef AP_SMARTAUDIO_ENABLED
undef AP_TRAMP_ENABLED
undef AP_VIDEOTX_ENABLED
undef AP_ICENGINE_TCA9554_STARTER_ENABLED

define HAL_EXTERNAL_AHRS_ENABLED 1
define AP_EXTERNAL_AHRS_MICROSTRAIN5_ENABLED 0
Expand Down Expand Up @@ -612,4 +611,8 @@ define AP_MOTORS_FRAME_Y6_ENABLED 0
define AP_SMARTAUDIO_ENABLED 0
define AP_TRAMP_ENABLED 0
define AP_VIDEOTX_ENABLED 0

# Additional features manually added
# (not found in build_options.py, so not settable on custom build server)
define AP_ICENGINE_TCA9554_STARTER_ENABLED 1
define AP_MAVLINK_FAILURE_CREATION_ENABLED 0
16 changes: 12 additions & 4 deletions libraries/AP_HAL_ChibiOS/hwdef/CarbonixF405/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@ PB9 CAN1_TX CAN1
define HAL_USE_ADC TRUE
define STM32_ADC_USE_ADC1 TRUE

PA5 VSENSE1 ADC1 SCALE(1)
PA6 VSENSE2 ADC1 SCALE(1)
PB0 VSENSE3 ADC1 SCALE(1)
PB1 VSENSE4 ADC1 SCALE(1)
# The scaling for ADC_1 and ADC_2 is wrong below, but the resistor divider
# values vary *wildly* between revisions. If these are ever used in the future,
# the scaling will need to be parameter controlled.
PA5 VSENSE1 ADC1 SCALE(1) # V_SERVO, ChibiOS ADC Pin 5,
PA6 VSENSE2 ADC1 SCALE(1) # 5V_SENSE, ChibiOS ADC Pin 6
PB0 VSENSE3 ADC1 SCALE(1.556) # CN7 Pin 5 VSENSE, ChibiOS ADC Pin 8,
PB1 VSENSE4 ADC1 SCALE(1) # CN9 Output Power Current Sense, ChibiOS ADC Pin 9, 400mV/A

define AP_STATS_ENABLED 1

Expand Down Expand Up @@ -150,6 +153,11 @@ define HAL_PERIPH_ENABLE_RANGEFINDER 1
define HAL_PERIPH_ENABLE_ESC_APD
define APD_ESC_INSTANCES 1

# enable battery monitor and fuel sensor
define HAL_PERIPH_ENABLE_BATTERY
define AP_BATTERY_FUELLEVEL_ANALOG_ENABLED 1
define AP_BATT_MONITOR_MAX_INSTANCES 1

# enable sending ESC ExtendedStatus
define AP_EXTENDED_ESC_TELEM_ENABLED 1

Expand Down
Loading