mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 04:58:17 +08:00
fix:修复逻辑错误
add:烧录说明README_Program.md
This commit is contained in:
@@ -79,7 +79,7 @@ void appRestoreDefault_callback( void * const user_config_data, uint32_t size )
|
||||
int application_start( void )
|
||||
{
|
||||
int i;
|
||||
os_log( "Start" );
|
||||
os_log( "Start v0.1" );
|
||||
|
||||
OSStatus err = kNoErr;
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include "sntp.h"
|
||||
#include "user_sntp.h"
|
||||
#include "cJSON/cJSON.h"
|
||||
#include "user_mqtt_client.h"
|
||||
#include "user_function.h"
|
||||
|
||||
void rtc_thread( mico_thread_arg_t arg );
|
||||
|
||||
@@ -69,7 +71,7 @@ OSStatus user_sntp_get_time( )
|
||||
os_log("sntp_get_time4 err = %d.", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
return kNoErr;
|
||||
}
|
||||
|
||||
OSStatus user_rtc_init( void )
|
||||
@@ -165,7 +167,7 @@ void rtc_thread( mico_thread_arg_t arg )
|
||||
&& ((repeat == 0x00) || repeat & (1 << (rtc_time.weekday - 1)))
|
||||
)
|
||||
{
|
||||
if ( user_config->plug[i].on = user_config->plug[i].task[j].action )
|
||||
if ( user_config->plug[i].on != user_config->plug[i].task[j].action )
|
||||
{
|
||||
user_relay_set( i, user_config->plug[i].task[j].action );
|
||||
update_user_config_flag = 1;
|
||||
@@ -244,7 +246,7 @@ void rtc_thread( mico_thread_arg_t arg )
|
||||
|
||||
free( json_str );
|
||||
cJSON_Delete( json_send );
|
||||
os_log("cJSON_Delete");
|
||||
// os_log("cJSON_Delete");
|
||||
}
|
||||
|
||||
//SNTP<54><50><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿСʱУһ<D7BC><D2BB>
|
||||
@@ -264,7 +266,7 @@ void rtc_thread( mico_thread_arg_t arg )
|
||||
mico_rtos_thread_msleep( 900 );
|
||||
}
|
||||
|
||||
exit:
|
||||
// exit:
|
||||
os_log("EXIT: rtc exit with err = %d.", err);
|
||||
mico_rtos_delete_thread( NULL );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user