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