2014-03-05 15:33:12 +01:00
|
|
|
/*
|
|
|
|
* Resources.cpp
|
|
|
|
*
|
|
|
|
* Created on: 05.03.2014
|
|
|
|
* Author: wn
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "Resources.h"
|
|
|
|
|
|
|
|
|
2014-05-04 20:56:03 +02:00
|
|
|
#define USE_REAL_TEXTS 1
|
2014-03-05 15:33:12 +01:00
|
|
|
|
|
|
|
|
2014-04-05 11:36:57 +02:00
|
|
|
#ifndef USE_REAL_TEXTS
|
|
|
|
String TEXT;
|
|
|
|
#else
|
2014-03-08 20:57:17 +01:00
|
|
|
const String TEXT_RESOURCES[] = {
|
|
|
|
"Text1",
|
|
|
|
"PeriodMeasure (ms): ",
|
|
|
|
"Alpha: ",
|
|
|
|
"Calibration: ",
|
|
|
|
"Info: ",
|
|
|
|
"Debug: ",
|
|
|
|
"COMPILE_TIME_DEBUG: ",
|
|
|
|
"TimeOuts: ",
|
|
|
|
"Cycles: ",
|
|
|
|
"Period (ms): ",
|
|
|
|
"Alpha: ",
|
|
|
|
"index: ",
|
|
|
|
"cal: ",
|
|
|
|
"t: ",
|
|
|
|
"ts: ",
|
|
|
|
", ",
|
|
|
|
" enable : enable the calibration mode",
|
|
|
|
" disable : disable the calibration mode",
|
|
|
|
" show : show parameters for calibration process",
|
|
|
|
" r : set value of calibration resistor",
|
|
|
|
" start <0..3>: start calibration on channel",
|
|
|
|
" stop <0..3>: stop calibration on channel",
|
|
|
|
" enabled : ",
|
|
|
|
" r_cal : ",
|
|
|
|
"setTemperature: i=",
|
|
|
|
"t=",
|
|
|
|
"t_smoothed=",
|
|
|
|
"CONF: ",
|
|
|
|
"MODE: ",
|
|
|
|
"Initializing EEPROM",
|
|
|
|
"State 0",
|
|
|
|
"Switching to State 1",
|
|
|
|
"Switching to State 10",
|
|
|
|
"State 9",
|
|
|
|
"Timeout: ",
|
|
|
|
"State 10",
|
|
|
|
"No, no, we are in calibration high mode, so directly switch to state 20",
|
|
|
|
"Switching to state 11",
|
|
|
|
"r_avg on channel ",
|
|
|
|
"calibration factor: ",
|
|
|
|
"Calibration stopped",
|
|
|
|
"Save calibration factor for channel ",
|
|
|
|
": ",
|
|
|
|
"HELP List this help for all commands",
|
|
|
|
"command not found",
|
|
|
|
"Thermometer configuration operations",
|
|
|
|
"Show thermometer measurement values",
|
|
|
|
"Thermometer calibration operations",
|
|
|
|
"No, no, we are in calibration zero mode, so directly switch to state 20",
|
|
|
|
"MeterBus Client Configuration",
|
|
|
|
"Invalid frame",
|
|
|
|
"No valid frame available",
|
|
|
|
"Invalid checksum",
|
|
|
|
"Not for me but for ",
|
2014-03-09 00:25:48 +01:00
|
|
|
"Unhandled frame",
|
|
|
|
"s: ",
|
|
|
|
"l: ",
|
|
|
|
"c: ",
|
|
|
|
"a: ",
|
|
|
|
"ci: ",
|
|
|
|
"u: ",
|
|
|
|
" ",
|
|
|
|
"frames: ",
|
|
|
|
"my frames: ",
|
|
|
|
"invalid frames: ",
|
|
|
|
"invalid checksum: ",
|
|
|
|
"mbus address: ",
|
2014-04-02 22:50:17 +02:00
|
|
|
"collisions: ",
|
|
|
|
"r: ",
|
2014-04-04 20:38:11 +02:00
|
|
|
"setR: i=",
|
|
|
|
"r=",
|
2014-03-08 20:57:17 +01:00
|
|
|
|
|
|
|
};
|
2014-04-05 11:36:57 +02:00
|
|
|
#endif
|
2014-03-08 20:57:17 +01:00
|
|
|
|
2014-03-05 15:33:12 +01:00
|
|
|
|
|
|
|
const String& getResource(uint8_t key) {
|
2014-04-05 11:36:57 +02:00
|
|
|
#ifndef USE_REAL_TEXTS
|
|
|
|
TEXT = String(" T") + key + String(": ");
|
|
|
|
return TEXT;
|
|
|
|
#else
|
2014-03-08 00:23:46 +01:00
|
|
|
return TEXT_RESOURCES[key];
|
2014-04-05 11:36:57 +02:00
|
|
|
#endif
|
2014-03-05 15:33:12 +01:00
|
|
|
}
|
|
|
|
|