network abstraction, time handling

This commit is contained in:
2021-02-16 11:01:01 +01:00
parent bfbcc309df
commit dfce60e01f
5 changed files with 73 additions and 61 deletions

View File

@ -13,6 +13,8 @@
#include <sinkStruct.h>
#include <sha256.h>
#include <eeprom.h>
#include <networkAbstractionLayer.h>
const uint32_t COUNTER_FREQUENCY = 1.0e6;
@ -198,7 +200,7 @@ void mainsCntsInputCaptureCallback(TIM_HandleTypeDef *htim) {
void counterInit() {
deviceStats = getGlobalDeviceStats();
seconds = wizGetSeconds();
seconds = networkGetSeconds();
for (uint8_t i = 0; i < NUM_OF_MINUTE_BUFFERS; i++) {
minuteBufferReady[i] = false;
}