Rearrange slave_command_t enum values a bit to reflect their relative importance and rearrange a related case block too.
This commit is contained in:
@@ -42,6 +42,9 @@ void SlaveRxHandler(void)
|
||||
|
||||
uint8_t commandId = RxMessage.data[0];
|
||||
switch (commandId) {
|
||||
case SlaveCommand_JumpToBootloader:
|
||||
JumpToBootloader();
|
||||
break;
|
||||
case SlaveCommand_SetTestLed:
|
||||
TxMessage.length = 0;
|
||||
bool isLedOn = RxMessage.data[1];
|
||||
@@ -52,9 +55,6 @@ void SlaveRxHandler(void)
|
||||
uint8_t brightnessPercent = RxMessage.data[1];
|
||||
LedPwm_SetBrightness(brightnessPercent);
|
||||
break;
|
||||
case SlaveCommand_JumpToBootloader:
|
||||
JumpToBootloader();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
typedef enum {
|
||||
SlaveCommand_RequestProperty,
|
||||
SlaveCommand_RequestKeyStates,
|
||||
SlaveCommand_JumpToBootloader,
|
||||
SlaveCommand_SetTestLed,
|
||||
SlaveCommand_SetLedPwmBrightness,
|
||||
SlaveCommand_JumpToBootloader,
|
||||
} slave_command_t;
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user