From d1f56f0f7072a1abd8c821350810a510d8c0a1a5 Mon Sep 17 00:00:00 2001 From: Mike C Date: Tue, 9 Apr 2013 17:18:43 -0400 Subject: [PATCH] Removed metro timer for the moment --- Universal_Serial_Adapter/Config.cpp | 2 +- Universal_Serial_Adapter/Config.h | 2 +- Universal_Serial_Adapter/Universal_Serial_Adapter.ino | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Universal_Serial_Adapter/Config.cpp b/Universal_Serial_Adapter/Config.cpp index 6534798..0d521d0 100644 --- a/Universal_Serial_Adapter/Config.cpp +++ b/Universal_Serial_Adapter/Config.cpp @@ -46,7 +46,7 @@ timeout Config::getTimeout() { return currentTimeout; } -long Config::getTimeoutMilis() { +int Config::getTimeoutMilis() { switch (currentTimeout) { case 0: // tenseconds return 10000; diff --git a/Universal_Serial_Adapter/Config.h b/Universal_Serial_Adapter/Config.h index 2454428..53bc94d 100644 --- a/Universal_Serial_Adapter/Config.h +++ b/Universal_Serial_Adapter/Config.h @@ -35,7 +35,7 @@ public: linespeed getLineSpeed(); ttlvoltage getVoltage(); timeout getTimeout(); - long getTimeoutMilis(); + int getTimeoutMilis(); void disableUI(); void enableUI(); bool isUIEnabled(); diff --git a/Universal_Serial_Adapter/Universal_Serial_Adapter.ino b/Universal_Serial_Adapter/Universal_Serial_Adapter.ino index 611c77e..4af2da8 100644 --- a/Universal_Serial_Adapter/Universal_Serial_Adapter.ino +++ b/Universal_Serial_Adapter/Universal_Serial_Adapter.ino @@ -25,7 +25,7 @@ UI* ui; Config* config; -Metro* uiTimeout; +//Metro uiTimeout = Metro(250); void setup() { Serial.begin(9600); @@ -36,14 +36,14 @@ void setup() { ui = new UI(config); - uiTimeout = new Metro(config->getTimeoutMilis(), false); + //uiTimeout = Metro(config->getTimeoutMilis()); } void loop() { // FIXME: Move timer to UI under its own method - if (uiTimeout->check()) { - ui->disableUI(); - } + // if (uiTimeout.check() == 1) { + // ui->disableUI(); + // } ui->processInputEvents(); }