-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bme280: remove header notice, replace time delay with equivalent
- Loading branch information
Showing
1 changed file
with
2 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,8 @@ | |
# | ||
# Copyright (C) 2020 Eric Callahan <[email protected]> | ||
# | ||
# BMP180 sensor support by VAXXi Popescu <[email protected]> | ||
# | ||
# This file may be distributed under the terms of the GNU GPLv3 license. | ||
import logging | ||
import time | ||
from . import bus | ||
|
||
REPORT_TIME = .8 | ||
|
@@ -390,7 +387,8 @@ def _sample_bmp180(self, eventtime): | |
self.write_register('CTRL_MEAS', meas) | ||
|
||
try: | ||
time.sleep(0.005) | ||
for i in range(94000): | ||
pass | ||
data = self.read_register('REG_MSB', 2) | ||
UT = (data[0] << 8) | data[1] | ||
except Exception: | ||
|