Skip to content

Commit

Permalink
AP_Periph: support FSOPowerStack
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Feb 10, 2024
1 parent dfec4b1 commit dae2570
Show file tree
Hide file tree
Showing 7 changed files with 709 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Tools/AP_Periph/AP_Periph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ void AP_Periph_FW::init()
relay.init();
#endif

#ifdef HAL_PERIPH_ENABLE_FSO_POWER_STACK
FSO_power_stack.init();
#endif

#if AP_SCRIPTING_ENABLED
scripting.init();
#endif
Expand Down Expand Up @@ -474,6 +478,10 @@ void AP_Periph_FW::update()
#ifdef HAL_PERIPH_ENABLE_BATTERY_BALANCE
batt_balance_update();
#endif

#ifdef HAL_PERIPH_ENABLE_FSO_POWER_STACK
FSO_power_stack.update();
#endif

static uint32_t fiftyhz_last_update_ms;
if (now - fiftyhz_last_update_ms >= 20) {
Expand Down
8 changes: 8 additions & 0 deletions Tools/AP_Periph/AP_Periph.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
#endif
#include <AP_AHRS/AP_AHRS.h>

#ifdef HAL_PERIPH_ENABLE_FSO_POWER_STACK
#include "FSOPowerStack.h"
#endif

#ifdef HAL_PERIPH_ENABLE_RELAY
#ifdef HAL_PERIPH_ENABLE_PWM_HARDPOINT
#error "Relay and PWM_HARDPOINT both use hardpoint message"
Expand Down Expand Up @@ -354,6 +358,10 @@ class AP_Periph_FW {
BattBalance battery_balance;
#endif

#ifdef HAL_PERIPH_ENABLE_FSO_POWER_STACK
FSOPowerStack FSO_power_stack;
#endif

#ifdef HAL_PERIPH_ENABLE_SERIAL_OPTIONS
SerialOptions serial_options;
#endif
Expand Down
Loading

0 comments on commit dae2570

Please sign in to comment.