mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-05-05 07:34:24 +00:00
Reduce resolution of "up" in JSON from millis to seconds
This commit is contained in:
@@ -36,6 +36,8 @@ ADC_MODE(ADC_VCC);
|
|||||||
#include "Kaifa.h"
|
#include "Kaifa.h"
|
||||||
#include "Kamstrup.h"
|
#include "Kamstrup.h"
|
||||||
|
|
||||||
|
#include "Uptime.h"
|
||||||
|
|
||||||
HwTools hw;
|
HwTools hw;
|
||||||
|
|
||||||
DNSServer dnsServer;
|
DNSServer dnsServer;
|
||||||
@@ -531,7 +533,7 @@ void sendMqttData(String data)
|
|||||||
// Build a json with the message in a "data" attribute
|
// Build a json with the message in a "data" attribute
|
||||||
StaticJsonDocument<128> json;
|
StaticJsonDocument<128> json;
|
||||||
json["id"] = WiFi.macAddress();
|
json["id"] = WiFi.macAddress();
|
||||||
json["up"] = millis();
|
json["up"] = millis64()/1000;
|
||||||
json["data"] = data;
|
json["data"] = data;
|
||||||
double vcc = hw.getVcc();
|
double vcc = hw.getVcc();
|
||||||
if(vcc > 0) {
|
if(vcc > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user