From 45bdbe0a5764a068666b2d39b731b9671ae94139 Mon Sep 17 00:00:00 2001 From: hg Date: Sat, 5 Apr 2014 11:36:57 +0200 Subject: [PATCH] * disable real text * shorter calibration cycle (10ms) * higher baudrate (115k2) --- Resources.cpp | 14 ++++++++++---- ThermometerPro.cpp | 2 +- thermometer.h | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Resources.cpp b/Resources.cpp index 5fd9318..c4f993e 100644 --- a/Resources.cpp +++ b/Resources.cpp @@ -9,9 +9,12 @@ #include "Resources.h" +// #define USE_REAL_TEXTS 1 -//String TEXT; +#ifndef USE_REAL_TEXTS +String TEXT; +#else const String TEXT_RESOURCES[] = { "Text1", "PeriodMeasure (ms): ", @@ -86,12 +89,15 @@ const String TEXT_RESOURCES[] = { "r=", }; - +#endif const String& getResource(uint8_t key) { - //TEXT = String("T") + key + String(": "); - //return TEXT; +#ifndef USE_REAL_TEXTS + TEXT = String(" T") + key + String(": "); + return TEXT; +#else return TEXT_RESOURCES[key]; +#endif } diff --git a/ThermometerPro.cpp b/ThermometerPro.cpp index ae3d390..efe93fc 100644 --- a/ThermometerPro.cpp +++ b/ThermometerPro.cpp @@ -22,7 +22,7 @@ void setup() { // delay(5000); - Serial.begin(9600); + Serial.begin(115200); Config::initialize(); diff --git a/thermometer.h b/thermometer.h index 05388b8..c2fb462 100644 --- a/thermometer.h +++ b/thermometer.h @@ -22,7 +22,7 @@ const float PT1000_R0 = 1000.0; const float PT1000_Coeff = 3.85e-3; const unsigned long CONV_TIMEOUT = 0xfffff; const unsigned long NUM_OF_CALIBRATION_CYCLES = 250; -const unsigned long CALIBRATION_CYCLE_TIME = 100; // ms +const unsigned long CALIBRATION_CYCLE_TIME = 10; // ms