9 App(
const std::string name) { this->name =
name; }
24 std::cout << attitude;
28 std::cout << altitude;
34 std::cout << rc_tuning;
44 std::cout << motor_pins;
48 std::cout << box_names;
52 std::cout << pid_names;
58 std::cout << servo_conf;
62 std::cout <<
"#Debug message:" << std::endl;
63 std::cout << debug_msg.
debug_msg << std::endl;
71 int main(
int argc,
char* argv[]) {
72 const std::string device =
73 (argc > 1) ? std::string(argv[1]) :
"/dev/ttyUSB0";
74 const size_t baudrate = (argc > 2) ? std::stoul(argv[2]) : 115200;
86 imu, 512.0, 1.0 / 4.096, 0.92f / 10.0f, 9.80665f);
Value< std::string > debug_msg
void onImu(const msp::msg::RawImu &imu_raw)
void onIdent(const msp::msg::Ident &ident)
int main(int argc, char *argv[])
void onMotorPins(const msp::msg::MotorPins &motor_pins)
void onAltitude(const msp::msg::Altitude &altitude)
void onPID(const msp::msg::Pid &pid)
void onRc(const msp::msg::Rc &rc)
void onRcTuning(const msp::msg::RcTuning &rc_tuning)
void onDebug(const msp::msg::Debug &debug)
void onAttitude(const msp::msg::Attitude &attitude)
void onServo(const msp::msg::Servo &servo)
void onPidNames(const msp::msg::PidNames &pid_names)
void setLoggingLevel(const msp::client::LoggingLevel &level)
Set the verbosity of the output.
void onDebugMessage(const msp::msg::DebugMessage &debug_msg)
void onBoxIds(const msp::msg::BoxIds &box_ids)
void onBox(const msp::msg::ActiveBoxes &box)
void onMisc(const msp::msg::Misc &misc)
void onStatus(const msp::msg::Status &status)
void onMotor(const msp::msg::Motor &motor)
bool connect(const std::string &device, const size_t baudrate=115200, const double &timeout=0.0, const bool print_info=false)
Connects to a physical flight controller, which includes connecting the internal Client object and qu...
std::shared_ptr< msp::client::SubscriptionBase > subscribe(void(C::*callback)(const T &), C *context, const double tp=0.0)
Register callback function that is called when type is received.
void onAnalog(const msp::msg::Analog &analog)
App(const std::string name)
void onBoxNames(const msp::msg::BoxNames &box_names)
void onServoConf(const msp::msg::ServoConf &servo_conf)