Skip to content
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

Support open/close Cybertruck tonneau #244

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions cmd/tesla-control/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,30 @@ var commands = map[string]*Command{
return car.Wakeup(ctx)
},
},
"tonneau-open": &Command{
help: "Open Cybertruck tonneau.",
requiresAuth: true,
requiresFleetAPI: false,
handler: func(ctx context.Context, acct *account.Account, car *vehicle.Vehicle, args map[string]string) error {
return car.OpenTonneau(ctx)
},
},
"tonneau-close": &Command{
help: "Close Cybertruck tonneau.",
requiresAuth: true,
requiresFleetAPI: false,
handler: func(ctx context.Context, acct *account.Account, car *vehicle.Vehicle, args map[string]string) error {
return car.CloseTonneau(ctx)
},
},
"tonneau-stop": &Command{
help: "Stop moving Cybertruck tonneau.",
requiresAuth: true,
requiresFleetAPI: false,
handler: func(ctx context.Context, acct *account.Account, car *vehicle.Vehicle, args map[string]string) error {
return car.StopTonneau(ctx)
},
},
"trunk-open": &Command{
help: "Open vehicle trunk. Note that trunk-close only works on certain vehicle types.",
requiresAuth: true,
Expand Down
1 change: 1 addition & 0 deletions pkg/protocol/protobuf/vcsec.proto
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ message ClosureMoveRequest {
ClosureMoveType_E rearTrunk = 5;
ClosureMoveType_E frontTrunk = 6;
ClosureMoveType_E chargePort = 7;
ClosureMoveType_E tonneau = 8;
}

message PermissionChange {
Expand Down
Loading
Loading