Skip to content

Commit

Permalink
cron: don't include rtctime_internal.h (nodemcu#2084)
Browse files Browse the repository at this point in the history
That file is supposed to only be included once because it does things
like declare static globals.  As it stands, cron doesn't believe time is
ticking.

Fixes nodemcu#2080
  • Loading branch information
nwf authored and Konrad Eisele committed Jan 7, 2018
1 parent e0ee153 commit 93e58d9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/modules/cron.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "c_string.h"
#include "ets_sys.h"
#include "time.h"
#include "rtc/rtctime_internal.h"
#include "rtc/rtctime.h"
#include "stdlib.h"
#include "mem.h"
Expand Down Expand Up @@ -189,7 +188,7 @@ static void cron_handle_time(uint8_t mon, uint8_t dom, uint8_t dow, uint8_t hour

static void cron_handle_tmr() {
struct rtc_timeval tv;
rtc_time_gettimeofday(&tv);
rtctime_gettimeofday(&tv);
if (tv.tv_sec == 0) { // Wait for RTC time
ets_timer_arm_new(&cron_timer, 1000, 0, 1);
return;
Expand Down

0 comments on commit 93e58d9

Please sign in to comment.