-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add missing media commands #356
base: main
Are you sure you want to change the base?
add missing media commands #356
Conversation
|
||
"github.com/teslamotors/vehicle-command/pkg/protocol/protobuf/carserver" | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move SetVolume, ToggleMediaPlayback here.
}) | ||
} | ||
|
||
func (v *Vehicle) MediaVolumeRelative(ctx context.Context, delta int32) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the car just looks at the sign of delta. So +10 and +1 do the same thing (increase volume by one unit) and -10 and -1 do the same thing (decrease volume by one unit). So we should probably split this into MediaVolumeUp and MediaVolumeDown, which correspond directly with the REST API.
return func(v *vehicle.Vehicle) error { return v.MediaPreviousTrack(ctx) }, nil | ||
case "media_prev_favorite": | ||
return func(v *vehicle.Vehicle) error { return v.MediaPreviousFavorite(ctx) }, nil | ||
case "media_volume_down", "media_volume_up": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment in media.go.
Can you add the commands to tesla-control as well? |
I just noticed on https://developer.tesla.com/docs/fleet-api/endpoints/vehicle-commands only |
That would be me. I've already created a ticket internally to document this. |
Care to add remote_boombox? |
Description
Adds missing media commands to the proxy.
Fixes #345.
Type of change
Please select all options that apply to this change:
Checklist:
Confirm you have completed the following steps: