From 8262d42332fa145e301703767a2f2d7d256cc2a6 Mon Sep 17 00:00:00 2001 From: saji Date: Wed, 28 Jun 2023 08:16:26 -0500 Subject: [PATCH] go-skylab:fix uint64/uint32 conversion --- skylab/skylab_gen.go | 4 ++-- skylab/templates/golang.go.tmpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/skylab/skylab_gen.go b/skylab/skylab_gen.go index 9a2366e..9b5fb12 100644 --- a/skylab/skylab_gen.go +++ b/skylab/skylab_gen.go @@ -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 @@ -236,7 +236,7 @@ var idMap = map[uint32]bool{ // If the CAN ID is unknown, it will return an error. func FromCanFrame(id uint32, data []byte) (Packet, error) { if !idMap[id] { - return nil, &UnknownIdError{ id } + return nil, &UnknownIdError{ uint64(id) } } switch id { case 0x10: diff --git a/skylab/templates/golang.go.tmpl b/skylab/templates/golang.go.tmpl index 46aae41..5f781c9 100644 --- a/skylab/templates/golang.go.tmpl +++ b/skylab/templates/golang.go.tmpl @@ -114,7 +114,7 @@ var idMap = map[uint32]bool{ // If the CAN ID is unknown, it will return an error. func FromCanFrame(id uint32, data []byte) (Packet, error) { if !idMap[id] { - return nil, &UnknownIdError{ id } + return nil, &UnknownIdError{ uint64(id) } } switch id { {{- range $p := .Packets }}