Use protobuf messages

This commit is contained in:
2020-01-01 20:54:38 +01:00
parent 6157e27850
commit 5e9b47970a
357 changed files with 232188 additions and 83 deletions

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
}
}

View File

@ -1,10 +0,0 @@
package types
/* Radio control value */
type RCValue struct {
Value float64
Confidence float64
}
type Steering RCValue
type Throttle RCValue

View File

@ -1,5 +0,0 @@
package types
type BoundingBox struct {
Left, Top, Right, Bottom int
}