changes
This commit is contained in:
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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");
|
||||
|
Reference in New Issue
Block a user