Minor cleanup
This commit is contained in:
@ -219,4 +219,13 @@ bool Ergodox::read() {
|
||||
// Simple connectivity check
|
||||
void Ergodox::test_connection() {
|
||||
write(CMD_RUTHERE, NULL, 0);
|
||||
}
|
||||
|
||||
// Block until a connection is established.
|
||||
void Ergodox::connect_loop() {
|
||||
wprintf(L"Trying to connect...\n");
|
||||
while (!connected) {
|
||||
try_connect();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(RECONNECT_SLEEP_MS));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user