基本完成功能,去除了独立升级功能的支持

This commit is contained in:
2025-05-24 15:32:33 +08:00
parent e4c030b0c0
commit f915eb634a
17 changed files with 2031 additions and 193 deletions

View File

@ -11,6 +11,7 @@
#ifdef HF_MCU_OTA
#include "mcu_update.h"
#endif
int g_module_id = HFM_TYPE_LPT262;
const int hf_lpt_262_gpio_fid_to_pid_map_table[HFM_MAX_FUNC_CODE]=
{
@ -197,15 +198,34 @@ int hf_atcmd_appver(pat_session_t s,int argc,char *argv[],char *rsp,int len)
}
return -3;
}
int hf_atcmd_reset(pat_session_t s,int argc,char *argv[],char *rsp,int len)
{
extern int HILINK_RestoreFactorySettings(void);
HILINK_RestoreFactorySettings();
return 0;
}
#ifdef CONFIG_SPOTLIGHT_UT
extern int hf_atcmd_pwm(pat_session_t s, int argc, char *argv[], char *rsp, int len);
extern int hf_atcmd_pwm_query(pat_session_t s, int argc, char *argv[], char *rsp, int len);
extern int hf_atcmd_light(pat_session_t s, int argc, char *argv[], char *rsp, int len);
extern int hf_atcmd_light_query(pat_session_t s, int argc, char *argv[], char *rsp, int len);
#endif
const hfat_cmd_t user_define_at_cmds_table[]=
{
{"APPVER", hf_atcmd_appver, "AT+APPVER: get version. \r\n",NULL},
{"RESET", hf_atcmd_reset, "AT+RESET: reset. \r\n",NULL},
#ifdef HF_MCU_OTA
{"MCUOTA", hf_atcmd_mcu, "AT+MCUOTA: start mcu ota. \r\n",NULL},
{"MCUVER", hf_atcmd_mcuver, "AT+MCUVER: get mcu version. \r\n",NULL},
{"OTAWAITTIME", hf_atcmd_ota_wait_time, "AT+OTAWAITTIME: set/get uart send mcu ota time\r\n", NULL},
#endif
{NULL, NULL, NULL, NULL} //the last item must be null
#ifdef CONFIG_SPOTLIGHT_UT
{"UTPWM", hf_atcmd_pwm, "AT+PWM=<channel>,<duty>: Set PWM duty cycle (0-1000)\r\n", NULL},
{"UTLIGHT", hf_atcmd_light, "AT+LIGHT=<brightness>,<cct>: Set brightness(0-1000) and CCT(2700-6000)\r\n", NULL},
{"UTPWMQ", NULL, "AT+PWMQ=<channel>,<duty>: Set PWM duty cycle (0-1000)\r\n", hf_atcmd_pwm_query},
{"UTLIGHTQ", NULL, "AT+LIGHTQ=<brightness>,<cct>: Set brightness(0-1000) and CCT(2700-6000)\r\n", hf_atcmd_light_query},
#endif
{NULL, NULL, NULL, NULL} //the last item must be null
};
int USER_FUNC user_app_main(void)
@ -220,7 +240,7 @@ int USER_FUNC user_app_main(void)
HF_Debug(DEBUG_WARN,"init mcu ota fail!\r\n");
#endif
//See Wi-Fi Config tools APP for detailed usage of this thread, only debug mode open
if(hfdbg_get_level())
if(0 && hfdbg_get_level())
{
while(!hfnet_wifi_is_active())
{
@ -233,7 +253,6 @@ int USER_FUNC user_app_main(void)
}
e_printf("start assis success!\r\n");
// hfgpio_pwm_enable(HFGPIO_F_SPI_CLK, 1000, 50);
spotlight_main();
return 1;
}