4 #include <QCoreApplication>
8 [[maybe_unused]]
static constexpr
auto old =
"DF:70:E8:81:DB:D6";
9 [[maybe_unused]]
static constexpr
auto dlr =
"DF:A2:F5:48:E7:50";
10 [[maybe_unused]]
static constexpr
auto arches =
"XX:XX:XX:XX:XX:XX";
13 main(
int argc,
char* argv[])
15 for (
int i = 0; i < argc; ++i)
17 if (std::string(argv[i]) ==
"-h" ||
18 std::string(argv[i]) ==
"--print-options")
24 QCoreApplication
a(argc, argv);
27 iface.verboseReceive(
false);
28 iface.verboseSend(
true);
29 std::size_t dcCounter = 0;
32 std::cout <<
"Waiting for Running State: " <<
to_string(iface.getState()) << std::endl;
44 std::this_thread::sleep_for(std::chrono::milliseconds{100});
47 auto printAndSleep = [&](std::size_t n = 25)
49 for (std::size_t i2 = 0; i2 < n; ++i2)
51 std::cout << iface.getThumbPos() <<
"\t" << iface.getThumbPWM() <<
"\t"
52 << iface.getFingerPos() <<
"\t" << iface.getFingerPWM() << std::endl;
53 std::this_thread::sleep_for(std::chrono::milliseconds{100});
57 for (std::size_t i = 0; i < 4; ++i)
59 iface.sendGrasp(i % 2);
62 iface.sendThumbPWM(200, 2999, 0);
64 iface.sendFingerPWM(200, 2999, 0);