Allow set_warmth to accept minutes, making for a more gradual change in temperature.
This commit is contained in:
parent
9b3d85b3ba
commit
52a92af54e
15
set_warmth
15
set_warmth
@ -1,11 +1,14 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# Get current hour.
|
||||
x=$(date|cut -f5 -d' '|cut -f1 -d:)
|
||||
|
||||
brownout $(bc -e "define redlevel(x) {
|
||||
if((x-12) <= 0)
|
||||
return((83*(12-x)))
|
||||
else
|
||||
return((83*(x-12)))
|
||||
} redlevel($x)")
|
||||
# Get current minute.
|
||||
y=$(date|cut -f5 -d' '|cut -f2 -d:)
|
||||
|
||||
brownout $(bc -e "define redlevel(x,y) {
|
||||
if((x-12) <= 0)
|
||||
return((83*(12-x)+(y*(83/60))))
|
||||
else
|
||||
return((83*(x-12)+(y*(83/60))))
|
||||
} redlevel($x, $y)")
|
||||
|
Loading…
Reference in New Issue
Block a user