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

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

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

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

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

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

Loading…
Cancel
Save