Drop the layer save/load methods

Drop the `load_primary_layer` and `save_primary_layer` methods, because
`save_primary_layer` is not used anywhere, and as such, the whole thing is
pointless at this time.

Furthermore, if we want to allow plugins to implement EEPROM storage, then its
best if we leave the default layer save/load to the plugins too.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/365/head
Gergely Nagy 8 years ago
parent 161401b22f
commit 7729d5b282

@ -1,8 +1,5 @@
#include <Kaleidoscope.h> #include <Kaleidoscope.h>
#include <avr/wdt.h> #include <avr/wdt.h>
#include <EEPROM.h>
#define EEPROM_LAYER_LOCATION 0
KeyboardioScanner Model01::leftHand(0); KeyboardioScanner Model01::leftHand(0);
KeyboardioScanner Model01::rightHand(3); KeyboardioScanner Model01::rightHand(3);
@ -186,16 +183,4 @@ void Model01::reboot_bootloader() {
// happens before the watchdog reboots us // happens before the watchdog reboots us
} }
void Model01::save_primary_layer(uint8_t layer) {
EEPROM.write(EEPROM_LAYER_LOCATION, layer);
}
uint8_t Model01::load_primary_layer(uint8_t layer_count) {
uint8_t layer = EEPROM.read(EEPROM_LAYER_LOCATION);
if (layer >= layer_count) {
return 0; // undefined positions get saved as 255
}
return 0; // return keymap;
}
HARDWARE_IMPLEMENTATION KeyboardHardware; HARDWARE_IMPLEMENTATION KeyboardHardware;

@ -29,9 +29,6 @@ class Model01 {
boolean led_power_fault(void); boolean led_power_fault(void);
uint8_t load_primary_layer(uint8_t layer_count);
void save_primary_layer(uint8_t layer);
keydata_t leftHandState; keydata_t leftHandState;
keydata_t rightHandState; keydata_t rightHandState;
keydata_t previousLeftHandState; keydata_t previousLeftHandState;

Loading…
Cancel
Save