加了非报警不消音

This commit is contained in:
小马_666 2025-01-15 10:32:56 +08:00
parent dd12865fcb
commit f112683ebf
6 changed files with 20 additions and 4 deletions

View File

@ -888,6 +888,10 @@ static void nt26k_init_thread_entry (void *parameter)
rt_memcpy (nt26k.imei, imei, NT26K_IMEI_LEN);
Flash_Sys_Cfg (kIotImeiId, nt26k.imei, NT26K_IMEI_LEN);
}
else
{
Get_IotImei((char *)nt26k.imei, NT26K_IMEI_LEN);
}
rt_thread_mdelay (1);
/* set network interface device hardware iccid */
if ((*(rt_uint16_t *)FLASH_IOT_ICCID_ADDR == 0xE339) || (*(rt_uint16_t *)FLASH_IOT_ICCID_ADDR == 0x39E3)) // 未写入
@ -915,6 +919,9 @@ static void nt26k_init_thread_entry (void *parameter)
rt_memcpy (nt26k.iccid, iccid, NT26K_ICCID_LEN);
Flash_Sys_Cfg (kIotIccidId, nt26k.iccid, NT26K_ICCID_LEN);
}
else {
Get_IotIccid((char *)nt26k.iccid, NT26K_ICCID_LEN);
}
rt_thread_mdelay (1);
/* set network interface device hardware imsi */
if ((*(rt_uint16_t *)FLASH_IOT_IMSI_ADDR == 0xE339) || (*(rt_uint16_t *)FLASH_IOT_IMSI_ADDR == 0x39E3)) // 未写入
@ -942,6 +949,10 @@ static void nt26k_init_thread_entry (void *parameter)
rt_memcpy (nt26k.imsi, imsi, NT26K_IMSI_LEN);
Flash_Sys_Cfg (kIotImsiId, nt26k.imsi, NT26K_IMSI_LEN);
}
else {
//已经写入了,将其赋值给结构体
Get_IotImei((char *)nt26k.imsi, FLASH_IOT_IMEI_LEN);
}
rt_thread_mdelay (1);
/*网络注册 */
for (i = 0; i < CSQ_RETRY; i++)

View File

@ -58,9 +58,12 @@ static uint8_t relay_cnt = 1;
static void _CommonBtnEvtCb(void *arg)
{
if (flex_button_event_read(&user_button[USER_BUTTON_0]) == FLEX_BTN_PRESS_CLICK)
{
if (SysControl.status == kAlarmEvent)
{
Send_Laser_Alarm_Event(KMuteEvent);
}
}
else if (flex_button_event_read(&user_button[USER_BUTTON_0]) == FLEX_BTN_PRESS_LONG_HOLD)
{
Send_Laser_Alarm_Event(kSelfCheckEvent);

View File

@ -815,7 +815,7 @@ INIT_PREV_EXPORT (BSP_Flash_Init);
#endif
#ifdef TEST_ENABLE
static void TEST_Flash_GetMaxIndex_Records (int argc, char **argv)
void TEST_Flash_GetMaxIndex_Records (int argc, char **argv)
{
if (argc == 2)
{

View File

@ -2,7 +2,7 @@
* @Author: mbw
* @Date: 2024-11-14 10:21:04
* @LastEditors: mbw && 1600520629@qq.com
* @LastEditTime: 2025-01-09 15:25:27
* @LastEditTime: 2025-01-15 10:15:25
* @FilePath: \JT-DT-YD4N02A_RTT_MRS-NT26K\bsp\src\bsp_h308.c
* @Description:
*

View File

@ -787,7 +787,9 @@ int Nt26k_Process_Events (Nt26kEvent nt26k_recv_event, struct at_device *device,
{
if (event->send_func)
{
#ifdef TEST_ENABLE
RTC_ShowTime(); // 每次发送打印下时间,容易定位问题
#endif
// 如果事件有关联的发送函数,则调用该发送函数
rt_thread_mdelay (IMEI_Delay());
int result = event->send_func (device, nt26k_ops);

View File

@ -17,7 +17,7 @@
#define ULOG_USING_FILTER //开启动态修改日志等级 默认修改在ulog.c 1522行
#define ENABLE_LOG_ALL
#define TEST_ENABLE //打开所有的终端测试程序
// #define TEST_ENABLE //打开所有的终端测试程序
#define ULOG_OUTPUT_LVL 7 // 生产时将其设为0
#define IOT_MODULE_SWITCH 1 //开启物联网功能