00001 00015 #include <FlightController.hpp> 00016 00017 int main(int argc, char *argv[]) { 00018 const std::string device = 00019 (argc > 1) ? std::string(argv[1]) : "/dev/ttyUSB0"; 00020 const size_t baudrate = (argc > 2) ? std::stoul(argv[2]) : 115200; 00021 00022 fcu::FlightController fcu; 00023 fcu.connect(device, baudrate); 00024 00025 // spin motors 1 to 4 00026 fcu.setMotors({{1100, 1100, 1100, 1100, 0, 0, 0, 0}}); 00027 00028 std::this_thread::sleep_for(std::chrono::seconds(1)); 00029 00030 // stop motors 00031 fcu.setMotors({{1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000}}); 00032 }