* Refactor: removed duplicated radio_rng_seed(), radio_set_params(), radio_set_tx_power()

This commit is contained in:
Scott Powell
2026-05-01 14:47:07 +10:00
parent ccda0a99d8
commit 0a8a0a4904
165 changed files with 110 additions and 1397 deletions
-17
View File
@@ -34,23 +34,6 @@ bool radio_init() {
#endif
}
uint32_t radio_get_rng_seed() {
return radio.random(0x7FFFFFFF);
}
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr) {
radio.setFrequency(freq);
radio.setSpreadingFactor(sf);
radio.setBandwidth(bw);
radio.setCodingRate(cr);
radio_driver.updatePreamble(sf);
}
void radio_set_tx_power(int8_t dbm) {
radio.setOutputPower(dbm);
}
mesh::LocalIdentity radio_new_identity() {
RadioNoiseListener rng(radio);
return mesh::LocalIdentity(&rng); // create new random identity