summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/beep/main.go6
-rw-r--r--cmd/cvend-ipp/main.go4
-rw-r--r--cmd/orca/main.go2
-rw-r--r--cmd/pic32-ipp/main.go4
4 files changed, 8 insertions, 8 deletions
diff --git a/cmd/beep/main.go b/cmd/beep/main.go
index 56263d5..7af1f56 100644
--- a/cmd/beep/main.go
+++ b/cmd/beep/main.go
@@ -19,13 +19,13 @@ func main() {
cv := must(cvend.OpenIPP(nil))
defer cv.Close()
var lastIgnition bool
- pic := must(pic32.OpenIPP(func(msgType byte, msgData []byte) {
+ pic := must(pic32.OpenIPP(func(seq, replyTo byte, msgType byte, msgData []byte) {
if msgType == 0x03 && binary.BigEndian.Uint16(msgData[:2]) == 0x03fb {
ignition := msgData[2] != 0
if lastIgnition != ignition {
lastIgnition = ignition
if ignition {
- if err := cv.SendIPP(0x22, []byte{0x06, 0x00, 0x01, 0x00}); err != nil {
+ if err := cv.SendIPP(0x22, 0, []byte{0x06, 0x00, 0x01, 0x00}); err != nil {
panic(err)
}
}
@@ -34,7 +34,7 @@ func main() {
}))
defer pic.Close()
for {
- if err := pic.SendIPP(0x02, []byte{0x03, 0xfb}); err != nil {
+ if err := pic.SendIPP(0x02, 0, []byte{0x03, 0xfb}); err != nil {
panic(err)
}
time.Sleep(100 * time.Millisecond)
diff --git a/cmd/cvend-ipp/main.go b/cmd/cvend-ipp/main.go
index a985dc6..b8782d4 100644
--- a/cmd/cvend-ipp/main.go
+++ b/cmd/cvend-ipp/main.go
@@ -20,7 +20,7 @@ func main() {
log.SetFlags(log.Lshortfile | log.Ldate | log.Ltime | log.Lmicroseconds)
log.Println("cvend-ipp start")
wc := make(chan struct{}, 1)
- s, err := cvend.OpenIPP(func(msgType byte, msgData []byte) {
+ s, err := cvend.OpenIPP(func(seq, replyTo byte, msgType byte, msgData []byte) {
cvend.LogIPP(msgType, msgData)
select {
case wc <- struct{}{}:
@@ -44,7 +44,7 @@ func main() {
} else {
msgData = bs
}
- if err := s.SendIPP(msgType, msgData); err != nil {
+ if err := s.SendIPP(msgType, 0, msgData); err != nil {
panic(err)
}
if *wait > 0 {
diff --git a/cmd/orca/main.go b/cmd/orca/main.go
index a068617..5d292e2 100644
--- a/cmd/orca/main.go
+++ b/cmd/orca/main.go
@@ -101,7 +101,7 @@ func cvendTask(out chan<- cvendState) {
go func() { // send periodic status requests to keep cvend from going to sleep
for {
time.Sleep(30 * time.Second)
- if err := cv.SendIPP(0x04, nil); err != nil {
+ if err := cv.SendIPP(0x04, 0, nil); err != nil {
log.Printf("failed to send Status: %s", err)
}
}
diff --git a/cmd/pic32-ipp/main.go b/cmd/pic32-ipp/main.go
index c6d3d98..34bc571 100644
--- a/cmd/pic32-ipp/main.go
+++ b/cmd/pic32-ipp/main.go
@@ -20,7 +20,7 @@ func main() {
log.SetFlags(log.Lshortfile | log.Ldate | log.Ltime | log.Lmicroseconds)
log.Println("pic32-ipp start")
wc := make(chan struct{}, 1)
- s, err := pic32.OpenIPP(func(msgType byte, msgData []byte) {
+ s, err := pic32.OpenIPP(func(seq, replyTo byte, msgType byte, msgData []byte) {
pic32.LogIPP(msgType, msgData)
select {
case wc <- struct{}{}:
@@ -44,7 +44,7 @@ func main() {
} else {
msgData = bs
}
- if err := s.SendIPP(msgType, msgData); err != nil {
+ if err := s.SendIPP(msgType, 0, msgData); err != nil {
panic(err)
}
if *wait > 0 {