fix(kiss): periodic noise floor calibration and AGC reset#1591
fix(kiss): periodic noise floor calibration and AGC reset#1591ripplebiz merged 2 commits intomeshcore-dev:devfrom
Conversation
- Trigger noise floor calibration every 2s and AGC reset every 30s in main loop. - Reorder loop to match Dispatcher: calibrate + radio.loop() before AGC reset and recvRaw() so RSSI is never sampled right after startReceive(). - Update protocol doc with calibration intervals and typical noise floor range. - Variant platformio.ini updates (heltec_v3, rak4631).
| next_noise_floor_calib_ms = millis(); | ||
| } | ||
| radio_driver.loop(); | ||
|
|
There was a problem hiding this comment.
Are there plans to add some Listen-Before-Talk logic here?
There was a problem hiding this comment.
That seems like a design preference. @ViezeVingertjes did the original work, I just added the necessary functions to get the KISS modem working properly with pyMC_core.
He has implemented CMD_IS_CHANNEL_BUSY (0x11) which returns RESP_CHANNEL_BUSY (0x31) with one byte: 0x00 = clear, 0x01 = busy. The KISS modem is kind of a dumb pipe and the user software can manage its own LBT like the repeater firmware calling _radio.isReceiving().
|
Nice find. 👍🏼 |
If you're OK with this PR, I'll merge it |
LGTM; only remark would be the comments hehe... claude loves to comment. |
|
Yeah, sorry. I did a "hey, did I miss anything" pass and he was like, "here are more comments!" I can reduce/eliminate them if you prefer. |
Only if you have time for it! otherwise, just let them be, for another time hehe. |
|
I cleaned up or removed most of the comments my ever-helpful robot friend decided to add. Sorry about that. 😖 |

In the previous implementation, the noise floor was calibrated once and the value was returned for the entire time the radio was active. This makes a change to: