36 #include "rosflight.h" 149 for (uint8_t chan = 0; chan < static_cast<uint8_t>(
SWITCHES_COUNT); chan++)
151 char channel_name[18];
155 strcpy(channel_name,
"ARM");
159 strcpy(channel_name,
"ATTITUDE OVERRIDE");
163 strcpy(channel_name,
"THROTTLE OVERRIDE");
167 strcpy(channel_name,
"ATTITUDE TYPE");
171 strcpy(channel_name,
"INVALID");
208 bool failsafe =
false;
221 if (pwm < -0.25 || pwm > 1.25)
242 prev_time_ms = now_ms;
315 for (uint8_t channel = 0; channel < static_cast<uint8_t>(
STICKS_COUNT); channel++)
318 if (
sticks[channel].one_sided)
329 for (uint8_t channel = 0; channel < static_cast<uint8_t>(
SWITCHES_COUNT); channel++)
333 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 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 add_callback(std::function< void(int)> callback, uint16_t param_id)
const State & state() const
volatile float stick_values[STICKS_COUNT]
void log(CommLink::LogSeverity severity, const char *fmt,...)
void param_change_callback(uint16_t param_id)
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()