Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 2 additions & 4 deletions src/airtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ uint32_t AirTime::getSecondsPerPeriod()

uint32_t AirTime::getSecondsSinceBoot()
{
return this->secSinceBoot;
return millis() / 1000;
Comment thread
m1nl marked this conversation as resolved.
Resolved
}

float AirTime::channelUtilizationPercent()
Expand Down Expand Up @@ -161,8 +161,6 @@ AirTime::AirTime() : concurrency::OSThread("AirTime"), airtimes({}) {}

int32_t AirTime::runOnce()
{
secSinceBoot++;

uint8_t utilPeriod = this->getPeriodUtilMinute();
uint8_t utilPeriodTX = this->getPeriodUtilHour();

Expand Down Expand Up @@ -206,5 +204,5 @@ int32_t AirTime::runOnce()
this->utilizationTX[utilPeriodTX] = 0;
}
Comment thread
thebentern marked this conversation as resolved.
Resolved
}
return (1000 * 1);
return 100;
Comment thread
thebentern marked this conversation as resolved.
Resolved
}
1 change: 0 additions & 1 deletion src/airtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ class AirTime : private concurrency::OSThread
bool firstTime = true;
uint8_t lastUtilPeriod = 0;
uint8_t lastUtilPeriodTX = 0;
uint32_t secSinceBoot = 0;
uint8_t max_channel_util_percent = 40;
uint8_t polite_channel_util_percent = 25;
uint8_t polite_duty_cycle_percent = 50; // half of Duty Cycle allowance is ok for metadata
Expand Down
Loading