You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!esb_paired&&get_status(SYS_STATUS_USB_CONNECTED) == false &&k_uptime_get() -750>start_time) // only automatically enter pairing while not potentially communicating by usb
452
453
{
453
454
esb_pair();
454
455
esb_initialize(true);
455
456
}
456
-
if (tx_errors >= 100)
457
+
if (tx_errors >= TX_ERROR_THRESHOLD)
457
458
{
459
+
if (get_status(SYS_STATUS_CONNECTION_ERROR) == false &&get_status(SYS_STATUS_USB_CONNECTED) == false) // only raise error while not potentially communicating by usb
460
+
set_status(SYS_STATUS_CONNECTION_ERROR, true);
458
461
#ifUSER_SHUTDOWN_ENABLED
459
-
if (k_uptime_get() -last_tx_success>CONFIG_CONNECTION_TIMEOUT_DELAY) // shutdown if receiver is not detected
462
+
if (k_uptime_get() -last_tx_success>CONFIG_CONNECTION_TIMEOUT_DELAY) // shutdown if receiver is not detected // TODO: is shutdown necessary if usb is connected at the time?
460
463
{
461
464
LOG_WRN("No response from receiver in %dm", CONFIG_CONNECTION_TIMEOUT_DELAY / 60000);
0 commit comments