Skip to content

Commit

Permalink
skin.conf gauge settings fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
brewster76 committed Feb 13, 2014
1 parent b2332e7 commit df814f8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
13 changes: 9 additions & 4 deletions bin/user/gaugeengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,16 @@ def histogram(self, gaugeName, fieldName, unitType, numBins):
"histogram: %s = %f is lower than minvalue (%f)" % (fieldName, histValue, minVal))
else:
bucketNum = int((histValue - minVal) / bucketSpan)
buckets[bucketNum] += 1.0
numPoints += 1

if buckets[bucketNum] > roof:
roof = buckets[bucketNum]
if bucketNum >= numBins:
syslog.syslog(syslog.LOG_INFO, "histogram: value %f gives bucket higher than numBins (%d)"
% (histValue, numBins))
else:
buckets[bucketNum] += 1.0
numPoints += 1

if buckets[bucketNum] > roof:
roof = buckets[bucketNum]

buckets = [i / roof for i in buckets]

Expand Down
12 changes: 6 additions & 6 deletions skins/Bootstrap/skin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@
needle_color = 0xb48242
text_color = 0xb48242

[[Temperature]]
[[outTemp]]
minvalue = -20
maxvalue = 40
majorstep = 10
Expand All @@ -354,35 +354,35 @@
history = 24
bins = 120

[[Pressure]]
[[barometer]]
minvalue = 970
maxvalue = 1050
majorstep = 20
minorstep = 10
labelfontsize = 12

[[Humidity]]
[[outHumidity]]
minvalue = 0
maxvalue = 100
majorstep = 20
minorstep = 10
labelfontsize = 13

[[WindSpeed]]
[[windSpeed]]
minvalue = 0
maxvalue = 40
majorstep = 10
minorstep = 2
labelfontsize = 15

[[WindGust]]
[[windGust]]
minvalue = 0
maxvalue = 40
majorstep = 10
minorstep = 2
labelfontsize = 15

[[WindDirection]]
[[windDir]]
labelfontsize = 12

# By default, needle points towards direction of wind source. Use invert to
Expand Down

0 comments on commit df814f8

Please sign in to comment.