This commit is contained in:
hg
2015-05-19 07:42:08 +02:00
parent 2e8aaedf54
commit 05dd3165ec
3 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ float startEnergy = 0;
float getVoltage() { return (float)voltage; }
float getCurrent() { return (float)current * 0.1; }
float getCosPhi() { return (float)cosphi * 0.01; }
float getPower() { return (float)power * 10; }
float getPower() { return (float)power * 0.01; }
float getEnergy() {
uint32_t v = ((uint32_t)energy[1]) + (((uint32_t)energy[0]) << 16);

View File

@ -14,7 +14,7 @@
const uint32_t MODBUS_BAUD = 19200;
const uint32_t MODBUS_BAUD = 9600;
const uint16_t MODBUS_TIMEOUT = 10000;
const uint16_t MODBUS_SCANRATE = 1000;
const uint8_t MODBUS_RETRY_COUNT = 25;

View File

@ -185,7 +185,7 @@ void updateDisplay() {
lcd.setCursor(0, 2);
lcd.print(getCosPhi()); lcd.print("");
lcd.setCursor(10, 2);
lcd.print(getPower()); lcd.print("W");
lcd.print(getPower()); lcd.print("kW");
lcd.setCursor(0, 3);
lcd.print(getEnergy()); lcd.print(" "); lcd.print(getNewEnergy()); lcd.print(" ");
lcd.print("kWh");