diff options
Diffstat (limited to 'common/body_detection.c')
-rw-r--r-- | common/body_detection.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/body_detection.c b/common/body_detection.c index d16e83df00..646bc6d740 100644 --- a/common/body_detection.c +++ b/common/body_detection.c @@ -102,6 +102,19 @@ void body_detect_change_state(enum body_detect_states state, bool spoof) { if (IS_ENABLED(CONFIG_ACCEL_SPOOF_MODE) && spoof_enable && !spoof) return; + if (IS_ENABLED(CONFIG_GESTURE_HOST_DETECTION)) { + struct ec_response_motion_sensor_data vector = { + .flags = MOTIONSENSE_SENSOR_FLAG_BYPASS_FIFO, + .activity_data = { + .activity = MOTIONSENSE_ACTIVITY_BODY_DETECTION, + .state = state, + }, + .sensor_num = MOTION_SENSE_ACTIVITY_SENSOR_ID, + }; + motion_sense_fifo_stage_data(&vector, NULL, 0, + __hw_clock_source_read()); + motion_sense_fifo_commit_data(); + } /* change the motion state */ motion_state = state; if (state == BODY_DETECTION_ON_BODY) { |