Fix binary encoding

This commit is contained in:
lordwelch 2017-11-06 23:50:55 -07:00
parent 2dd8ffaccb
commit 42c31d6d9f
2 changed files with 2 additions and 2 deletions

View File

@ -255,7 +255,7 @@
"modifier": "00000010", "modifier": "00000010",
"decimal": 19 "decimal": 19
}, },
"T" : { "T" : {
"modifier": "00000010", "modifier": "00000010",
"decimal": 28 "decimal": 28
}, },

View File

@ -135,7 +135,7 @@ func main() {
} }
changeKeymap(r, keys, args, hidg0, &currentKeyMap) changeKeymap(r, keys, args, hidg0, &currentKeyMap)
_, err = fmt.Sscanf(keys[args.ORDER[currentKeyMap]][string(r)].Modifier, "%b", flag) _, err = fmt.Sscanf(keys[args.ORDER[currentKeyMap]][string(r)].Modifier, "%b", flag)
binary.PutVarint(report[:], int64(keys[args.ORDER[currentKeyMap]][string(r)].Decimal)) binary.LittleEndian.PutUint64(report[:], uint64(keys[args.ORDER[currentKeyMap]][string(r)].Decimal))
Press([8]byte{flag, 0, report[0], report[1], report[2], report[3], report[4], report[5]}, hidg0) Press([8]byte{flag, 0, report[0], report[1], report[2], report[3], report[4], report[5]}, hidg0)
} }