-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
迭代器无法遍历所有键值对 #294
Comments
没啥思路,你先单步分析一下? |
楼主解决了吗,kv_print都打印不出来键值对,size很小的都不显示,但是又能get到 |
无法使用迭代器遍历所有键值对,添加新的键值对之后,也无法通过迭代器遍历到这个键值对,但是如果直接调用get的接口,是可以读取到数据的。
这是遍历的代码:
`
void pt_check_wireless_device(uint8_t dbid, uint8_t type, uint8_t max_size)
{
struct fdb_kv_iterator iterator;
fdb_kv_t cur_kv;
struct fdb_blob blob;
size_t data_size;
uint8_t data_buf;
int32_t i = 0;
uint32_t y = 0;
uint32_t wireless_base_data = dbid1000;
uint32_t addr = 0;
}
`
这是读取和添加新键值对的代码:
`
pt_db_data_t read_data = {
.type = PT_DATA_UINT32
};
int err = pt_fdb_read(9, 1, &read_data);
PT_LOGD("err:%d addr:0x%x", err, read_data.val.val_u32);
rt_thread_mdelay(2000);
`
不管我如何添加新的键值对,迭代器都无法遍历到新的键值对,但是如果直接调用读取函数,是直接可以读取到的
The text was updated successfully, but these errors were encountered: