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:fix bug in AtomRCF405NAVI,fix some bds that aren't building #25271

Merged
merged 3 commits into from
Oct 17, 2023
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
2 changes: 2 additions & 0 deletions Tools/Replay/Replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ const struct AP_Param::GroupInfo GCS_MAVLINK_Parameters::var_info[] = {
};
GCS_Dummy _gcs;

#if AP_ADVANCEDFAILSAFE_ENABLED
AP_AdvancedFailsafe *AP::advancedfailsafe() { return nullptr; }
bool AP_AdvancedFailsafe::gcs_terminate(bool should_terminate, const char *reason) { return false; }
#endif

// dummy method to avoid linking AP_Avoidance
// AP_Avoidance *AP::ap_avoidance() { return nullptr; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ void set_object_value_and_report(const void *object_pointer,

const AP_HAL::HAL& hal = AP_HAL::get_HAL();
static AP_SerialManager serial_manager;
#if AP_BEACON_ENABLED
AP_Beacon beacon;
#endif

// try to set the object value but provide diagnostic if it failed
void set_object_value_and_report(const void *object_pointer,
Expand All @@ -31,14 +33,19 @@ void set_object_value_and_report(const void *object_pointer,

void setup(void)
{
#if AP_BEACON_ENABLED
set_object_value_and_report(&beacon, beacon.var_info, "_TYPE", 2.0f);
set_object_value_and_report(&serial_manager, serial_manager.var_info, "0_PROTOCOL", 13.0f);
#endif
serial_manager.init();
#if AP_BEACON_ENABLED
beacon.init();
#endif
}

void loop(void)
{
#if AP_BEACON_ENABLED
static int count = 0;
beacon.update();
Vector3f pos;
Expand All @@ -51,6 +58,10 @@ void loop(void)
hal.scheduler->delay(1000);
if (count == 3)
exit(0);
#else
printf("Beacon not available\n");
hal.scheduler->delay(1000);
#endif
}

AP_HAL_MAIN();
11 changes: 6 additions & 5 deletions libraries/AP_HAL_ChibiOS/hwdef/AtomRCF405NAVI/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ PA12 OTG_FS_DP OTG1
PC8 TIM3_CH3 TIM3 PWM(1) GPIO(50)
PC9 TIM3_CH4 TIM3 PWM(2) GPIO(51)
PA8 TIM1_CH1 TIM1 PWM(3) GPIO(52)
PB1 TIM1_CH3N TIM1 PWM(4) GPIO(53)
PB1 TIM8_CH3N TIM8 PWM(4) GPIO(53)
PA15 TIM2_CH1 TIM2 PWM(5) GPIO(54)
PB10 TIM2_CH3 TIM2 PWM(6) GPIO(55)
PB11 TIM2_CH4 TIM2 PWM(7) GPIO(56)
PB0 TIM1_CH2N TIM1 PWM(8) GPIO(57)
PB0 TIM8_CH2N TIM8 PWM(8) GPIO(57)
PB7 TIM4_CH2 TIM4 PWM(9) GPIO(58) # LED strip

define HAL_STORAGE_SIZE 15360
Expand Down Expand Up @@ -157,9 +157,10 @@ ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin
define AP_PARAM_MAX_EMBEDDED_PARAM 256

# save some flash
include ../include/minimal_GPS.inc
include ../include/minimize_fpv_osd.inc
include ../include/save_some_flash.inc
define AP_BATTERY_SMBUS_ENABLED 0

define HAL_PARACHUTE_ENABLED 0
define HAL_SPRAYER_ENABLED 0
define AP_BATTERY_SYNTHETIC_CURRENT_ENABLED 0


3 changes: 3 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/FlywooF405Pro/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,6 @@ define HAL_COMPASS_AUTO_ROT_DEFAULT 2
define HAL_DEFAULT_INS_FAST_SAMPLE 3
# Motor order implies Betaflight/X for standard ESCs
define HAL_FRAME_TYPE_DEFAULT 12

include ../include/minimize_fpv_osd.inc
AUTOBUILD_TARGETS Copter
4 changes: 1 addition & 3 deletions libraries/AP_HAL_ChibiOS/hwdef/KakuteF7Mini/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin

define STM32_PWM_USE_ADVANCED TRUE

# disable SMBUS battery monitors to save flash
define AP_BATTERY_SMBUS_ENABLED 0

# disable parachute and sprayer to save flash
define HAL_PARACHUTE_ENABLED 0
define HAL_SPRAYER_ENABLED 0
Expand All @@ -166,3 +163,4 @@ define HAL_MOUNT_ENABLED 0

# save some flash
include ../include/save_some_flash.inc
include ../include/minimize_fpv_osd.inc
5 changes: 3 additions & 2 deletions libraries/AP_HAL_ChibiOS/hwdef/MatekF405-TE/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,10 @@ define HAL_GYROFFT_ENABLED 0

# --------------------- save flash ----------------------
# save some flash
include ../include/minimize_fpv_osd.inc
include ../include/save_some_flash.inc
include ../include/no_bootloader_DFU.inc
define AP_BATTERY_SMBUS_ENABLED 0

define HAL_PARACHUTE_ENABLED 0
define HAL_SPRAYER_ENABLED 0
define AP_GRIPPER_ENABLED 0
Expand All @@ -188,4 +189,4 @@ define HAL_NMEA_OUTPUT_ENABLED 0
define HAL_BUTTON_ENABLED 0
define AP_NOTIFY_OREOLED_ENABLED 0
define HAL_PICCOLO_CAN_ENABLE 0
define AP_BATTERY_SYNTHETIC_CURRENT_ENABLED 0

12 changes: 1 addition & 11 deletions libraries/AP_HAL_ChibiOS/hwdef/MatekF405-Wing/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -182,22 +182,13 @@ ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin

define STM32_PWM_USE_ADVANCED TRUE

# disable SMBUS battery monitors to save flash
define AP_BATTERY_SMBUS_ENABLED 0

# disable parachute and sprayer to save flash
define HAL_PARACHUTE_ENABLED 0
define HAL_SPRAYER_ENABLED 0

# reduce max size of embedded params for apj_tool.py
define AP_PARAM_MAX_EMBEDDED_PARAM 1024
define HAL_GYROFFT_ENABLED 0

# save some flash
include ../include/save_some_flash.inc
define AP_GRIPPER_ENABLED 0
define AP_BATTERY_SYNTHETIC_CURRENT_ENABLED 0
define AP_BATTERY_SMBUS_ENABLED 0
define HAL_PARACHUTE_ENABLED 0
define HAL_SPRAYER_ENABLED 0
define HAL_RUNCAM_ENABLED 0
Expand All @@ -207,6 +198,5 @@ define HAL_BUTTON_ENABLED 0
define AP_NOTIFY_OREOLED_ENABLED 0
define HAL_PICCOLO_CAN_ENABLE 0

# only include ublox GPS driver
include ../include/minimal_GPS.inc
include ../include/minimize_fpv_osd.inc

3 changes: 3 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/SpeedyBeeF405Mini/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,6 @@ define HAL_COMPASS_AUTO_ROT_DEFAULT 2
define HAL_DEFAULT_INS_FAST_SAMPLE 3
# Motor order implies Betaflight/X for standard ESCs
define HAL_FRAME_TYPE_DEFAULT 12

include ../include/minimize_fpv_osd.inc
AUTOBUILD_TARGETS Copter
3 changes: 1 addition & 2 deletions libraries/AP_HAL_ChibiOS/hwdef/omnibusf4/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ APJ_BOARD_ID 1002
PC8 SBUS_INVERT_RX OUTPUT LOW
PC9 SBUS_INVERT_TX OUTPUT LOW

# only include ublox GPS driver
include ../include/minimal_GPS.inc

7 changes: 1 addition & 6 deletions libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@ define STM32_PWM_USE_ADVANCED TRUE
#font for the osd
ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin

# disable SMBUS monitors to save flash
define AP_BATTERY_SMBUS_ENABLED 0

# disable parachute and sprayer to save flash
define HAL_PARACHUTE_ENABLED 0
define HAL_SPRAYER_ENABLED 0
Expand All @@ -162,7 +159,5 @@ define AP_PARAM_MAX_EMBEDDED_PARAM 1024

# save some flash
include ../include/save_some_flash.inc
define AP_BATTERY_SYNTHETIC_CURRENT_ENABLED 0

# only include ublox GPS driver
include ../include/minimal_GPS.inc
include ../include/minimize_fpv_osd.inc
2 changes: 2 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/revo-mini-i2c/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,5 @@ define HAL_GYROFFT_ENABLED 0

# bootloader embedding / bootloader flashing not available
define AP_BOOTLOADER_FLASHING_ENABLED 0
include ../include/minimize_fpv_osd.inc

1 change: 1 addition & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/revo-mini/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,4 @@ define HAL_LOGGING_DATAFLASH_ENABLED 1

define HAL_GYROFFT_ENABLED 0

include ../include/minimize_fpv_osd.inc