Skip to content

Commit

Permalink
Fix open/close/actuate trunk code and documentation
Browse files Browse the repository at this point in the history
The OpenTrunk method was implemented as an alias for ActuateTrunk, but
the commands have different meanings in vehicles with powered trunks and
vehicles without. The implementations are now correct, and the proxied
`actuate_trunk` invokes ActuateTrunk, leaving its behavior unchanged.
  • Loading branch information
sethterashima authored and Seth Terashima committed Mar 18, 2024
1 parent 5d213ad commit fcad171
Show file tree
Hide file tree
Showing 6 changed files with 617 additions and 533 deletions.
1 change: 1 addition & 0 deletions pkg/protocol/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ var (
ErrProtocolNotSupported = errors.New("vehicle does not support protocol -- use REST API")
ErrRequiresBLE = errors.New("command can only be sent over BLE")
ErrRequiresEncryption = errors.New("command should not be sent in plaintext or encrypted with an unauthenticated public key")
ErrCommandNotSupported = NewError("vehicle does not support this command", false, false)
)

type CommandError struct {
Expand Down
9 changes: 8 additions & 1 deletion pkg/protocol/protobuf/vcsec.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ message SignedMessage {
}

message ToVCSECMessage {
SignedMessage signedMessage = 1;
oneof sub_message {
SignedMessage signedMessage = 1;
UnsignedMessage unsignedMessage = 2;
}
}

message KeyIdentifier {
Expand Down Expand Up @@ -76,6 +79,10 @@ message InformationRequest {
enum RKEAction_E {
RKE_ACTION_UNLOCK = 0;
RKE_ACTION_LOCK = 1;
RKE_ACTION_OPEN_TRUNK = 2;
RKE_ACTION_OPEN_FRUNK = 3;
RKE_ACTION_OPEN_CHARGE_PORT = 4;
RKE_ACTION_CLOSE_CHARGE_PORT = 5;
RKE_ACTION_REMOTE_DRIVE = 20;
RKE_ACTION_AUTO_SECURE_VEHICLE = 29;
RKE_ACTION_WAKE_VEHICLE = 30;
Expand Down
Loading

0 comments on commit fcad171

Please sign in to comment.