Replaced simple dict file with hunspell,

added basic language support
This commit is contained in:
2022-07-23 12:26:45 -07:00
parent 665f0b6dae
commit dfa3cc6c5b
9 changed files with 349 additions and 9930 deletions

View File

@ -205,10 +205,32 @@ bool Ergodox::read() {
// If keyboard sends a state packet, parse it.
case CMD_SEND_STATE:
// Byte 1: animation mode
if (animation_mode != read_buf[1]) {
spdlog::info("Mode set to 0x{0:02x}", read_buf[1]);
animation_mode = read_buf[1];
}
// Bytes 2,3,4,5: layer state
uint32_t new_layer_state =
(read_buf[5] << 24) |
(read_buf[4] << 16) |
(read_buf[3] << 8) |
(read_buf[2] << 0);
if (layer_state != new_layer_state) {
layer_state = new_layer_state;
spdlog::info("Layer set to 0b{0:032b}", layer_state);
}
// Byte 6: desired OS layout for layer
if (layer_layout != read_buf[6]) {
layer_layout = read_buf[6];
spdlog::info("Layout set to 0x{0:02x}", read_buf[6]);
}
// Main code should not parse state packets.
return false;
}