@@ -70,22 +70,20 @@ static float g_p_forceonroc=0.0f;
7070static int g_forceonroc_gtlim = -1 ;
7171static float g_p_prevsec = 0 ;
7272static uint32_t g_p_pulsesprevsec = 0 ;
73- //static uint g_secondsElapsed=0;
74- //static uint8_t cyclecnt=0, cyclecnt_prev=0;
7573
7674#define TIME_CHECK_COMPARE_NTP 1
7775#if TIME_CHECK_COMPARE_NTP > 0
7876#include "drv_ntp.h"
7977#include <time.h>
8078
81- time_t g_ntpTime ;
79+ // time_t g_ntpTime;
8280struct tm * ltm ;
8381int_fast8_t g_ntp_hourlast = -1 ;
8482int g_diff_ntp_secel = 0 ;
8583int g_sfreqcalcdone = 0 ;
8684int_fast8_t g_sfreqcalc_ntphour_last = -1 ;
8785time_t g_sfreqcalc_ntpTime_last ;
88- uint g_sfreqcalc_secelap_last = 0 ;
86+ uint32_t g_sfreqcalc_secelap_last = 0 ;
8987float g_scale_samplefreq = 1 ;
9088#endif
9189
@@ -594,7 +592,7 @@ void BL0937_RunEverySecond(void)
594592 float p_roc = 0.0f ;
595593 float p_thissec = -9999.99f ;
596594 if (g_p_forceonroc > 0 ) {
597- uint freq_p_thissec = (uint )BL0937_utlDiffCalcU32 (g_p_pulsesprevsec , g_p_pulses );
595+ uint32_t freq_p_thissec = (uint )BL0937_utlDiffCalcU32 (g_p_pulsesprevsec , g_p_pulses );
598596 if (freq_p_thissec > 10000 ) {
599597 addLogAdv (LOG_INFO , LOG_FEATURE_ENERGYMETER , "ts %5d p roc detection invalid freq %i p_pulses prevsec %i now %i]\n" , g_secondsElapsed
600598 ,freq_p_thissec , g_p_prevsec , g_p_pulses );
0 commit comments