|
|
|
@ -408,7 +408,7 @@ Setup::Setup(QWidget *parent) : QStackedWidget(parent) { |
|
|
|
std::stringstream buffer; |
|
|
|
std::stringstream buffer; |
|
|
|
buffer << std::ifstream("/sys/class/hwmon/hwmon1/in1_input").rdbuf(); |
|
|
|
buffer << std::ifstream("/sys/class/hwmon/hwmon1/in1_input").rdbuf(); |
|
|
|
float voltage = (float)std::atoi(buffer.str().c_str()) / 1000.; |
|
|
|
float voltage = (float)std::atoi(buffer.str().c_str()) / 1000.; |
|
|
|
if (voltage < 7) { |
|
|
|
if (voltage > 0 && voltage < 7) { |
|
|
|
addWidget(low_voltage()); |
|
|
|
addWidget(low_voltage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|