From e30fb728e52925a31d76cea1820a79da76e67075 Mon Sep 17 00:00:00 2001 From: jantje Date: Thu, 22 Jun 2017 23:52:06 +0200 Subject: [PATCH] div 1000 for logging voltmeter --- SerialDataInterface/SerialDataInterface.cpp | 1 + SerialDataInterface/SerialDataInterface.h | 2 ++ VoltMeter/VoltMeter.cpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/SerialDataInterface/SerialDataInterface.cpp b/SerialDataInterface/SerialDataInterface.cpp index 0f5009d..4285c01 100644 --- a/SerialDataInterface/SerialDataInterface.cpp +++ b/SerialDataInterface/SerialDataInterface.cpp @@ -11,6 +11,7 @@ const char STATENAME[] PROGMEM="StateName"; const char STATE[] PROGMEM="State"; const char MULTIPLIER[] PROGMEM ="Multiplier"; const char MULTIPLIER_DIV_10[] PROGMEM ="Multiplier/10"; +const char MULTIPLIER_DIV_1000[] PROGMEM ="Multiplier/1000"; const char PINVALUE[] PROGMEM ="PinValue"; const char PIN[] PROGMEM = "Pin"; diff --git a/SerialDataInterface/SerialDataInterface.h b/SerialDataInterface/SerialDataInterface.h index 7c869c2..33192c2 100644 --- a/SerialDataInterface/SerialDataInterface.h +++ b/SerialDataInterface/SerialDataInterface.h @@ -29,6 +29,8 @@ extern const char DONE[]PROGMEM; extern const char STATENAME[] PROGMEM; extern const char STATE[] PROGMEM; extern const char MULTIPLIER_DIV_10[] PROGMEM; +extern const char MULTIPLIER_DIV_1000[] PROGMEM; + #define CLASSSEPERATOR '.' #define FIELDSEPERATOR ';' #define FP(name) ((const __FlashStringHelper *)(name)) diff --git a/VoltMeter/VoltMeter.cpp b/VoltMeter/VoltMeter.cpp index a75feb8..711c6af 100644 --- a/VoltMeter/VoltMeter.cpp +++ b/VoltMeter/VoltMeter.cpp @@ -54,7 +54,7 @@ void VoltMeter::loop() void VoltMeter::serialRegister(const __FlashStringHelper* Name) { FieldData::set(Name,F("CentiVolt"),0,&myCentiVolt); - FieldData::setNext((__FlashStringHelper *)MULTIPLIER,MOD_WRITE|MOD_SAVE,&myMultiplyerValue); + FieldData::setNext((__FlashStringHelper *)MULTIPLIER_DIV_1000,MOD_WRITE|MOD_SAVE,&myMultiplyerValue); #ifdef DETAILED_SERIAL_LOGGING FieldData::setNext(F("Value"),0,&myActualReadValue);