Make `programmerMode` (now `mode`) public

Instead of using a setter, just make the variable public.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 8 years ago
parent 98650dae19
commit 3ac9b54ca9

@ -21,7 +21,7 @@
namespace KaleidoscopePlugins {
uint16_t EEPROMKeymapProgrammer::updatePosition;
EEPROMKeymapProgrammer::state_t EEPROMKeymapProgrammer::state;
EEPROMKeymapProgrammer::mode_t EEPROMKeymapProgrammer::programmerMode;
EEPROMKeymapProgrammer::mode_t EEPROMKeymapProgrammer::mode;
Key EEPROMKeymapProgrammer::newKey;
EEPROMKeymapProgrammer::EEPROMKeymapProgrammer (void) {
@ -32,11 +32,6 @@ namespace KaleidoscopePlugins {
event_handler_hook_use (eventHandlerHook);
}
void
EEPROMKeymapProgrammer::mode (mode_t programmerMode_) {
programmerMode = programmerMode_;
}
void
EEPROMKeymapProgrammer::nextState (void) {
switch (state) {
@ -44,7 +39,7 @@ namespace KaleidoscopePlugins {
state = WAIT_FOR_KEY;
break;
case WAIT_FOR_KEY:
if (programmerMode == CODE)
if (mode == CODE)
state = WAIT_FOR_CODE;
else
state = WAIT_FOR_SOURCE_KEY;

@ -28,17 +28,16 @@ namespace KaleidoscopePlugins {
CODE,
COPY,
} mode_t;
static mode_t mode;
EEPROMKeymapProgrammer (void);
virtual void begin (void) final;
static void mode (mode_t programmerMode);
static void nextState (void);
static void cancel (void);
private:
static mode_t programmerMode;
typedef enum {
INACTIVE,
WAIT_FOR_KEY,

Loading…
Cancel
Save