DIYBMS v4

I decided to do it in a minimalist style =) one line only

    // Ensure we service the cell modules every 4 seconds. 
    //To prevent the queue overflowing for every request in the queue additional 200ms delay is added (max 10s)
    vTaskDelay(pdMS_TO_TICKS(4000 + prg.queueLength()*200));

Works fine: no errors, send Q lenght stays at 0 or near 0 values, if more requests generated (module balancing) send q length rises for short time but fast returns to 0.

1 Like