MCPcopy Create free account
hub / github.com/OpenHD/OpenHD / main

Function main

OpenHD/ohd_telemetry/test/test_joystick_reader.cpp:34–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#include "openhd_spdlog_include.h"
33
34int main() {
35 std::shared_ptr<spdlog::logger> m_console = openhd::log::get_default();
36 assert(m_console);
37
38 m_console->debug("test_joystick_reader");
39
40 auto joystick_reader = std::make_unique<JoystickReader>();
41
42 static bool quit = false;
43 signal(SIGTERM, [](int sig) { quit = true; });
44 while (!quit) {
45 std::this_thread::sleep_for(std::chrono::milliseconds(1000));
46 std::cout << JoystickReader::curr_state_to_string(
47 joystick_reader->get_current_state())
48 << "\n";
49 }
50
51 return 0;
52}

Callers

nothing calls this directly

Calls 2

debugMethod · 0.80
get_current_stateMethod · 0.80

Tested by

no test coverage detected