Skip to content

Commit

Permalink
Merge pull request #3 from OpenShock/feature/better-gpio-pin-handling
Browse files Browse the repository at this point in the history
Use signed 8-bit integers for gpio pin types
  • Loading branch information
hhvrc authored Oct 7, 2024
2 parents 5a234f3 + 9a4dd47 commit 58c0c64
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions HubConfig.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace OpenShock.Serialization.Configuration;

table RFConfig {
/// The GPIO pin connected to the RF modulator's data pin for transmitting (TX)
tx_pin:uint8;
tx_pin:int8;

/// Whether to transmit keepalive messages to keep the shockers from entering sleep mode
keepalive_enabled:bool;
Expand All @@ -12,7 +12,7 @@ table EStopConfig {
enabled:bool;

/// The GPIO pin connected to the E-Stop button
gpio_pin:uint8;
gpio_pin:int8;
}

table WiFiCredentials {
Expand Down
4 changes: 2 additions & 2 deletions HubToLocalMessage.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ enum SetGPIOResultCode : uint8 {
InternalError = 2
}
table SetRfTxPinCommandResult {
pin:uint8;
pin:int8;
result:SetGPIOResultCode;
}

Expand All @@ -62,7 +62,7 @@ table SetEstopEnabledCommandResult {
}

table SetEstopPinCommandResult {
gpio_pin:uint8;
gpio_pin:int8;
result:SetGPIOResultCode;
}

Expand Down
4 changes: 2 additions & 2 deletions LocalToHubMessage.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ table AccountUnlinkCommand {
placeholder:bool;
}
table SetRfTxPinCommand {
pin:uint8;
pin:int8;
}
table SetEstopEnabledCommand {
enabled:bool;
}
table SetEstopPinCommand {
pin:uint8;
pin:int8;
}

union LocalToHubMessagePayload {
Expand Down

0 comments on commit 58c0c64

Please sign in to comment.