Skip to content

Commit

Permalink
Support open/close Cybertruck tonneau
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Terashima authored and sethterashima committed May 24, 2024
1 parent 6536a17 commit 0d9d955
Show file tree
Hide file tree
Showing 6 changed files with 476 additions and 415 deletions.
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

0 comments on commit 0d9d955

Please sign in to comment.