|
|
@ -94,8 +94,6 @@ namespace KaleidoscopePlugins {
|
|
|
|
EEPROMKeymap::focusKeymap (const char *command) {
|
|
|
|
EEPROMKeymap::focusKeymap (const char *command) {
|
|
|
|
enum {
|
|
|
|
enum {
|
|
|
|
UPLOAD,
|
|
|
|
UPLOAD,
|
|
|
|
GETPOS,
|
|
|
|
|
|
|
|
SETPOS,
|
|
|
|
|
|
|
|
DUMP,
|
|
|
|
DUMP,
|
|
|
|
TRANSFER,
|
|
|
|
TRANSFER,
|
|
|
|
} subCommand;
|
|
|
|
} subCommand;
|
|
|
@ -109,10 +107,6 @@ namespace KaleidoscopePlugins {
|
|
|
|
subCommand = DUMP;
|
|
|
|
subCommand = DUMP;
|
|
|
|
else if (strcmp_P (command + 7, PSTR ("transfer")) == 0)
|
|
|
|
else if (strcmp_P (command + 7, PSTR ("transfer")) == 0)
|
|
|
|
subCommand = TRANSFER;
|
|
|
|
subCommand = TRANSFER;
|
|
|
|
else if (strcmp_P (command + 7, PSTR ("getPos")) == 0)
|
|
|
|
|
|
|
|
subCommand = GETPOS;
|
|
|
|
|
|
|
|
else if (strcmp_P (command + 7, PSTR ("setPos")) == 0)
|
|
|
|
|
|
|
|
subCommand = SETPOS;
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
@ -127,19 +121,6 @@ namespace KaleidoscopePlugins {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
case GETPOS:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint8_t layer = Serial.parseInt ();
|
|
|
|
|
|
|
|
uint8_t row = Serial.parseInt ();
|
|
|
|
|
|
|
|
uint8_t col = Serial.parseInt ();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Key k = getKey (layer, row, col);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printKey (k);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case DUMP:
|
|
|
|
case DUMP:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for (uint8_t layer = 0; layer < 4; layer++) {
|
|
|
|
for (uint8_t layer = 0; layer < 4; layer++) {
|
|
|
@ -159,18 +140,6 @@ namespace KaleidoscopePlugins {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
case SETPOS:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint8_t layer = Serial.parseInt ();
|
|
|
|
|
|
|
|
uint8_t row = Serial.parseInt ();
|
|
|
|
|
|
|
|
uint8_t col = Serial.parseInt ();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint16_t pos = ((layer * ROWS * COLS) + (row * COLS) + col);
|
|
|
|
|
|
|
|
updateKey (pos, parseKey ());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case TRANSFER:
|
|
|
|
case TRANSFER:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint8_t layer = Serial.parseInt ();
|
|
|
|
uint8_t layer = Serial.parseInt ();
|
|
|
|