Set coding rate

This commit is contained in:
Ben Meadors
2025-09-26 18:32:04 -05:00
parent 9980c56d81
commit 4be400fceb
13 changed files with 199 additions and 10 deletions
+13
View File
@@ -337,4 +337,17 @@ bool RF95Interface::sleep()
return true;
}
bool RF95Interface::setRadioCodingRate(uint8_t cr)
{
// Direct hardware call for efficient coding rate change
int state = lora->setCodingRate(cr);
if (state != RADIOLIB_ERR_NONE) {
LOG_WARN("Failed to set coding rate to 4/%d, error %d", cr, state);
return false;
}
LOG_DEBUG("Set coding rate to 4/%d", cr);
return true;
}
#endif