32 #ifndef ROSFLIGHT_FIRMWARE_COMM_LINK_H 33 #define ROSFLIGHT_FIRMWARE_COMM_LINK_H 61 COMMAND_SET_PARAM_DEFAULTS,
62 COMMAND_ACCEL_CALIBRATION,
63 COMMAND_GYRO_CALIBRATION,
64 COMMAND_BARO_CALIBRATION,
65 COMMAND_AIRSPEED_CALIBRATION,
66 COMMAND_RC_CALIBRATION,
68 COMMAND_REBOOT_TO_BOOTLOADER,
77 ROLLRATE_PITCHRATE_YAWRATE_THROTTLE,
78 ROLL_PITCH_YAWRATE_THROTTLE
115 virtual void param_request_list_callback(uint8_t target_system) = 0;
116 virtual void param_request_read_callback(uint8_t target_system,
117 const char *
const param_name,
118 int16_t param_index) = 0;
119 virtual void param_set_int_callback(uint8_t target_system,
const char *
const param_name, int32_t param_value) = 0;
120 virtual void param_set_float_callback(uint8_t target_system,
const char *
const param_name,
float param_value) = 0;
122 virtual void timesync_callback(int64_t tc1, int64_t ts1) = 0;
123 virtual void offboard_control_callback(
const OffboardControl &control) = 0;
124 virtual void aux_command_callback(
const AuxCommand &command) = 0;
126 virtual void heartbeat_callback() = 0;
129 virtual void init(uint32_t baud_rate, uint32_t dev) = 0;
135 uint64_t timestamp_us,
140 virtual void send_diff_pressure(uint8_t system_id,
float velocity,
float pressure,
float temperature) = 0;
141 virtual void send_heartbeat(uint8_t system_id,
bool fixed_wing) = 0;
142 virtual void send_imu(uint8_t system_id,
143 uint64_t timestamp_us,
146 float temperature) = 0;
150 uint32_t timestamp_ms,
151 const char *
const name,
154 uint32_t timestamp_ms,
155 const char *
const name,
157 virtual void send_output_raw(uint8_t system_id, uint32_t timestamp_ms,
const float raw_outputs[14]) = 0;
160 const char *
const name,
162 uint16_t param_count) = 0;
165 const char *
const name,
167 uint16_t param_count) = 0;
168 virtual void send_rc_raw(uint8_t system_id, uint32_t timestamp_ms,
const uint16_t
channels[8]) = 0;
173 float min_range) = 0;
180 uint8_t control_mode,
182 int16_t loop_time_us) = 0;
183 virtual void send_timesync(uint8_t system_id, int64_t tc1, int64_t ts1) = 0;
184 virtual void send_version(uint8_t system_id,
const char *
const version) = 0;
187 virtual void send_error_data(uint8_t system_id,
const StateManager::BackupData &error_data) = 0;
196 #endif // ROSFLIGHT_FIRMWARE_COMM_LINK_H virtual void send_diff_pressure(uint8_t system_id, float velocity, float pressure, float temperature)=0
static volatile int16_t gyro[3]
virtual void send_rc_raw(uint8_t system_id, uint32_t timestamp_ms, const uint16_t channels[8])=0
virtual void send_attitude_quaternion(uint8_t system_id, uint64_t timestamp_us, const turbomath::Quaternion &attitude, const turbomath::Vector &angular_velocity)=0
virtual void send_battery_status(uint8_t system_id, float voltage, float current)=0
virtual void send_baro(uint8_t system_id, float altitude, float pressure, float temperature)=0
virtual void send_timesync(uint8_t system_id, int64_t tc1, int64_t ts1)=0
virtual void send_gnss(uint8_t system_id, const GNSSData &data)=0
virtual void init(uint32_t baud_rate, uint32_t dev)=0
static volatile int16_t accel[3]
virtual void send_param_value_float(uint8_t system_id, uint16_t index, const char *const name, float value, uint16_t param_count)=0
ROSLIB_DECL std::string command(const std::string &cmd)
virtual void send_heartbeat(uint8_t system_id, bool fixed_wing)=0
virtual void send_log_message(uint8_t system_id, LogSeverity severity, const char *text)=0
static const channelConfig_t channels[CC_CHANNELS_PER_TIMER]
virtual void send_error_data(uint8_t system_id, const StateManager::BackupData &error_data)=0
virtual void send_version(uint8_t system_id, const char *const version)=0
virtual void send_imu(uint8_t system_id, uint64_t timestamp_us, const turbomath::Vector &accel, const turbomath::Vector &gyro, float temperature)=0
virtual void send_named_value_int(uint8_t system_id, uint32_t timestamp_ms, const char *const name, int32_t value)=0
virtual void set_listener(ListenerInterface *listener)=0
virtual void send_command_ack(uint8_t system_id, Command command, bool success)=0
virtual void send_output_raw(uint8_t system_id, uint32_t timestamp_ms, const float raw_outputs[14])=0
virtual void send_named_value_float(uint8_t system_id, uint32_t timestamp_ms, const char *const name, float value)=0
virtual void send_status(uint8_t system_id, bool armed, bool failsafe, bool rc_override, bool offboard, uint8_t error_code, uint8_t control_mode, int16_t num_errors, int16_t loop_time_us)=0
virtual void send_gnss_full(uint8_t system_id, const GNSSFull &data)=0
virtual void send_param_value_int(uint8_t system_id, uint16_t index, const char *const name, int32_t value, uint16_t param_count)=0
virtual void send_mag(uint8_t system_id, const turbomath::Vector &mag)=0
virtual void send_sonar(uint8_t system_id, uint8_t type, float range, float max_range, float min_range)=0