mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-17 00:24:17 +00:00
refactor repeater prefs changes
This commit is contained in:
@@ -576,7 +576,7 @@ uint32_t RepeaterMesh::getDirectRetransmitDelay(const mesh::Packet* packet) {
|
||||
/* Jitter around Arduino direct factor 0.3 using a per-packet factor
|
||||
* in the range [0.25, 0.40]. */
|
||||
uint32_t factor_milli = (uint32_t)getRNG()->nextInt(250, 401);
|
||||
uint32_t max_jitter = (5 * airtime * factor_milli) / 1000;
|
||||
uint32_t max_jitter = (airtime * factor_milli) / 1000;
|
||||
/* Floor: give downstream nodes time to finish RX processing
|
||||
* and return to RX mode before we TX (~20ms settle + jitter). */
|
||||
return 20 + getRNG()->nextInt(0, max_jitter + 1);
|
||||
@@ -1028,6 +1028,13 @@ void RepeaterMesh::applyTempRadioParams(float freq, float bw, uint8_t sf, uint8_
|
||||
revert_radio_at = futureMillis(2000 + timeout_mins * 60 * 1000);
|
||||
}
|
||||
|
||||
void RepeaterMesh::freezeRadioParams(float freq, float bw, uint8_t sf, uint8_t cr) {
|
||||
auto& radio = getRadioDriver(_radio);
|
||||
if (!radio.hasRadioOverride()) {
|
||||
radio.setRadioOverride(freq, bw, sf, cr);
|
||||
}
|
||||
}
|
||||
|
||||
bool RepeaterMesh::formatFileSystem() {
|
||||
if (_store) {
|
||||
return _store->formatFileSystem();
|
||||
|
||||
Reference in New Issue
Block a user