fix time sync problems
This commit is contained in:
@@ -80,6 +80,7 @@ void powermgm_loop( TTGOClass *ttgo ) {
|
|||||||
ttgo->bl->adjust( 0 );
|
ttgo->bl->adjust( 0 );
|
||||||
ttgo->displaySleep();
|
ttgo->displaySleep();
|
||||||
ttgo->closeBL();
|
ttgo->closeBL();
|
||||||
|
ttgo->rtc->syncToRtc();
|
||||||
if ( powermgm_get_event( POWERMGM_WIFI_ACTIVE ) ) wifictl_off();
|
if ( powermgm_get_event( POWERMGM_WIFI_ACTIVE ) ) wifictl_off();
|
||||||
while( powermgm_get_event( POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN ) ) { yield(); }
|
while( powermgm_get_event( POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN ) ) { yield(); }
|
||||||
ttgo->stopLvglTick();
|
ttgo->stopLvglTick();
|
||||||
|
|||||||
@@ -134,8 +134,6 @@ void timesync_Task( void * pvParameters ) {
|
|||||||
if( !getLocalTime( &info ) ) {
|
if( !getLocalTime( &info ) ) {
|
||||||
Serial.println( "Failed to obtain time\r\n" );
|
Serial.println( "Failed to obtain time\r\n" );
|
||||||
}
|
}
|
||||||
ttgo->rtc->syncToRtc();
|
|
||||||
|
|
||||||
xEventGroupClearBits( time_event_handle, TIME_SYNC_REQUEST );
|
xEventGroupClearBits( time_event_handle, TIME_SYNC_REQUEST );
|
||||||
}
|
}
|
||||||
vTaskSuspend( _timesync_Task );
|
vTaskSuspend( _timesync_Task );
|
||||||
|
|||||||
Reference in New Issue
Block a user