fix issues on heliox
This commit is contained in:
@ -31,12 +31,14 @@ proc stdConfig::heliox {} {
|
|||||||
prop help "how many hours the pot should last (< 75)"
|
prop help "how many hours the pot should last (< 75)"
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
hsetprop /tt getsample hvali /ts/pot
|
hsetprop /tt getsample hvali /th/pot
|
||||||
} msg
|
} msg
|
||||||
clientput $msg
|
clientput $msg
|
||||||
}
|
}
|
||||||
|
|
||||||
proc heliox::check_set {} {
|
proc heliox::check_set {} {
|
||||||
|
# save for later
|
||||||
|
sct goto [sct target]
|
||||||
if {[sct target] < 1.6} {
|
if {[sct target] < 1.6} {
|
||||||
set condense_text ""
|
set condense_text ""
|
||||||
if {[hvali [sct]/lasts_until] > [DoubleTime]} {
|
if {[hvali [sct]/lasts_until] > [DoubleTime]} {
|
||||||
@ -49,7 +51,7 @@ proc heliox::check_set {} {
|
|||||||
hupdate [sct]/mode 4
|
hupdate [sct]/mode 4
|
||||||
set condense_text "started"
|
set condense_text "started"
|
||||||
}
|
}
|
||||||
sct goto [sct target]
|
# sct goto [sct target]
|
||||||
if {$condense_text ne ""} {
|
if {$condense_text ne ""} {
|
||||||
sct print "going to [sct target] K might take a while - condense process is $condense_text"
|
sct print "going to [sct target] K might take a while - condense process is $condense_text"
|
||||||
}
|
}
|
||||||
@ -111,13 +113,14 @@ proc heliox::check_set {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc heliox::setmainsensor {mainsensor} {
|
proc heliox::setmainsensor {mainsensor} {
|
||||||
set old [silent "" hgetpropval [sct objectPath] mainsensor]
|
if {$mainsensor eq "/th/low"} {
|
||||||
if {$mainsensor ne $old} {
|
set old /th/pot
|
||||||
if {$old ne ""} {
|
} else {
|
||||||
catch {[sct controller] killupdatescript $old "updateval [sct objectPath]"}
|
set old /th/low
|
||||||
}
|
|
||||||
[sct controller] updatescript $mainsensor "updateval [sct objectPath]"
|
|
||||||
}
|
}
|
||||||
|
catch {[sct controller] killupdatescript $old "updateval [sct objectPath]"}
|
||||||
|
[sct controller] updatescript $mainsensor "updateval [sct objectPath]"
|
||||||
|
hsetprop [sct objectPath] mainsensor $mainsensor
|
||||||
}
|
}
|
||||||
|
|
||||||
proc heliox::check_mode {} {
|
proc heliox::check_mode {} {
|
||||||
|
Reference in New Issue
Block a user