|
|
@ -17,11 +17,10 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include <Kaleidoscope/HostOS.h>
|
|
|
|
#include <Kaleidoscope/HostOS.h>
|
|
|
|
|
|
|
|
#include <Kaleidoscope-EEPROM-Settings.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include <EEPROM.h>
|
|
|
|
#include <EEPROM.h>
|
|
|
|
|
|
|
|
|
|
|
|
#define EEPROM_HOSTOS_TYPE_LOCATION 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace KaleidoscopePlugins {
|
|
|
|
namespace KaleidoscopePlugins {
|
|
|
|
namespace HostOS {
|
|
|
|
namespace HostOS {
|
|
|
|
void
|
|
|
|
void
|
|
|
@ -29,13 +28,15 @@ namespace KaleidoscopePlugins {
|
|
|
|
if (isConfigured)
|
|
|
|
if (isConfigured)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
eepromSlice = ::EEPROMSettings.requestSlice (sizeof (osType));
|
|
|
|
|
|
|
|
|
|
|
|
isConfigured = true;
|
|
|
|
isConfigured = true;
|
|
|
|
|
|
|
|
|
|
|
|
if (osType != AUTO) {
|
|
|
|
if (osType != AUTO) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ((osType = (Type)EEPROM.read (EEPROM_HOSTOS_TYPE_LOCATION)) != AUTO)
|
|
|
|
if ((osType = (Type)EEPROM.read (eepromSlice)) != AUTO)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
autoDetect ();
|
|
|
|
autoDetect ();
|
|
|
@ -52,7 +53,7 @@ namespace KaleidoscopePlugins {
|
|
|
|
void
|
|
|
|
void
|
|
|
|
Base::os (HostOS::Type osType_) {
|
|
|
|
Base::os (HostOS::Type osType_) {
|
|
|
|
osType = osType_;
|
|
|
|
osType = osType_;
|
|
|
|
EEPROM.update (EEPROM_HOSTOS_TYPE_LOCATION, osType);
|
|
|
|
EEPROM.update (eepromSlice, osType);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|