| 32 | #include "openhd_spdlog_include.h" |
| 33 | |
| 34 | int 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 | } |
nothing calls this directly
no test coverage detected