whole lotta shit clion made me do
This commit is contained in:
@@ -21,7 +21,7 @@ struct sensors {
|
||||
std::mutex mtx; // making sure the struct isnt accessed by multiple threads at once
|
||||
};
|
||||
|
||||
void start(void);
|
||||
void start();
|
||||
|
||||
} // namespace app
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ struct cpuSensors {
|
||||
};
|
||||
|
||||
void detectHwmon(cpuSensors* target, const std::string& pci);
|
||||
void update(cpuSensors* g);
|
||||
void update(cpuSensors* c);
|
||||
|
||||
} // namespace cpu
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#ifndef GPU_METRICS_HPP
|
||||
#define GPU_METRICS_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
/* STRUCTS COPIED WHOLESALE FROM LINUX SOURCE CODE, formatted and wrapped around a namespace
|
||||
@@ -792,4 +795,6 @@ struct gpu_metrics_v3_0 {
|
||||
/* Metrics table alpha filter time constant [us] */
|
||||
uint32_t time_filter_alphavalue;
|
||||
};
|
||||
} // namespace gpu
|
||||
} // namespace gpu
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,19 +14,19 @@ class HomeAssistant {
|
||||
std::string entity;
|
||||
uint16_t id = 2;
|
||||
std::string tx;
|
||||
struct lws_context* context = NULL;
|
||||
lws* websock = NULL;
|
||||
struct lws_context* context = nullptr;
|
||||
lws* websock = nullptr;
|
||||
void event_handler(struct lws* wsi, enum lws_callback_reasons reason, char* in);
|
||||
static int callback(struct lws* wsi, enum lws_callback_reasons reason, void* user, void* in, size_t len);
|
||||
|
||||
public:
|
||||
HomeAssistant(std::string addr, std::string ent);
|
||||
HomeAssistant(const std::string& addr, const std::string& ent);
|
||||
~HomeAssistant();
|
||||
|
||||
float state = 0.0f;
|
||||
int connect();
|
||||
void service(int timeout_ms = 0);
|
||||
void disconnect();
|
||||
void disconnect() const;
|
||||
void service(int timeout_ms = 0) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
namespace sys {
|
||||
|
||||
const char months[][4] = {"sty", "lut", "mar", "kwi", "maj", "cze", "lip", "sie", "wrz", "paz", "lis", "gru"};
|
||||
const char wdays[][4] = {"Nie", "Pon", "Wto", "Sro", "Czw", "Pia", "Sob"};
|
||||
constexpr char months[][4] = {"sty", "lut", "mar", "kwi", "maj", "cze", "lip", "sie", "wrz", "paz", "lis", "gru"};
|
||||
constexpr char wdays[][4] = {"Nie", "Pon", "Wto", "Sro", "Czw", "Pia", "Sob"};
|
||||
|
||||
struct sysSensors {
|
||||
std::string hwmon = "";
|
||||
std::string hwmon;
|
||||
uint16_t fan_speed[2] = {0}; // left and right cpu fans
|
||||
uint8_t t_sensor = 0; // ntc temp sensor
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user