Skip to content

Commit

Permalink
send the result of baseline just like we do for pressure
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Jul 11, 2024
1 parent 89e20a8 commit cd8ae89
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/sensors/core/tasks/capacitive_driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,12 @@ class FDC1004 {
measurement, number_of_reads, current_offset_pf);
if (utils::tag_in_token(m.id.token,
utils::ResponseTag::IS_THRESHOLD_SENSE)) {
can_client.send_can_message(
can::ids::NodeId::host,
can::messages::BaselineSensorResponse{
.message_index = m.message_index,
.sensor = can::ids::SensorType::capacitive,
.offset_average = capacitance});
set_threshold(capacitance + next_autothreshold_pf,
can::ids::SensorThresholdMode::auto_baseline,
m.message_index);
Expand Down

0 comments on commit cd8ae89

Please sign in to comment.