Use the new Focus helpers

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

@ -17,6 +17,7 @@
*/ */
#include <Kaleidoscope-EEPROM-Settings.h> #include <Kaleidoscope-EEPROM-Settings.h>
#include <Kaleidoscope-Focus.h>
#include "crc.h" #include "crc.h"
namespace FocusHooks { namespace FocusHooks {
@ -41,7 +42,8 @@ namespace FocusHooks {
switch (subCommand) { switch (subCommand) {
case ISVALID: case ISVALID:
Serial.println (EEPROMSettings.isValid () ? F("yes") : F("no")); Focus.printBool (EEPROMSettings.isValid ());
Serial.println ();
break; break;
case GETVERSION: case GETVERSION:
Serial.println (EEPROMSettings.version ()); Serial.println (EEPROMSettings.version ());
@ -74,10 +76,8 @@ namespace FocusHooks {
case DUMP: case DUMP:
for (uint16_t i = 0; i < EEPROM.length (); i++) { for (uint16_t i = 0; i < EEPROM.length (); i++) {
uint8_t d = EEPROM[i]; uint8_t d = EEPROM[i];
if (d < 16) Focus.printNumber (d);
Serial.print (0); Focus.printSpace ();
Serial.print (d, HEX);
Serial.print (F(" "));
if ((i + 1) % 32 == 0) if ((i + 1) % 32 == 0)
Serial.println (); Serial.println ();
} }

Loading…
Cancel
Save