Merge pull request #10 from keyboardio/f/no-fingerprint
Greatly simplify the plugin by removing auto-detectionpull/389/head
commit
97ce885b5f
@ -1,47 +0,0 @@
|
|||||||
/* -*- mode: c++ -*-
|
|
||||||
* Kaleidoscope-HostOS -- Host OS detection and tracking for Kaleidoscope
|
|
||||||
* Copyright (C) 2016, 2017, 2018 Keyboard.io, Inc
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify it under
|
|
||||||
* the terms of the GNU General Public License as published by the Free Software
|
|
||||||
* Foundation, version 3.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
* details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <Kaleidoscope/HostOS-Guesser.h>
|
|
||||||
|
|
||||||
#include <FingerprintUSBHost.h>
|
|
||||||
|
|
||||||
namespace kaleidoscope {
|
|
||||||
namespace hostos {
|
|
||||||
|
|
||||||
void Guesser::autoDetect(void) {
|
|
||||||
Serial.begin(9600);
|
|
||||||
|
|
||||||
delay(15000);
|
|
||||||
|
|
||||||
switch (FingerprintUSBHost.guessHostOS()) {
|
|
||||||
case GuessedHost::WINDOWS:
|
|
||||||
os_ = WINDOWS;
|
|
||||||
break;
|
|
||||||
case GuessedHost::LINUX:
|
|
||||||
os_ = LINUX;
|
|
||||||
break;
|
|
||||||
case GuessedHost::MACOS:
|
|
||||||
os_ = OSX;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
os_ = OTHER;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
/* -*- mode: c++ -*-
|
|
||||||
* Kaleidoscope-HostOS -- Host OS detection and tracking for Kaleidoscope
|
|
||||||
* Copyright (C) 2016, 2017, 2018 Keyboard.io, Inc
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify it under
|
|
||||||
* the terms of the GNU General Public License as published by the Free Software
|
|
||||||
* Foundation, version 3.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
* details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <Kaleidoscope/HostOS-Base.h>
|
|
||||||
|
|
||||||
namespace kaleidoscope {
|
|
||||||
namespace hostos {
|
|
||||||
|
|
||||||
class Guesser : public Base {
|
|
||||||
public:
|
|
||||||
Guesser(void) {}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void autoDetect(void) final;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in new issue