请教各位,刚接触LSM6DSO的FSM,本来想识别shake手势,结果在 lsm6dso_fsm.c里找不到shake手势的数组,并且是这种形式: /* Program: glance */
const uint8_t lsm6so_prg_glance[] = {
0xb2, 0x10, 0x24, 0x20, 0x17, 0x17, 0x66, 0x32,
0x66, 0x3c, 0x20, 0x20, 0x02, 0x02, 0x08, 0x08,
0x00, 0x04, 0x0c, 0x00, 0xc7, 0x66, 0x33, 0x73,
0x77, 0x64, 0x88, 0x75, 0x99, 0x66, 0x33, 0x53,
0x44, 0xf5, 0x22, 0x00,
}; /* Program: motion */
const uint8_t lsm6so_prg_motion[] = {
0x51, 0x10, 0x16, 0x00, 0x00, 0x00, 0x66, 0x3c,
0x02, 0x00, 0x00, 0x7d, 0x00, 0xc7, 0x05, 0x99,
0x33, 0x53, 0x44, 0xf5, 0x22, 0x00,
}; 而在另外一个代码里,找到一个这样的shake手势数组(unico转换出来的): const ucf_line_t shake[] = {
{.address = 0x10, .data = 0x00,},
{.address = 0x11, .data = 0x00,},
{.address = 0x01, .data = 0x80,},
{.address = 0x04, .data = 0x00,},
{.address = 0x05, .data = 0x00,},
{.address = 0x5F, .data = 0x43,},
{.address = 0x46, .data = 0x01,},
{.address = 0x47, .data = 0x00,},
{.address = 0x0A, .data = 0x00,}, 。。。。。 {.address = 0x09, .data = 0x00,},
{.address = 0x09, .data = 0x00,},
{.address = 0x09, .data = 0x01,},
{.address = 0x09, .data = 0x01,},
{.address = 0x09, .data = 0x00,},
{.address = 0x09, .data = 0x00,},
{.address = 0x09, .data = 0xE2,},
{.address = 0x09, .data = 0x00,},
{.address = 0x09, .data = 0x1E,},
{.address = 0x09, .data = 0x00,},
{.address = 0x09, .data = 0x13,}, 。。。。 } 这两种数组格式都不一样,没法将这个 shake数组导入到上面那个工程里。 并且很奇怪,第二种数组连续多个address是一样的,是什么意义呢?这种方式能不能同时支持多个手势呢?找不到工程代码使用这种数组的例子。 谢谢大佬帮忙解答!
|