修复已知编译问题

This commit is contained in:
nhkefus
2025-03-18 13:47:20 +08:00
parent 44ed1d2604
commit 1b7d86f1f7
3 changed files with 5 additions and 4 deletions

View File

@@ -4,6 +4,7 @@
#include "time.h"
#include "unistd.h"
#include "TimeUtils.h"
#include "mico_system.h"
#include "user_gpio.h"
#include "user_wifi.h"
@@ -24,7 +25,7 @@ user_config_t *user_config;
mico_gpio_t Relay[Relay_NUM] = {Relay_0, Relay_1, Relay_2, Relay_3, Relay_4, Relay_5};
/* MICO system callback: Restore default configuration provided by application */
void appRestoreDefault_callback1(void *const user_config_data, uint32_t size) {
void appRestoreDefault_callback(void *const user_config_data, uint32_t size) {
UNUSED_PARAMETER(size);
mico_system_context_get()->micoSystemConfig.name[0] = 1; //在下次重启时使用默认名称
@@ -146,6 +147,7 @@ int application_start(void) {
if (user_config->version != USER_CONFIG_VERSION) { tc1_log("WARNGIN: user params restored!");
err = mico_system_context_restore(sys_config);
appRestoreDefault_callback(user_config, sizeof(user_config_t))
require_noerr(err, exit);
}

View File

@@ -23,7 +23,7 @@
#define ZTC1_NAME "zTC1-%s"
#define USER_CONFIG_VERSION 8
#define USER_CONFIG_VERSION 9
#define SETTING_MQTT_STRING_LENGTH_MAX 32 //必须4字节对齐。
#define SOCKET_NAME_LENGTH 64
@@ -76,6 +76,5 @@ extern system_config_t* sys_config;
extern user_config_t* user_config;
extern mico_gpio_t Relay[Relay_NUM];
extern void appRestoreDefault_callback1(void *const user_config_data, uint32_t size);
#endif

View File

@@ -113,7 +113,7 @@ static void KeyLong5sPress(void)
static void KeyLong10sPress(void)
{
key_log("WARNGIN: user params restored!");
appRestoreDefault_callback1(user_config, sizeof(user_config_t));
appRestoreDefault_callback(user_config, sizeof(user_config_t));
sys_config->micoSystemConfig.ssid[0] = 0;
mico_system_context_update(mico_system_context_get());
}