Use protobuf messages

This commit is contained in:
cyrilix committed 2020-01-01 20:55:04 +01:00
1 parent 6157e27850
commit 5e9b47970a
357 files changed
+232188 -83

No files matched your search

-36
View File
@@ -1,36 +0,0 @@
package types
import (
"log"
)
type DriveMode int
const (
DriveModeInvalid = -1
DriveModeUser = iota
DriveModePilot
)
func ToString(mode DriveMode) string {
switch mode {
case DriveModeUser:
return "user"
case DriveModePilot:
return "pilot"
default:
return ""
}
}
func ParseString(val string) DriveMode {
switch val {
case "user":
return DriveModeUser
case "pilot":
return DriveModePilot
default:
log.Printf("invalid DriveMode: %v", val)
return DriveModeInvalid
}
}
-10
View File
@@ -1,10 +0,0 @@
package types
/* Radio control value */
type RCValue struct {
Value float64
Confidence float64
}
type Steering RCValue
type Throttle RCValue
-5
View File
@@ -1,5 +0,0 @@
package types
type BoundingBox struct {
Left, Top, Right, Bottom int
}