Skip to content

Commit

Permalink
Another fix for PH devices #108
Browse files Browse the repository at this point in the history
  • Loading branch information
theyosh committed Feb 25, 2018
1 parent e893dcb commit a9dadd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion terrariumSensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def update(self, force = False):
# Do multiple measurements...
values = []
for counter in range(5):
analog_port = MCP3008(channel=terrariumUtils.to_BCM_port_number(self.get_address()))
analog_port = MCP3008(channel=int(self.get_address()))
values.append(((analog_port.value * ( 5000.0 / 1024.0)) / 1000.0) * 3.3 + 0.1614)
time.sleep(0.2)

Expand Down
2 changes: 1 addition & 1 deletion views/sensor_settings.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<h2 class="temperature"><span aria-hidden="true" class="glyphicon glyphicon-fire"></span> {{_('Temperature sensor')}} <span class="title">{{_('new')}}</span></h2>
<h2 class="humidity" style="display:none"><span aria-hidden="true" class="glyphicon glyphicon-tint"></span> {{_('Humidity sensor')}} <span class="title">{{_('new')}}</span></h2>
<h2 class="distance" style="display:none"><span aria-hidden="true" class="glyphicon glyphicon-signal"></span> {{_('Distance sensor')}} <span class="title">{{_('new')}}</span></h2>
<h2 class="ph" style="display:none"><span aria-hidden="true" class="glyphicon glyphicon-signal"></span> {{_('PH sensor')}} <span class="title">{{_('new')}}</span></h2>
<h2 class="ph" style="display:none"><span aria-hidden="true" class="glyphicon glyphicon-scale"></span> {{_('PH sensor')}} <span class="title">{{_('new')}}</span></h2>
<ul class="nav navbar-right panel_toolbox">
<li>
<a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
Expand Down

0 comments on commit a9dadd5

Please sign in to comment.