adjust batch ack timing and rename e_wh field
This commit is contained in:
@@ -205,7 +205,7 @@ bool meterBatchToJson(const MeterData *samples, size_t count, uint16_t batch_id,
|
||||
doc["bat_v"] = serialized(bat_buf);
|
||||
}
|
||||
|
||||
JsonArray energy = doc.createNestedArray("energy_wh");
|
||||
JsonArray energy = doc.createNestedArray("e_wh");
|
||||
JsonArray p_w = doc.createNestedArray("p_w");
|
||||
JsonArray p1_w = doc.createNestedArray("p1_w");
|
||||
JsonArray p2_w = doc.createNestedArray("p2_w");
|
||||
@@ -258,7 +258,7 @@ bool jsonToMeterBatch(const String &json, MeterData *out_samples, size_t max_cou
|
||||
uint32_t t_first = doc["t_first"] | t0;
|
||||
uint32_t t_last = doc["t_last"] | t_first;
|
||||
uint32_t dt_s = doc["dt_s"] | 1;
|
||||
JsonArray energy = doc["energy_wh"].as<JsonArray>();
|
||||
JsonArray energy = doc["e_wh"].as<JsonArray>();
|
||||
JsonArray p_w = doc["p_w"].as<JsonArray>();
|
||||
JsonArray p1_w = doc["p1_w"].as<JsonArray>();
|
||||
JsonArray p2_w = doc["p2_w"].as<JsonArray>();
|
||||
|
||||
Reference in New Issue
Block a user