Auto-detect frequency on first hub startup. If frequency is 50Hz, assume 230V. (This should work for 95% of cases)

This commit is contained in:
MarkBryanMilligan
2022-02-10 13:21:18 -06:00
parent 94ebf5fa93
commit a892c7f0e8
13 changed files with 143 additions and 86 deletions

View File

@@ -187,7 +187,7 @@ public class MongoCurrentMonitorDao implements CurrentMonitorDao {
for (int offset = 0; offset < bytesInDay; offset += 4) {
nanBuffer.putFloat(offset, Float.NaN);
}
for (int key : breakerKeys.keySet()) {
for (int key : breakerKeys.values()) {
dayReadings.computeIfAbsent(key, _k->nanArray);
}
for (Entry<Integer, byte[]> be : dayReadings.entrySet()) {