Conversation
plasticchris
left a comment
There was a problem hiding this comment.
What impact is there on pill?
| imu_clear_tap_interrupt(); | ||
| PRINTS("Tap\r\n"); | ||
| MSG_Data_t * data = MSG_Base_AllocateStringAtomic("tap"); | ||
| if(data){ |
There was a problem hiding this comment.
Why not reference a const string?
There was a problem hiding this comment.
need to convert the string to MSG_Data_t * which is consumed by the sspi module
| /* | ||
| *PRINTF("<imu>x:%d y:%d z:%d</imu>\r\n", xyz[0], xyz[1], xyz[2]); | ||
| */ | ||
| if(xyz[2] > 1000 && !flipped){ |
There was a problem hiding this comment.
This is dependent on the selected scale
There was a problem hiding this comment.
actually, i don't think the scale matters in this, because this is a simple hysteresis on the Z value. Due to the orientation of the imu chip, any positive Z value means Sense has flipped or rolled.
|
this change is morpheus only |
| _register_write(REG_CTRL_6, INT_ACTIVE_LOW ); | ||
|
|
||
| _register_write(REG_CLICK_CFG, 0x3F);//all directions clickable | ||
| _register_write(REG_CLICK_SRC, CLICK_SRC_DCLICK | CLICK_SRC_STAP); |
There was a problem hiding this comment.
is this register meant to be written to?
There was a problem hiding this comment.
looks like its read only, will remove
| _register_write(REG_CLICK_THR, 0x06); | ||
| _register_write(REG_TIME_LIMIT, 0x04); | ||
| _register_write(REG_TIME_LATENCY, 0x24); | ||
| _register_write(REG_TIME_WINDOW, 0x7F); |
There was a problem hiding this comment.
are the units for these documented anywhere?
There was a problem hiding this comment.
nope, i just saw a youtube video of a demo and copied the numbers.
documentation also does not show what the units are
drivers/imu.c
Outdated
| // clear the interrupt by reading INT_SRC register | ||
| uint8_t int_source; | ||
| _register_read(REG_INT1_SRC, &int_source); | ||
| PRINTF("INT CLR %x\r\n", int_source); |
There was a problem hiding this comment.
artifact from testing, will revert
| IMU_HZ_1 = 1, | ||
| IMU_HZ_10 = 2, | ||
| IMU_HZ_25 = 3, | ||
| IMU_HZ_400 = 7, |
There was a problem hiding this comment.
undocumented rates go all the way up to 1.6 kHz (the resonant freq of the sensing element) but you get reduced resolution...
|
causes instability to the middle board, do not merge |
DO NOT MERGE
emits commands via SPI uart code
"tap"
and
"flipped [1|0]"