Skip to content

Commit

Permalink
Increase waiting time for valid response
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlcore committed Nov 18, 2024
1 parent bdf0d11 commit 25e10f8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions BSB_LAN/BSB_LAN.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5176,7 +5176,7 @@ void loop() {
printToWebClient("\r\nComplete dump:\r\n");
c = 0;
int outBufLen = strlen(outBuf);
unsigned long timeout = millis() + 3000;
unsigned long timeout = millis() + 6000;
while (bus->Send(TYPE_QUR, 0x053D0001, msg, tx_msg) != BUS_OK && (millis() < timeout)) {
printTelegram(tx_msg, -1);
printTelegram(msg, -1);
Expand All @@ -5187,7 +5187,7 @@ void loop() {
bin2hex(outBuf + outBufLen, msg, msg[bus->getLen_idx()]+bus->getBusType(), ' ');
printToWebClient(outBuf + outBufLen);
printToWebClient("\r\n");
timeout = millis() + 3000;
timeout = millis() + 6000;
while (bus->Send(TYPE_QUR, 0x053D0064, msg, tx_msg) != BUS_OK && (millis() < timeout)) {
printTelegram(tx_msg, -1);
printTelegram(msg, -1);
Expand All @@ -5199,7 +5199,7 @@ void loop() {
printToWebClient(outBuf + outBufLen);
printToWebClient("\r\n");
flushToWebClient();
timeout = millis() + 3000;
timeout = millis() + 6000;
while (bus->Send(TYPE_IQ1, c, msg, tx_msg) != BUS_OK && (millis() < timeout)) {
printTelegram(tx_msg, -1);
printTelegram(msg, -1);
Expand All @@ -5210,7 +5210,7 @@ void loop() {
printTelegram(msg, -1);
int IA1_max = (msg[7+bus->offset] << 8) + msg[8+bus->offset];
if (msg[4+bus->offset] == 0x13 && IA1_max > 0) {
timeout = millis() + 3000;
timeout = millis() + 6000;
while (bus->Send(TYPE_IQ2, c, msg, tx_msg) != BUS_OK && (millis() < timeout)) {
printToWebClient("Didn't receive matching telegram, resending...\r\n");
delay(500);
Expand All @@ -5222,7 +5222,7 @@ void loop() {
#if defined(ESP32)
esp_task_wdt_reset();
#endif
timeout = millis() + 3000;
timeout = millis() + 6000;
while (bus->Send(TYPE_IQ1, IA1_counter, msg, tx_msg) != BUS_OK && (millis() < timeout)) {
printToWebClient("Didn't receive matching telegram, resending...\r\n");
delay(500);
Expand All @@ -5236,7 +5236,7 @@ void loop() {
#if defined(ESP32)
esp_task_wdt_reset();
#endif
timeout = millis() + 3000;
timeout = millis() + 6000;
while (bus->Send(TYPE_IQ2, IA2_counter, msg, tx_msg) != BUS_OK && (millis() < timeout)) {
printToWebClient("Didn't receive matching telegram, resending...\r\n");
delay(500);
Expand Down

0 comments on commit 25e10f8

Please sign in to comment.