oss-slu / Pi4Micronaut

A java library combining Micronaut and Pi4j to streamline hardware connectivity to Raspberry Pi's
https://oss-slu.github.io/Pi4Micronaut/
Apache License 2.0
8 stars 7 forks source link

Speed Sensor Support. #258

Closed ThomasMacas closed 1 month ago

ThomasMacas commented 2 months ago

Fixes #244

Created Functionality through Helper, Controller files. As well as created documentation for speed sensor by creating an adoc file and a html file. In order to create functionality for a speed sensor, these changed must be made.

SpeedSensorHelper.java, SpeedSensorController.java, speedSensor.adoc, SpeedSensorHelper.html were created to control the functionality and documentation of a speed sensor.

Within SpeedSensorHelper.java functions are created in order to handle the requested functionality. to read speed data and convert it to Rotations/Minute(RPMs) the function private void calculateSpeed() is used to convert speed data into RPM. The function public double getRPM() is used to return the RPM calculations. The functions: public void initialize(), public void startMeasuring(), public void stopMeasuring() are implemented to handle the operations of the speed sensor.

Within SpeedSensorController.java functions are created in order to interface with SpeedSensorHelper.java in order to control what the speed sensor does and reports functionality, by return the current operation, and then information error messages if one occurs.

Within the files speedSensor.adoc, SpeedSensorHelper.html, documentation is created to showcase functionality and specifications in order for a person to implement their Raspberry Pi with a speed sensor using Java

ThomasMacas commented 1 month ago

The functionality you've implemented for the speed sensor works well and meets the project requirements. However, from a product and code quality perspective, please remove the documentation files since they will be generated automatically. This will help keep the codebase clean and reduce unnecessary clutter. The rest of the implementation, including the YAML configuration and circuit diagrams, looks great—just ensure the auto-generated documentation is handled correctly

fixed