mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Отремантировал uptime
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
extern void sysUptime();
|
||||
extern void uptimeReading();
|
||||
33
include/items/vSensorUptime.h
Normal file
33
include/items/vSensorUptime.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Global.h"
|
||||
#include "GyverFilters.h"
|
||||
|
||||
class SensorUptime;
|
||||
|
||||
typedef std::vector<SensorUptime> MySensorUptimeVector;
|
||||
|
||||
struct paramsUptime {
|
||||
String key;
|
||||
unsigned long interval;
|
||||
};
|
||||
|
||||
class SensorUptime {
|
||||
public:
|
||||
SensorUptime(const paramsUptime& paramsUpt);
|
||||
~SensorUptime();
|
||||
|
||||
void loop();
|
||||
void read();
|
||||
|
||||
private:
|
||||
paramsUptime _paramsUpt;
|
||||
|
||||
unsigned long prevMillis;
|
||||
unsigned long difference;
|
||||
};
|
||||
|
||||
extern MySensorUptimeVector* mySensorUptime;
|
||||
|
||||
extern void uptimeSensor();
|
||||
Reference in New Issue
Block a user