Skip to content

Commit

Permalink
Better debug for temperature of Si7021
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurrayufo committed Dec 13, 2017
1 parent 282565e commit dde4deb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion InGenStation/ZooBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

parser.add_argument('--update-freq', type=float,
default=60.0,
help='What type of instance are we running')
help='Minumum time between sensor updates')

args = parser.parse_args()

Expand Down
2 changes: 1 addition & 1 deletion InGenStation/code/Sensors/Si7021.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async def update(self):
self._temperature = await self._measure_temperature(bus, 50)
self.last_update = datetime.datetime.now()
self.log.debug(f"Updated Si7021 sensor 0x{self.address:02x}, took {(time.time()-t_start)*1e3:.3f} ms")
self.log.debug(f"Temperature was {self.temperature:.1f} C and humidity was {self.humidity:.1f}%")
self.log.debug(f"Temperature was {self.temperature:.1f} C (0x{self._temperature:04X}) and humidity was {self.humidity:.1f}% (0x{self._humidity:04X})")


async def _measure_humidity(self, bus, max_loops):
Expand Down

0 comments on commit dde4deb

Please sign in to comment.