diff --git a/src/power_policy/imx8_alternating.hpp b/src/power_policy/imx8_alternating.hpp index 82e74b16..c162fd20 100644 --- a/src/power_policy/imx8_alternating.hpp +++ b/src/power_policy/imx8_alternating.hpp @@ -34,11 +34,11 @@ class PowerPolicy_Imx8_Alternating : public PowerPolicy } try { - f1_a53 = a53_pol.available_frequencies->at(std::stoul(a53_f1_str)); - f2_a53 = a53_pol.available_frequencies->at(std::stoul(a53_f2_str)); + f1_a53 = a53_pol.get_freq(std::stoul(a53_f1_str)); + f2_a53 = a53_pol.get_freq(std::stoul(a53_f2_str)); - f1_a72 = a72_pol.available_frequencies->at(std::stoul(a72_f1_str)); - f2_a72 = a72_pol.available_frequencies->at(std::stoul(a72_f2_str)); + f1_a72 = a72_pol.get_freq(std::stoul(a72_f1_str)); + f2_a72 = a72_pol.get_freq(std::stoul(a72_f2_str)); } catch (...) { throw_with_nested( runtime_error("All power policy arguments must be integers in the range <0, 3>")); diff --git a/src/power_policy/imx8_fixed.hpp b/src/power_policy/imx8_fixed.hpp index fa6430bb..f05989a3 100644 --- a/src/power_policy/imx8_fixed.hpp +++ b/src/power_policy/imx8_fixed.hpp @@ -30,8 +30,8 @@ class PowerPolicy_Imx8_Fixed : public PowerPolicy CpuFrequencyHz a53_freq, a72_freq; try { - a53_freq = a53_pol.available_frequencies->at(std::stoul(a53_freq_i)); - a72_freq = a72_pol.available_frequencies->at(std::stoul(a72_freq_i)); + a53_freq = a53_pol.get_freq(std::stoul(a53_freq_i)); + a72_freq = a72_pol.get_freq(std::stoul(a72_freq_i)); } catch (...) { throw runtime_error("Both power policy arguments must be integers in the range <0, 3>"); }