17 int main(
int argc,
char *argv[]) {
18 const std::string device =
19 (argc > 1) ? std::string(argv[1]) :
"/dev/ttyUSB0";
20 const size_t baudrate = (argc > 2) ? std::stoul(argv[2]) : 115200;
26 fcu.
setMotors({{1100, 1100, 1100, 1100, 0, 0, 0, 0}});
28 std::this_thread::sleep_for(std::chrono::seconds(1));
31 fcu.
setMotors({{1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000}});
bool setMotors(const std::array< uint16_t, msp::msg::N_MOTOR > &motor_values)
Directly sets motor values using SetMotor message.
int main(int argc, char *argv[])
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...