Fixed parsing of intlck_status. It's 16 bits not 8 bits!

This commit is contained in:
Ferdi Franceschini
2013-04-29 20:41:06 +10:00
parent b3a2c5c976
commit 961f581bf2

View File

@@ -31,7 +31,11 @@ namespace eval ::scobj::chopper {
if {$val != $oldval} { if {$val != $oldval} {
sct update 1 sct update 1
hsetprop $chPath P_oldval $val hsetprop $chPath P_oldval $val
binary scan [binary format c $val] B* binNum if {$statnode == "intlck_status" } {
binary scan [binary format S $val] B16 binNum
} else {
binary scan [binary format c $val] B8 binNum
}
set bitfield [split $binNum ""] set bitfield [split $binNum ""]
foreach n $fields b $bitfield { foreach n $fields b $bitfield {
hset $chPath/$n $b hset $chPath/$n $b