Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/companion_radio/MyMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ int MyMesh::getInterferenceThreshold() const {

int MyMesh::calcRxDelay(float score, uint32_t air_time) const {
if (_prefs.rx_delay_base <= 0.0f) return 0;
return (int)((pow(_prefs.rx_delay_base, 0.85f - score) - 1.0) * air_time);
return (int)((powf(_prefs.rx_delay_base, 0.85f - score) - 1.0f) * air_time);
}

uint32_t MyMesh::getRetransmitDelay(const mesh::Packet *packet) {
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_repeater/MyMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ void MyMesh::logTxFail(mesh::Packet *pkt, int len) {

int MyMesh::calcRxDelay(float score, uint32_t air_time) const {
if (_prefs.rx_delay_base <= 0.0f) return 0;
return (int)((pow(_prefs.rx_delay_base, 0.85f - score) - 1.0) * air_time);
return (int)((powf(_prefs.rx_delay_base, 0.85f - score) - 1.0f) * air_time);
}

uint32_t MyMesh::getRetransmitDelay(const mesh::Packet *packet) {
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_room_server/MyMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void MyMesh::logTxFail(mesh::Packet *pkt, int len) {

int MyMesh::calcRxDelay(float score, uint32_t air_time) const {
if (_prefs.rx_delay_base <= 0.0f) return 0;
return (int)((pow(_prefs.rx_delay_base, 0.85f - score) - 1.0) * air_time);
return (int)((powf(_prefs.rx_delay_base, 0.85f - score) - 1.0f) * air_time);
}

const char *MyMesh::getLogDateTime() {
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_sensor/SensorMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ bool SensorMesh::allowPacketForward(const mesh::Packet* packet) {

int SensorMesh::calcRxDelay(float score, uint32_t air_time) const {
if (_prefs.rx_delay_base <= 0.0f) return 0;
return (int) ((pow(_prefs.rx_delay_base, 0.85f - score) - 1.0) * air_time);
return (int) ((powf(_prefs.rx_delay_base, 0.85f - score) - 1.0f) * air_time);
}

uint32_t SensorMesh::getRetransmitDelay(const mesh::Packet* packet) {
Expand Down
4 changes: 2 additions & 2 deletions src/Dispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void Dispatcher::updateTxBudget() {
}

int Dispatcher::calcRxDelay(float score, uint32_t air_time) const {
return (int) ((pow(10, 0.85f - score) - 1.0) * air_time);
return (int) ((powf(10, 0.85f - score) - 1.0f) * air_time);
}

uint32_t Dispatcher::getCADFailRetryDelay() const {
Expand Down Expand Up @@ -386,4 +386,4 @@ unsigned long Dispatcher::futureMillis(int millis_from_now) const {
return _ms->getMillis() + millis_from_now;
}

}
}