mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-20 13:04:21 -04:00
[MOS-278] Fixed frequency hold algorithm behaviour
fixed hold frequency algorithm behaviour added basic tests for frequecy changing updated catch for newer gcc tests added
This commit is contained in:
committed by
Adam Dobrowolski
parent
aacd665eb9
commit
43cd960523
@@ -5,10 +5,13 @@
|
||||
|
||||
namespace sys::cpu
|
||||
{
|
||||
bsp::CpuFrequencyMHz ImmediateUpscale::calculateImplementation(const AlgorithmData &data)
|
||||
AlgorithmResult ImmediateUpscale::calculateImplementation(const AlgorithmData &data)
|
||||
{
|
||||
const auto now = data.sentinel.frequency;
|
||||
const auto was = data.curentFrequency;
|
||||
return std::max(now, was);
|
||||
if (now > was) {
|
||||
return {algorithm::Change::UpScaled, now};
|
||||
}
|
||||
return {algorithm::Change::NoChange, was};
|
||||
}
|
||||
} // namespace sys::cpu
|
||||
|
||||
Reference in New Issue
Block a user