Skip to content

Commit adfcac1

Browse files
authored
fix datatype
general uint not for simulator platform
1 parent ff07011 commit adfcac1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/driver/drv_bl0937.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,20 @@ static float g_p_forceonroc=0.0f;
7070
static int g_forceonroc_gtlim=-1;
7171
static float g_p_prevsec=0;
7272
static 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;
8280
struct tm *ltm;
8381
int_fast8_t g_ntp_hourlast=-1;
8482
int g_diff_ntp_secel=0;
8583
int g_sfreqcalcdone=0;
8684
int_fast8_t g_sfreqcalc_ntphour_last=-1;
8785
time_t g_sfreqcalc_ntpTime_last;
88-
uint g_sfreqcalc_secelap_last=0;
86+
uint32_t g_sfreqcalc_secelap_last=0;
8987
float 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

Comments
 (0)