Skip to content

Commit

Permalink
Refactor functions to use const pointers
Browse files Browse the repository at this point in the history
Refactored multiple functions across various files
to use `const` pointers for parameters, enhancing
code safety and readability. Made minor formatting
changes for consistency and improved readability,
particularly in `sha204_library.cpp`.
  • Loading branch information
virtual-maker committed Dec 31, 2024
1 parent 65f62da commit c3ed7c7
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 175 deletions.
2 changes: 1 addition & 1 deletion examples/AirQualitySensor/AirQualitySensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Remarks: By using the slope and a point of the line. The x(logarithmic value of
logarithmic coordinate, power of 10 is used to convert the result to non-logarithmic
value.
************************************************************************************/
int MQGetPercentage(float rs_ro_ratio, float *pcurve)
int MQGetPercentage(float rs_ro_ratio, const float *pcurve)
{
return (pow(10,( ((log(rs_ro_ratio)-pcurve[1])/pcurve[2]) + pcurve[0])));
}
Loading

0 comments on commit c3ed7c7

Please sign in to comment.