whole lotta shit clion made me do
This commit is contained in:
14
src/app.cpp
14
src/app.cpp
@@ -110,7 +110,7 @@ void displayThread(const std::stop_token& st, app::sensors& s) {
|
||||
// prepare some tricky sensors
|
||||
std::string gpu_temps = std::to_string(s.gpu.temp_edge);
|
||||
if (s.gpu.temp_hotspot)
|
||||
gpu_temps = utils::pad(lcd.cc(1) + std::to_string(s.gpu.temp_hotspot - s.gpu.temp_edge) + lcd.cc(0), 4) + " " + utils::pad(gpu_temps + "/" + std::to_string(s.gpu.temp_hotspot), 5);
|
||||
gpu_temps = utils::pad(LCDDisplay::cc(1) + std::to_string(s.gpu.temp_hotspot - s.gpu.temp_edge) + LCDDisplay::cc(0), 4) + utils::pad(gpu_temps + "/" + std::to_string(s.gpu.temp_hotspot), 6);
|
||||
|
||||
uint16_t cpu_fan = 0;
|
||||
for (const auto& fan : s.sys.fan_speed)
|
||||
@@ -123,22 +123,22 @@ void displayThread(const std::stop_token& st, app::sensors& s) {
|
||||
lcd.writeBuf(0, 31, utils::pNum(s.avg[1], s.avg[1] > 10 ? 1 : 2));
|
||||
lcd.writeBuf(0, 36, utils::pNum(s.avg[2], s.avg[2] > 10 ? 1 : 2));
|
||||
|
||||
lcd.writeBuf(1, 0, utils::pad(std::to_string(s.cpu.tctl) + "/" + std::to_string(s.cpu.tccd1) + lcd.cc(0), 8, utils::just::left));
|
||||
lcd.writeBuf(1, 0, utils::pad(std::to_string(s.cpu.tctl) + "/" + std::to_string(s.cpu.tccd1) + LCDDisplay::cc(0), 8, utils::just::left));
|
||||
lcd.writeBuf(1, 7, utils::pad(utils::pBytes(s.ram.used, true), 6, utils::just::left));
|
||||
lcd.writeBuf(1, 13, utils::pad(utils::pNum(s.hass_state) + "W", 4));
|
||||
lcd.writeBuf(1, 19, std::to_string(s.sys.t_sensor) + lcd.cc(0)); // t_sensor temp
|
||||
lcd.writeBuf(1, 19, std::to_string(s.sys.t_sensor) + LCDDisplay::cc(0)); // t_sensor temp
|
||||
lcd.writeBuf(1, 32 - gpu_temps.size(), utils::pad(utils::pBytes(s.gpu.vram_used), 6));
|
||||
lcd.writeBuf(1, 39 - gpu_temps.size(), gpu_temps + lcd.cc(0));
|
||||
lcd.writeBuf(1, 39 - gpu_temps.size(), gpu_temps + LCDDisplay::cc(0));
|
||||
|
||||
lcd.writeBuf(2, 0, utils::pad(std::to_string(static_cast<int>(s.cpu.ptotal)) + "W", 8, utils::just::left));
|
||||
lcd.writeBuf(2, s.cpu.ptotal < 100 ? 4 : 5, std::to_string(cpu_fan) + "R"); // avg fan speed
|
||||
lcd.writeBuf(2, 12, lcd.cc(3) + utils::pBytes(s.net.upload));
|
||||
lcd.writeBuf(2, 19, lcd.cc(4) + utils::pBytes(s.net.download));
|
||||
lcd.writeBuf(2, 12, LCDDisplay::cc(3) + utils::pBytes(s.net.upload));
|
||||
lcd.writeBuf(2, 19, LCDDisplay::cc(4) + utils::pBytes(s.net.download));
|
||||
lcd.writeBuf(2, 26, utils::pad(std::to_string(s.gpu.fan_speed) + "R", 5));
|
||||
lcd.writeBuf(2, 31, utils::pad(std::to_string(s.gpu.power_avg) + "/" + std::to_string(s.gpu.power_cap) + "W", 9));
|
||||
|
||||
lcd.writeBuf(3, 0, std::to_string(s.cpu.avg_freq) + "MHz");
|
||||
lcd.writeBuf(3, 14, utils::pad(lcd.cc(2) + utils::pBytes(s.home.usage.free), 6));
|
||||
lcd.writeBuf(3, 14, utils::pad(LCDDisplay::cc(2) + utils::pBytes(s.home.usage.free), 6));
|
||||
lcd.writeBuf(3, 21, utils::pad(std::to_string(s.gpu.clock_core) + "/" + std::to_string(s.gpu.clock_mem) + "MHz ", 13));
|
||||
lcd.writeBuf(3, 34, utils::pad(utils::pNum(s.gpu.vcore, 3) + "V", 5));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user