Skip to content

Commit

Permalink
SoftwareSerial fix for ESP boards > 2.4.2. Fixes #23
Browse files Browse the repository at this point in the history
  • Loading branch information
jantenhove committed Mar 31, 2020
1 parent fcce710 commit da44ff3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions GoodWeCommunicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ void GoodWeCommunicator::start()
{
auto settings = settingsManager->GetSettings();
//create the software serial on the custom pins so we can use the hardware serial for debug comms.
goodweSerial = new SoftwareSerial(settings->RS485Rx, settings->RS485Tx, false, BufferSize); // (RX, TX. inverted, buffer)
//start the software serial
goodweSerial->begin(9600); //inverter fixed baud rate
goodweSerial = new SoftwareSerial(); // (RX, TX. inverted, buffer)
//start the software serial with the params (buffersize is larger than default, that's why we cant ue the constructor)
goodweSerial->begin(9600, SWSERIAL_8N1, settings->RS485Rx, settings->RS485Tx, false, BufferSize); //inverter fixed baud rate
inverters.clear();
//set the fixed part of our buffer
headerBuffer[0] = 0xAA;
Expand Down

0 comments on commit da44ff3

Please sign in to comment.