mirror of https://github.com/arendst/Tasmota.git
parent
c8c21e9e37
commit
dbd7d29765
|
@ -153,10 +153,10 @@ bool TasmotaSerial::begin(uint32_t speed, uint32_t config) {
|
||||||
m_uart = tasmota_serial_index;
|
m_uart = tasmota_serial_index;
|
||||||
tasmota_serial_index--;
|
tasmota_serial_index--;
|
||||||
TSerial = new HardwareSerial(m_uart);
|
TSerial = new HardwareSerial(m_uart);
|
||||||
TSerial->begin(speed, config, m_rx_pin, m_tx_pin);
|
if (serial_buffer_size > 256) { // RX Buffer can't be resized when Serial is already running (HardwareSerial.cpp)
|
||||||
if (serial_buffer_size > 256) {
|
|
||||||
TSerial->setRxBufferSize(serial_buffer_size);
|
TSerial->setRxBufferSize(serial_buffer_size);
|
||||||
}
|
}
|
||||||
|
TSerial->begin(speed, config, m_rx_pin, m_tx_pin);
|
||||||
// For low bit rate, below 9600, set the Full RX threshold at 10 bytes instead of the default 120
|
// For low bit rate, below 9600, set the Full RX threshold at 10 bytes instead of the default 120
|
||||||
if (speed <= 9600) {
|
if (speed <= 9600) {
|
||||||
// At 9600, 10 chars are ~10ms
|
// At 9600, 10 chars are ~10ms
|
||||||
|
|
|
@ -137,7 +137,7 @@ bool Cse7761ReadOnce(uint32_t log_level, uint32_t reg, uint32_t size, uint32_t*
|
||||||
|
|
||||||
uint8_t buffer[8] = { 0 };
|
uint8_t buffer[8] = { 0 };
|
||||||
uint32_t rcvd = 0;
|
uint32_t rcvd = 0;
|
||||||
uint32_t timeout = millis() + 3;
|
uint32_t timeout = millis() + 6;
|
||||||
|
|
||||||
while (!TimeReached(timeout) && (rcvd <= size)) {
|
while (!TimeReached(timeout) && (rcvd <= size)) {
|
||||||
// while (!TimeReached(timeout)) {
|
// while (!TimeReached(timeout)) {
|
||||||
|
|
Loading…
Reference in New Issue