pez-globo / pufferfish-software

All software for the Pufferfish ventilator.
Apache License 2.0
0 stars 1 forks source link

Restructure Honeywell ABP sensor driver #333

Closed rohanpurohit closed 3 years ago

rohanpurohit commented 3 years ago

This PR:

rohanpurohit commented 3 years ago

@ethanjli we tested this PR on the sensor and found these outputs: measurements:

  1. idle (without any external pressure) - 0
  2. when applying pressure on the inlet of the sensor with my finger - 0.157613
  3. when blowing air into the sensor - 0.00740, 0.02,0.00167836

also regarding stale_data there is nothing more we need to do. according to the datasheet When the status bits read “1 0”, “stale” data is indicated, if you see Device.cpp L31 we need to check the 2 bits S0 and S1 and if we get 1 & 0 (000010 = 2 ,enum value of ABPStatus) we store the status as stale_data.

In the datasheet, we are advised to ignore command_mode and diagnostic status, which we are doing here Sensor.cpp L65

rohanpurohit commented 3 years ago
  1. This project is licensed under Apache License v2.0 for any software, and Solderpad Hardware License v2.1 for any hardware - do you agree that your contributions to this project will be under these licenses, too? Yes.
  2. Were any of these contributions also part of work you did for an employer or a client? No.
  3. Does this work include, or is it based on, any third-party work which you did not create? No.
rohanpurohit commented 3 years ago

working fine in testing with the sensor.