1 #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";
12 int main(
int argc,
char* argv[])
14 for (
int i = 0; i < argc; ++i)
16 if (std::string(argv[i]) ==
"-h" ||
17 std::string(argv[i]) ==
"--print-options")
23 QCoreApplication
a(argc, argv);
26 iface.verboseReceive(
false);
27 iface.verboseSend(
true);
28 std::size_t dcCounter = 0;
31 std::cout <<
"Waiting for Running State: " <<
to_string(iface.getState()) << std::endl;
43 std::this_thread::sleep_for(std::chrono::milliseconds{100});
46 auto printAndSleep = [&](std::size_t n = 25)
48 for (std::size_t i2 = 0; i2 < n; ++i2)
50 std::cout << iface.getThumbPos() <<
"\t"
51 << iface.getThumbPWM() <<
"\t"
52 << iface.getFingerPos() <<
"\t"
53 << iface.getFingerPWM() << std::endl;
54 std::this_thread::sleep_for(std::chrono::milliseconds{100});
58 for (std::size_t i = 0; i < 4; ++i)
60 iface.sendGrasp(i % 2);
63 iface.sendThumbPWM(200, 2999, 0);
65 iface.sendFingerPWM(200, 2999, 0);