go-skylab:fix uint64/uint32 conversion
This commit is contained in:
parent
2dd6031bdd
commit
8262d42332
|
@ -1,4 +1,4 @@
|
||||||
// generated by gen_skylab.go at 2023-06-27 20:32:07.43630691 -0500 CDT m=+0.003975675 DO NOT EDIT!
|
// generated by gen_skylab.go at 2023-06-28 08:15:54.687487803 -0500 CDT m=+0.002619032 DO NOT EDIT!
|
||||||
|
|
||||||
package skylab
|
package skylab
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ var idMap = map[uint32]bool{
|
||||||
// If the CAN ID is unknown, it will return an error.
|
// If the CAN ID is unknown, it will return an error.
|
||||||
func FromCanFrame(id uint32, data []byte) (Packet, error) {
|
func FromCanFrame(id uint32, data []byte) (Packet, error) {
|
||||||
if !idMap[id] {
|
if !idMap[id] {
|
||||||
return nil, &UnknownIdError{ id }
|
return nil, &UnknownIdError{ uint64(id) }
|
||||||
}
|
}
|
||||||
switch id {
|
switch id {
|
||||||
case 0x10:
|
case 0x10:
|
||||||
|
|
|
@ -114,7 +114,7 @@ var idMap = map[uint32]bool{
|
||||||
// If the CAN ID is unknown, it will return an error.
|
// If the CAN ID is unknown, it will return an error.
|
||||||
func FromCanFrame(id uint32, data []byte) (Packet, error) {
|
func FromCanFrame(id uint32, data []byte) (Packet, error) {
|
||||||
if !idMap[id] {
|
if !idMap[id] {
|
||||||
return nil, &UnknownIdError{ id }
|
return nil, &UnknownIdError{ uint64(id) }
|
||||||
}
|
}
|
||||||
switch id {
|
switch id {
|
||||||
{{- range $p := .Packets }}
|
{{- range $p := .Packets }}
|
||||||
|
|
Loading…
Reference in a new issue