Merge from Quokka sct_protek_common.tcl
This commit is contained in:
@ -79,6 +79,7 @@ proc ProtekMainDisplay {protek nextState} {
|
|||||||
if [catch {
|
if [catch {
|
||||||
set stateRep [hval $protek/state]
|
set stateRep [hval $protek/state]
|
||||||
set MDpath [sct]
|
set MDpath [sct]
|
||||||
|
set parname [file tail $MDpath]
|
||||||
set scale [hval $MDpath/scale]
|
set scale [hval $MDpath/scale]
|
||||||
set offset [hval $MDpath/offset]
|
set offset [hval $MDpath/offset]
|
||||||
array set SA [split $stateRep "|:"]
|
array set SA [split $stateRep "|:"]
|
||||||
@ -96,6 +97,7 @@ proc ProtekMainDisplay {protek nextState} {
|
|||||||
if {$MDISP != $oldval} {
|
if {$MDISP != $oldval} {
|
||||||
sct update $MDISP
|
sct update $MDISP
|
||||||
sct oldval $MDISP
|
sct oldval $MDISP
|
||||||
|
protek_debug_log $parname $MDISP
|
||||||
}
|
}
|
||||||
} msg ] {
|
} msg ] {
|
||||||
return -code error "[info level 0]: $msg"
|
return -code error "[info level 0]: $msg"
|
||||||
@ -103,6 +105,11 @@ proc ProtekMainDisplay {protek nextState} {
|
|||||||
return $nextState
|
return $nextState
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc protek_debug_log {name args} {
|
||||||
|
set fd [open "/usr/local/sics/data/protek_$name.csv" a]
|
||||||
|
puts $fd "[clock format [clock seconds] -format "%d/%m/%Y, %T"], $args"
|
||||||
|
close $fd
|
||||||
|
}
|
||||||
##
|
##
|
||||||
# @brief Makes a state monitor object for the protek multimeter
|
# @brief Makes a state monitor object for the protek multimeter
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user