Merge remote-tracking branch 'origin/main'
# Conflicts: # include/LCDDisplay.hpp # src/LCDDisplay.cpp
This commit is contained in:
@@ -795,6 +795,6 @@ struct gpu_metrics_v3_0 {
|
||||
/* Metrics table alpha filter time constant [us] */
|
||||
uint32_t time_filter_alphavalue;
|
||||
};
|
||||
} // namespace gpu
|
||||
} // namespace metrics
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <string>
|
||||
|
||||
class HomeAssistant {
|
||||
public:
|
||||
public:
|
||||
struct Config {
|
||||
std::string address;
|
||||
std::string entity;
|
||||
|
||||
@@ -144,7 +144,7 @@ void Application::displayThread(const std::stop_token& st) {
|
||||
// actual main display loop
|
||||
while (!st.stop_requested()) {
|
||||
m_control.display.try_acquire_for(std::chrono::milliseconds(static_cast<int>(m_config.lcd.refresh_interval_ms * 1.25))); // holds the loop until sensor data is ready, max 1.25x of the loop time
|
||||
if (st.stop_requested()) break; // needed, otherwise it wont quit correctly
|
||||
if (st.stop_requested()) break; // needed, otherwise it wont quit correctly
|
||||
{
|
||||
std::lock_guard lock(m_control.sensors);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ int detect(cpuSensors* target, const std::string& pci) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
target->module = utils::fileExists(target->hwmon + "/in1_input") ? zenpower : k10temp; // idk if this is reliable, we're trying to avoid just reading the name
|
||||
target->module = utils::fileExists(target->hwmon + "/in1_input") ? zenpower : k10temp; // idk if this is reliable, we're trying to avoid just reading the name
|
||||
target->num_cores = std::thread::hardware_concurrency();
|
||||
applog(LOG::INF, "Detected {} cores, module enum #{} in path \"{}\"", target->num_cores, static_cast<uint8_t>(target->module), target->hwmon);
|
||||
return 0;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <string>
|
||||
|
||||
HomeAssistant::HomeAssistant(const Config& config){
|
||||
HomeAssistant::HomeAssistant(const Config& config) {
|
||||
m_config = config;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#include <utils.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utils.hpp>
|
||||
|
||||
namespace utils {
|
||||
|
||||
@@ -28,4 +29,4 @@ std::string getFirstDir(const std::string_view& path) {
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace utils
|
||||
Reference in New Issue
Block a user