kopia lustrzana https://github.com/cyoung/stratux
Fix screen towers count - display only active.
rodzic
f2c6c23c8e
commit
7efcefcf3f
|
@ -43,7 +43,11 @@ class StratuxScreen():
|
|||
response = urllib2.urlopen('http://localhost/getTowers')
|
||||
getTowersHTML = response.read()
|
||||
getTowersData = json.loads(getTowersHTML)
|
||||
NumTowers = len(getTowersData)
|
||||
NumTowers = 0
|
||||
for towerLatLng in getTowersData:
|
||||
print getTowersData[towerLatLng]["Messages_last_minute"]
|
||||
if (getTowersData[towerLatLng]["Messages_last_minute"] > 0):
|
||||
NumTowers += 1
|
||||
|
||||
with canvas(oled) as draw:
|
||||
pad = 2 # Two pixels on the left and right.
|
||||
|
|
Ładowanie…
Reference in New Issue