make astyle

pull/389/head
Jesse Vincent 8 years ago
parent 9964a151ef
commit 69f244b43b
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -22,9 +22,9 @@
#include <EEPROM.h>
namespace KaleidoscopePlugins {
namespace HostOS {
void
Base::begin (void) {
namespace HostOS {
void
Base::begin (void) {
if (isConfigured)
return;
@ -40,20 +40,20 @@ namespace KaleidoscopePlugins {
return;
autoDetect ();
}
}
HostOS::Type
Base::os (void) {
HostOS::Type
Base::os (void) {
if (osType == AUTO)
autoDetect ();
return osType;
}
}
void
Base::os (HostOS::Type osType_) {
void
Base::os (HostOS::Type osType_) {
osType = osType_;
EEPROM.update (eepromSlice, osType);
}
};
}
};
};

@ -21,17 +21,17 @@
#include <Kaleidoscope.h>
namespace KaleidoscopePlugins {
namespace HostOS {
typedef enum {
namespace HostOS {
typedef enum {
LINUX,
OSX,
WINDOWS,
OTHER,
AUTO = 0xff,
} Type;
} Type;
class Base : public KaleidoscopePlugin {
class Base : public KaleidoscopePlugin {
public:
virtual void begin (void) final;
@ -45,8 +45,8 @@ namespace KaleidoscopePlugins {
private:
uint16_t eepromSlice;
bool isConfigured = false;
};
};
};
};
};
extern KaleidoscopePlugins::HostOS::Base HostOS;

@ -20,9 +20,9 @@
#include <Kaleidoscope/HostOS-Focus.h>
namespace KaleidoscopePlugins {
namespace HostOS {
bool
Focus (const char *command) {
namespace HostOS {
bool
Focus (const char *command) {
if (strcmp_P (command, PSTR ("hostos.type")) != 0)
return false;
@ -35,6 +35,6 @@ namespace KaleidoscopePlugins {
Serial.read ();
return true;
}
}
}
}
}

@ -21,9 +21,9 @@
#include <Kaleidoscope/HostOS-Base.h>
namespace KaleidoscopePlugins {
namespace HostOS {
bool Focus (const char *command);
};
namespace HostOS {
bool Focus (const char *command);
};
};
#define FOCUS_HOOK_HOSTOS \

@ -21,12 +21,12 @@
#include <FingerprintUSBHost.h>
namespace KaleidoscopePlugins {
namespace HostOS {
Guesser::Guesser (void) {
}
namespace HostOS {
Guesser::Guesser (void) {
}
void
Guesser::autoDetect (void) {
void
Guesser::autoDetect (void) {
Serial.begin (9600);
delay (15000);
@ -45,6 +45,6 @@ namespace KaleidoscopePlugins {
osType = OTHER;
break;
}
}
};
}
};
};

@ -21,13 +21,13 @@
#include <Kaleidoscope/HostOS-Base.h>
namespace KaleidoscopePlugins {
namespace HostOS {
class Guesser : public Base {
namespace HostOS {
class Guesser : public Base {
public:
Guesser (void);
protected:
virtual void autoDetect (void) final;
};
}
};
}
};

Loading…
Cancel
Save