@@ -159,18 +159,21 @@ void CoreIMU::registerOnWakeUpCallback(std::function<void()> const &callback)
159
159
160
160
void CoreIMU::enableOnWakeUpInterrupt ()
161
161
{
162
+ // ODR = 52Hz for reference
163
+
162
164
// ? Set filter and disable user offset
163
165
lsm6dsox_xl_hp_path_internal_set (&_register_io_function, LSM6DSOX_USE_SLOPE);
164
166
lsm6dsox_xl_usr_offset_on_wkup_set (&_register_io_function, 0 );
165
167
166
168
// ? Set Wakeup config
167
- lsm6dsox_wkup_threshold_set (&_register_io_function, 2 );
168
- lsm6dsox_wkup_ths_weight_set (&_register_io_function, LSM6DSOX_LSb_FS_DIV_64);
169
- lsm6dsox_wkup_dur_set (&_register_io_function, 0x02 );
169
+ lsm6dsox_wkup_threshold_set (&_register_io_function, 3 ); // LSB multiplier / Max: 31
170
+ lsm6dsox_wkup_ths_weight_set (&_register_io_function,
171
+ LSM6DSOX_LSb_FS_DIV_64); // 2 Weights, 1 LSB = FS_XL/2^x x:{6,8}
172
+ lsm6dsox_wkup_dur_set (&_register_io_function, 1 ); // 1 LSB = 1*ODR_time / Max: 3
170
173
171
174
// ? Set Activity config
172
- lsm6dsox_act_sleep_dur_set (&_register_io_function, 0x02 );
173
- lsm6dsox_act_mode_set (&_register_io_function, LSM6DSOX_XL_AND_GY_NOT_AFFECTED);
175
+ lsm6dsox_act_sleep_dur_set (&_register_io_function, 0 ); // 1 LSB = 512*ODR / Max: 15
176
+ lsm6dsox_act_mode_set (&_register_io_function, LSM6DSOX_XL_12Hz5_GY_PD); // 4 Modes
174
177
175
178
lsm6dsox_pin_int1_route_t lsm6dsox_int1 {
176
179
.sleep_change = PROPERTY_ENABLE,
0 commit comments