Removed metro timer for the moment

This commit is contained in:
Mike C 2013-04-09 17:18:43 -04:00
parent 8c8d1451f9
commit d1f56f0f70
3 changed files with 7 additions and 7 deletions

View file

@ -46,7 +46,7 @@ timeout Config::getTimeout() {
return currentTimeout; return currentTimeout;
} }
long Config::getTimeoutMilis() { int Config::getTimeoutMilis() {
switch (currentTimeout) { switch (currentTimeout) {
case 0: // tenseconds case 0: // tenseconds
return 10000; return 10000;

View file

@ -35,7 +35,7 @@ public:
linespeed getLineSpeed(); linespeed getLineSpeed();
ttlvoltage getVoltage(); ttlvoltage getVoltage();
timeout getTimeout(); timeout getTimeout();
long getTimeoutMilis(); int getTimeoutMilis();
void disableUI(); void disableUI();
void enableUI(); void enableUI();
bool isUIEnabled(); bool isUIEnabled();

View file

@ -25,7 +25,7 @@
UI* ui; UI* ui;
Config* config; Config* config;
Metro* uiTimeout; //Metro uiTimeout = Metro(250);
void setup() { void setup() {
Serial.begin(9600); Serial.begin(9600);
@ -36,14 +36,14 @@ void setup() {
ui = new UI(config); ui = new UI(config);
uiTimeout = new Metro(config->getTimeoutMilis(), false); //uiTimeout = Metro(config->getTimeoutMilis());
} }
void loop() { void loop() {
// FIXME: Move timer to UI under its own method // FIXME: Move timer to UI under its own method
if (uiTimeout->check()) { // if (uiTimeout.check() == 1) {
ui->disableUI(); // ui->disableUI();
} // }
ui->processInputEvents(); ui->processInputEvents();
} }