Update
This commit is contained in:
@@ -14,14 +14,14 @@ func parseData(weightBytes []byte) *Weight {
|
|||||||
isLBSUnit := isBitSet(ctrlByte, 0)
|
isLBSUnit := isBitSet(ctrlByte, 0)
|
||||||
isCattyUnit := isBitSet(ctrlByte, 4)
|
isCattyUnit := isBitSet(ctrlByte, 4)
|
||||||
|
|
||||||
fmt.Printf("IsWeightRemoved: %v\n", isWeightRemoved)
|
// fmt.Printf("IsWeightRemoved: %v\n", isWeightRemoved)
|
||||||
fmt.Printf("6 LSB Unknown: %v\n", isBitSet(ctrlByte, 6))
|
// fmt.Printf("6 LSB Unknown: %v\n", isBitSet(ctrlByte, 6))
|
||||||
fmt.Printf("IsStabilized: %v\n", isStabilized)
|
// fmt.Printf("IsStabilized: %v\n", isStabilized)
|
||||||
fmt.Printf("IsCattyOrKg: %v\n", isCattyUnit)
|
// fmt.Printf("IsCattyOrKg: %v\n", isCattyUnit)
|
||||||
fmt.Printf("3 LSB Unknown: %v\n", isBitSet(ctrlByte, 3))
|
// fmt.Printf("3 LSB Unknown: %v\n", isBitSet(ctrlByte, 3))
|
||||||
fmt.Printf("2 LSB Unknown: %v\n", isBitSet(ctrlByte, 2))
|
// fmt.Printf("2 LSB Unknown: %v\n", isBitSet(ctrlByte, 2))
|
||||||
fmt.Printf("1 LSB Unknown: %v\n", isBitSet(ctrlByte, 1))
|
// fmt.Printf("1 LSB Unknown: %v\n", isBitSet(ctrlByte, 1))
|
||||||
fmt.Printf("IsLBS: %v\n", isLBSUnit)
|
// fmt.Printf("IsLBS: %v\n", isLBSUnit)
|
||||||
|
|
||||||
// // Only if the value is stabilized and the weight is *not* removed, the date is valid
|
// // Only if the value is stabilized and the weight is *not* removed, the date is valid
|
||||||
if isStabilized && !isWeightRemoved {
|
if isStabilized && !isWeightRemoved {
|
||||||
|
|||||||
Reference in New Issue
Block a user