Add huber asyncprotocol and make huber_ap and omron_ap to remove name conflicts
This commit is contained in:
@@ -126,7 +126,7 @@ proc ::scobj::huber_pilot::getValue {tc_root nextState cmd_str} {
|
||||
}
|
||||
set cmd "${cmd_str}"
|
||||
# getValue hook code starts
|
||||
set cmd "\{M${cmd_str}****"
|
||||
set cmd "M${cmd_str}****"
|
||||
# getValue hook code ends
|
||||
if { [hpropexists [sct] geterror] } {
|
||||
debug_log ${tc_root} 9 "[sct] error: [sct geterror]"
|
||||
@@ -178,12 +178,12 @@ proc ::scobj::huber_pilot::rdStatus {tc_root} {
|
||||
error "[sct geterror]"
|
||||
}
|
||||
# rdStatus hook code starts
|
||||
if {[string length ${data}] < 8} {
|
||||
if {[string length ${data}] < 7} {
|
||||
sct geterror "rdValue short response ${data}"
|
||||
} elseif { ![string equal -nocase [string range ${data} 1 1] "S"] } {
|
||||
} elseif { ![string equal -nocase [string range ${data} 0 0] "S"] } {
|
||||
sct geterror "rdValue syntax error ${data}"
|
||||
} else {
|
||||
set resp [scan [string range ${data} 4 end] "%x" val]
|
||||
set resp [scan [string range ${data} 3 end] "%x" val]
|
||||
if { ${resp} < 1 } {
|
||||
sct geterror "rdValue scan error ${data}"
|
||||
} else {
|
||||
@@ -221,12 +221,12 @@ proc ::scobj::huber_pilot::rdTemp {tc_root} {
|
||||
error "[sct geterror]"
|
||||
}
|
||||
# rdTemp hook code starts
|
||||
if {[string length ${data}] < 8} {
|
||||
if {[string length ${data}] < 7} {
|
||||
sct geterror "rdValue short response ${data}"
|
||||
} elseif { ![string equal -nocase [string range ${data} 1 1] "S"] } {
|
||||
} elseif { ![string equal -nocase [string range ${data} 0 0] "S"] } {
|
||||
sct geterror "rdValue syntax error ${data}"
|
||||
} else {
|
||||
set resp [scan [string range ${data} 4 end] "%x" val]
|
||||
set resp [scan [string range ${data} 3 end] "%x" val]
|
||||
if { ${resp} < 1 } {
|
||||
sct geterror "rdValue scan error ${data}"
|
||||
} else {
|
||||
@@ -267,7 +267,7 @@ proc ::scobj::huber_pilot::setValue {tc_root nextState cmd_str} {
|
||||
# setValue hook code starts
|
||||
set param [expr { round(100.0 * [sct target]) }]
|
||||
set param [string range [format "%04X" ${param}] end-3 end]
|
||||
set cmd "\{M${cmd_str}${param}"
|
||||
set cmd "M${cmd_str}${param}"
|
||||
# setValue hook code ends
|
||||
if { [hpropexists [sct] geterror] } {
|
||||
debug_log ${tc_root} 9 "[sct] error: [sct geterror]"
|
||||
|
||||
Reference in New Issue
Block a user