我在程序里加了MESH_CONFIG_ENTRY后编译没问题,但是程序会卡住,是不是还有什么地方没设置呢?
MESH_CONFIG_ENTRY错误
autodisp 具体卡在哪里?你截图出来才知道呀
debug发现在这个环节出错
autodisp
那你就要判断是触发了哪个断言,然后再看是哪个变量出问题了。
addr2line 这个软件,我装上就闪退了,没任何反应啊。
还有就是,我这么直接用,是不是还需要初始化什么的?
或者麻烦哥,你能不能抽空帮我试一下,就是在light_switch server 程序里面加上#define APP_ENTRY_ID MESH_CONFIG_ENTRY_ID(0x0010, 0x0001)
/* Live RAM representation of the value */
static uint32_t m_live_value = 5000;
static uint32_t app_entry_setter(mesh_config_entry_id_t id, const void * p_entry)
{
const uint32_t * p_value = (const uint32_t ) p_entry;
if (p_value >= 10000)
{
/* Rejecting an invalid value. The value will not be stored to persistent storage. */
return NRF_ERROR_INVALID_DATA;
}
m_live_value = *p_value;
return NRF_SUCCESS;
}
static void app_entry_getter(mesh_config_entry_id_t id, void * p_entry)
{
uint32_t * p_value = (uint32_t *) p_entry;
*p_value = m_live_value;
}
MESH_CONFIG_ENTRY(m_app_entry,
APP_ENTRY_ID,
1, // The entry is singular
sizeof(uint32_t),
app_entry_setter,
app_entry_getter,
NULL, // No need for a delete callback
true); // There is a default value
就会出错
现在好了,哥,我没有加MESH_CONFIG_FILE(m_app_file, 0x0010, MESH_CONFIG_STRATEGY_CONTINUOUS);
加上就好了。
autodisp
这个不用安装,是直接用的。用来查是哪个函数报错。
牛逼了,WORD哥。