Reduce MQTT publish load.

This commit is contained in:
Robert Strouse 2023-10-31 11:09:58 -07:00
parent 4e3d8597f5
commit 7c983c9b2e
5 changed files with 87 additions and 95 deletions

View file

@ -35,7 +35,7 @@ class GitRepo {
class GitUpdater {
public:
uint8_t status = 0;
unsigned long lastCheck = 0;
uint32_t lastCheck = 0;
bool updateAvailable = false;
appver_t latest;
bool cancelled = false;
@ -51,6 +51,7 @@ class GitUpdater {
void setCurrentRelease(GitRepo &repo);
void loop();
void toJSON(JsonObject &obj);
int checkInternet();
void emitUpdateCheck(uint8_t num=255);
void emitDownloadProgress(size_t total, size_t loaded, const char *evt = "updateProgress");
void emitDownloadProgress(uint8_t num, size_t total, size_t loaded, const char *evt = "updateProgress");