Skip to content

Commit

Permalink
Merge pull request #695 from OpenHD/consti-dev
Browse files Browse the repository at this point in the history
x20 specific warning / caution levels
  • Loading branch information
Consti10 authored Apr 27, 2024
2 parents 96a1601 + c6f0526 commit fb1aac1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions qml/ui/widgets/SOCStatusWidgetGeneric.qml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ BaseWidget {
// 1 - caution
// 2 - warning
function get_cpuload_warning_level(){
if(m_is_air && _ohdSystemAir.ohd_platform_type==30){
// X20
if(m_cpuload_perc>=95){
return 2;
}
if(m_cpuload_perc>=85){
return 1;
}
return 0;
}
if (m_cpuload_perc>= m_cpuload_perc_warn) {
return 2;
}
Expand All @@ -49,6 +59,16 @@ BaseWidget {
return 0;
}
function get_temperature_warning_level(){
if(m_is_air && _ohdSystemAir.ohd_platform_type==30){
// X20, it's not the SOC temperature
if (m_soc_temperature_deg>= 79-1) {
return 2;
}
if (m_soc_temperature_deg>= 75-1) {
return 1;
}
return 0;
}
if (m_soc_temperature_deg>= m_soc_temperature_deg_warn) {
return 2;
}
Expand Down

0 comments on commit fb1aac1

Please sign in to comment.