Skip to content

Commit 07c0f74

Browse files
AP_Periph: fix HerePro build
1 parent 6c34d61 commit 07c0f74

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed

AP_Periph/AP_Periph.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ void AP_Periph_FW::init()
162162
#ifdef I2C_SLAVE_ENABLED
163163
enable_gps = !g.serial_i2c_mode;
164164
#endif
165-
166-
if (gps.get_type(0) != AP_GPS::GPS_Type::GPS_TYPE_NONE && enable_gps) {
165+
if (enable_gps) {
167166
gps.init();
168167
} else {
169168
#ifdef GPIO_USART1_RX
@@ -381,6 +380,15 @@ void AP_Periph_FW::prepare_reboot()
381380
hal.scheduler->delay(40);
382381
}
383382

383+
384+
/*
385+
reboot, optionally holding in bootloader. For scripting
386+
*/
387+
void AP_Periph_FW::reboot(bool hold_in_bootloader)
388+
{
389+
hal.scheduler->reboot(hold_in_bootloader);
390+
}
391+
384392
AP_Periph_FW *AP_Periph_FW::_singleton;
385393

386394
AP_Periph_FW& AP::periph()

AP_Periph/AP_Periph.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ class AP_Periph_FW {
218218

219219
void show_progress(uint32_t pct);
220220

221+
// reboot the peripheral, optionally holding in bootloader
222+
void reboot(bool hold_in_bootloader);
223+
221224
static uint64_t get_tracked_tx_timestamp(uint8_t i);
222225

223226
#ifdef HAL_USB_VBUS_SENS_CHAN

AP_Periph/sensor_gps.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
void AP_Periph_DroneCAN::can_gps_update(void)
1414
{
1515
auto &gps = periph.gps;
16-
if (gps.get_type(0) == AP_GPS::GPS_Type::GPS_TYPE_NONE) {
17-
return;
18-
}
19-
2016
// we need to record this time as its reset when we call gps.update()
2117
uint64_t last_message_local_time_us = gps.last_pps_time_usec();
2218
gps.update();

HerePro/hwdef-bl.dat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,3 @@ PE12 SLEEP_CAN2 OUTPUT PUSHPULL SPEED_LOW HIGH
8181
PB7 SWITCH_CAN2_USB OUTPUT PUSHPULL SPEED_LOW LOW
8282

8383
define CAN_APP_NODE_NAME "com.cubepilot.herepro"
84-
define STM32_HAS_M4 FALSE

HerePro/hwdef.dat

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -215,17 +215,10 @@ define HAL_USB_VBUS_SENS_CHAN 16
215215

216216
define CAN_APP_NODE_NAME "com.cubepilot.herepro"
217217

218-
define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN"
219-
220-
define COMPASS_CAL_ENABLED 0
221-
222-
define HAL_ENABLE_SLCAN 1
223-
# passthrough CAN1
224-
define HAL_DEFAULT_CPORT 1
225-
226218
define CONFIGURE_PPS_PIN TRUE
227219
define AP_PERIPH_HAVE_LED TRUE
228220

221+
define AP_SCRIPTING_ENABLED 1
229222
define SCRIPTING_HEAP_SIZE (64*1024)
230223

231224
define GPS_MOVING_BASELINE 1
@@ -242,9 +235,9 @@ define HAL_PERIPH_LISTEN_FOR_SERIAL_UART_REBOOT_CMD_PORT 0
242235

243236
HAL_USE_USB_MSD 1
244237
define MSD_THD_PRIO NORMALPRIO
245-
define AP_RC_CHANNEL_ENABLED 1
246238
#define HAL_BRD_OPTIONS_DEFAULT 8
247239

248-
define STM32_HAS_M4 FALSE
249-
250240
define AP_SERIALLED_ENABLED 1
241+
define HAL_EFI_ENABLED 0
242+
define AP_FILESYSTEM_ROMFS_ENABLED 1
243+
define UBLOX_RXM_RAW_LOGGING 1

0 commit comments

Comments
 (0)