|
|
@ -20,9 +20,10 @@
|
|
|
|
#include <Kaleidoscope-Focus.h>
|
|
|
|
#include <Kaleidoscope-Focus.h>
|
|
|
|
#include "crc.h"
|
|
|
|
#include "crc.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace FocusHooks {
|
|
|
|
namespace kaleidoscope {
|
|
|
|
|
|
|
|
namespace eeprom_settings {
|
|
|
|
|
|
|
|
|
|
|
|
bool settings(const char *command) {
|
|
|
|
bool settingsFocusHook(const char *command) {
|
|
|
|
enum {
|
|
|
|
enum {
|
|
|
|
ISVALID,
|
|
|
|
ISVALID,
|
|
|
|
GETVERSION,
|
|
|
|
GETVERSION,
|
|
|
@ -43,23 +44,23 @@ bool settings(const char *command) {
|
|
|
|
|
|
|
|
|
|
|
|
switch (sub_command) {
|
|
|
|
switch (sub_command) {
|
|
|
|
case ISVALID:
|
|
|
|
case ISVALID:
|
|
|
|
Focus.printBool(EEPROMSettings.isValid());
|
|
|
|
Focus.printBool(::EEPROMSettings.isValid());
|
|
|
|
Serial.println();
|
|
|
|
Serial.println();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case GETVERSION:
|
|
|
|
case GETVERSION:
|
|
|
|
Serial.println(EEPROMSettings.version());
|
|
|
|
Serial.println(::EEPROMSettings.version());
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case CRC:
|
|
|
|
case CRC:
|
|
|
|
Serial.print(::CRC.crc, HEX);
|
|
|
|
Serial.print(::CRC.crc, HEX);
|
|
|
|
Serial.print(F("/"));
|
|
|
|
Serial.print(F("/"));
|
|
|
|
Serial.println(EEPROMSettings.crc(), HEX);
|
|
|
|
Serial.println(::EEPROMSettings.crc(), HEX);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool eeprom(const char *command) {
|
|
|
|
bool eepromFocusHook(const char *command) {
|
|
|
|
enum {
|
|
|
|
enum {
|
|
|
|
CONTENTS,
|
|
|
|
CONTENTS,
|
|
|
|
FREE,
|
|
|
|
FREE,
|
|
|
@ -91,7 +92,7 @@ bool eeprom(const char *command) {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case FREE:
|
|
|
|
case FREE:
|
|
|
|
Serial.println(EEPROM.length() - EEPROMSettings.used());
|
|
|
|
Serial.println(EEPROM.length() - ::EEPROMSettings.used());
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -99,3 +100,5 @@ bool eeprom(const char *command) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|