feat: implement copilot drive mode

This commit is contained in:
cyrilix committed 2023-10-15 11:33:10 +02:00
1 parent 993cfaa9d4
commit fb20ef0d06
6 files changed
+24 -11

No files matched your search

+6 -1
View File
@@ -287,7 +287,12 @@ func (a *Part) processChannel6(v string) {
// No value, ignore it
return
}
if value > 1800 {
if value <= 1800 && value > 1200 {
if a.driveMode != events.DriveMode_COPILOT {
zap.S().Infof("Update channel 6 'drive-mode' with value %v, new user_mode: %v", value, events.DriveMode_PILOT)
a.driveMode = events.DriveMode_COPILOT
}
} else if value > 1800 {
if a.driveMode != events.DriveMode_PILOT {
zap.S().Infof("Update channel 6 'drive-mode' with value %v, new user_mode: %v", value, events.DriveMode_PILOT)
a.driveMode = events.DriveMode_PILOT