jfosnight / jonahsystems

JonahSystems (Jonny's Online Networked Automated Home Systems) is the basis of my home automation project that I have worked on for the last couple years as a school project.
1 stars 3 forks source link

Calculate an offset for the pressure. #2

Open Xuphas opened 6 years ago

Xuphas commented 6 years ago

Should i change the Line 151 in MS5611.py self.pressureAdj = ( P/altOffset ) / 100.0 into self.pressureAdj = ( P*altOffset ) / 100.0 to get the right value ?

jfosnight commented 6 years ago

You shouldn't need to edit any of the library code to adjust the pressure to your elevation.

There are two helper methods for setting your elevation, they are setElevation(value) (this is in meters) and setElevationFt(value) (this is in feet).

Refer to the usage example here: https://github.com/jfosnight/jonahsystems/blob/ea7ff8e94f934c1e60f5aeec5a5954bb54c8ed74/python/MS5611_example_usage.py#L6