Fix Orno-we-517 serial config

Fix Orno-we-517 serial config on esp32
This commit is contained in:
Theo Arends 2023-01-02 09:50:21 +01:00
parent ed0b7d69b6
commit cb6dd75d8b
1 changed files with 4 additions and 5 deletions

View File

@ -183,14 +183,13 @@ void WE517Every250ms(void)
}
}
void We517SnsInit(void)
{
void We517SnsInit(void) {
We517Modbus = new TasmotaModbus(Pin(GPIO_WE517_RX), Pin(GPIO_WE517_TX), Pin(GPIO_NRG_MBS_TX_ENA));
uint8_t result = We517Modbus->Begin(WE517_SPEED);
uint8_t result = We517Modbus->Begin(WE517_SPEED, SERIAL_8E1);
if (result) {
if (2 == result) {
AddLog(LOG_LEVEL_DEBUG, PSTR("ORNO: WE517 HW serial init 8E1 at %d baud"), WE517_SPEED);
Serial.begin(WE517_SPEED, SERIAL_8E1);
// AddLog(LOG_LEVEL_DEBUG, PSTR("ORNO: WE517 HW serial init 8E1 at %d baud"), WE517_SPEED);
// Serial.begin(WE517_SPEED, SERIAL_8E1);
ClaimSerial();
}
Energy.phase_count = 3;