mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 01:04:30 +01:00
Better SubGHz ESP32-C6 Stability by doing housekeeping every 60 Seconds
This commit is contained in:
@@ -790,6 +790,7 @@ void loop() {
|
||||
}
|
||||
}
|
||||
|
||||
radio_housekeeping();
|
||||
memset(&lastTagReturn, 0, 8);
|
||||
for (uint8_t cCount = 0; cCount < MAX_PENDING_MACS; cCount++) {
|
||||
if (pendingDataArr[cCount].attemptsLeft == 1) {
|
||||
|
||||
@@ -130,6 +130,16 @@ bool radioTx(uint8_t *packet, bool subGhz) {
|
||||
}
|
||||
}
|
||||
|
||||
void radio_housekeeping()
|
||||
{
|
||||
if (has_sub_ghz) {
|
||||
tiRadioRxEnable(false, false);
|
||||
delayMicroseconds(500);
|
||||
tiRadioRxEnable(true, false);
|
||||
delayMicroseconds(500);
|
||||
}
|
||||
}
|
||||
|
||||
void radioSetChannel(uint8_t ch) {
|
||||
radio_init(ch);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
extern uint8_t mSelfMac[8];
|
||||
|
||||
void radio_init(uint8_t ch);
|
||||
void radio_housekeeping();
|
||||
bool radioTx(uint8_t *packet, bool subGhz);
|
||||
void radioSetChannel(uint8_t ch);
|
||||
void radioSetTxPower(uint8_t power);
|
||||
|
||||
@@ -315,7 +315,7 @@ static void tiRadioPrvPacketRx(void) {
|
||||
|
||||
if (!now && !--nWaitCycles) {
|
||||
tiRadioPrvDeselect();
|
||||
ESP_LOGI(TAG, " !!! RX timeout !!! ");
|
||||
ESP_LOGE(TAG, " !!! RX timeout !!! ");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ out:
|
||||
state = tiRadioPrvGetState();
|
||||
|
||||
if (!--maxWait) {
|
||||
//ESP_LOGI(TAG, "too long wait for rx state. state is %d", state);
|
||||
//ESP_LOGE(TAG, "too long wait for rx state. state is %d", state);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user