34 #include "rosflight.h" 116 for (uint8_t chan = 0; chan < static_cast<uint8_t>(
SWITCHES_COUNT); chan++)
118 char channel_name[18];
122 strcpy(channel_name,
"ARM");
126 strcpy(channel_name,
"ATTITUDE OVERRIDE");
130 strcpy(channel_name,
"THROTTLE OVERRIDE");
134 strcpy(channel_name,
"ATTITUDE TYPE");
138 strcpy(channel_name,
"INVALID");
175 bool failsafe =
false;
188 if (pwm < -0.25 || pwm > 1.25)
209 prev_time_ms = now_ms;
280 for (uint8_t channel = 0; channel < static_cast<uint8_t>(
STICKS_COUNT); channel++)
283 if (
sticks[channel].one_sided)
294 for (uint8_t channel = 0; channel < static_cast<uint8_t>(
SWITCHES_COUNT); channel++)
298 if (
switches[channel].direction < 0)
bool switch_mapped(Switch channel)
virtual float rc_read(uint8_t channel)=0
rc_switch_config_t switches[SWITCHES_COUNT]
void log(CommLinkInterface::LogSeverity severity, const char *fmt,...)
void set_event(Event event)
rc_stick_config_t sticks[STICKS_COUNT]
bool switch_on(Switch channel)
float stick(Stick channel)
CommManager comm_manager_
uint32_t time_sticks_have_been_in_arming_position_ms
float get_param_float(uint16_t id) const
Get the value of a floating point parameter by id.
void param_change_callback(uint16_t param_id) override
const State & state() const
volatile float stick_values[STICKS_COUNT]
virtual uint32_t clock_millis()=0
int get_param_int(uint16_t id) const
Get the value of an integer parameter by id.
volatile bool switch_values[SWITCHES_COUNT]
StateManager state_manager_
uint32_t last_rc_receive_time
virtual void rc_init(rc_type_t rc_type)=0
void look_for_arm_disarm_signal()