Skip to content

Commit

Permalink
cron: don't include rtctime_internal.h
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
Nathaniel Wesley Filardo committed Aug 23, 2017
1 parent 0a11e84 commit d844200
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 d844200

Please sign in to comment.