Final Fixes

Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
This commit is contained in:
Lukas Bachschwell 2023-04-09 21:19:52 +02:00
parent 3356acdf78
commit 746c1409ca
Signed by: lbsadmin
GPG Key ID: CCC6AA87CC8DF425
2 changed files with 1 additions and 10 deletions

View File

@ -162,11 +162,10 @@ void HCIEmulator::poll()
// Log(LL_DEBUG, ("ST:"+String(m_lastSendTime)).c_str());
digitalWrite(TX_ON, HIGH);
delayMicroseconds(10);
Serial.println("write data");
m_port->write(m_txbuffer, m_txlen);
Log3(LL_DEBUG, "Response: ", m_txbuffer, m_txlen);
// delayMicroseconds(50);
delayMicroseconds(m_txlen * 9 * 22); // 8 bits + par * Bittime 18 micros on 57600 bauds
digitalWrite(TX_ON, LOW);
m_txlen = 0;
}

View File

@ -96,13 +96,6 @@ void setup()
pinMode(TX_ON, OUTPUT);
digitalWrite(TX_ON, LOW);
// digitalWrite(TX_ON, HIGH);
// for (;;)
//{
// RS485.write("hello there");
// delay(100);
// }
xTaskCreatePinnedToCore(
modBusPolling, /* Function to implement the task */
"ModBusTask", /* Name of the task */
@ -210,5 +203,4 @@ void setup()
// mainloop
void loop()
{
AsyncElegantOTA.loop();
}