SFH-code / VigiSense

3 stars 0 forks source link

Restructure code #38

Closed YznH1 closed 7 months ago

YznH1 commented 8 months ago

Incorporate better organised class structure for modularity.

yukitfoo commented 7 months ago

Done by seperation of concern and encapsulation from:

  1. MAX30102 library extracting red and infrared intensity values from the sensor and dealing with registers on the sensor
  2. sensor library extracting SPO2 and HR from the red and infrared values mentioned in [1]
  3. diagnosisInterface abstract class that requires a start, stop, alert, getVal and diagnosis function for each functionality of sensor.

To further implement other sensors:

  1. Add a low-level library interfacing raw data from sensor and obtain data using interrupts
  2. Add a library doing filtering and calculations from that data
  3. Add a child class from the diagnosisInterface abstract class

Commits:

  1. https://github.com/2468513H/VigiSense/commit/76617ed275bd813afc839047ad725cb0fdc43eae
  2. https://github.com/2468513H/VigiSense/commit/032dbceaba4a8ee9333ccfd4f9b30f4f17cd5ce1