mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-15 09:02:02 +00:00
fixup! chore(ble): cleanup of ble code
This commit is contained in:
parent
5f8eef528b
commit
02cfab14e8
@ -99,8 +99,11 @@ void management_send_pairing_request_event(uint8_t *data, uint16_t len) {
|
||||
static void process_command(uint8_t *data, uint16_t len) {
|
||||
uint8_t cmd = data[0];
|
||||
bool success = true;
|
||||
bool send_response = true;
|
||||
switch (cmd) {
|
||||
case INTERNAL_CMD_SEND_STATE:
|
||||
send_response = false;
|
||||
management_send_status_event();
|
||||
break;
|
||||
case INTERNAL_CMD_ADVERTISING_ON: {
|
||||
uint8_t color = data[2];
|
||||
@ -132,10 +135,12 @@ static void process_command(uint8_t *data, uint16_t len) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (success) {
|
||||
management_send_success_event();
|
||||
} else {
|
||||
management_send_failure_event();
|
||||
if (send_response) {
|
||||
if (success) {
|
||||
management_send_success_event();
|
||||
} else {
|
||||
management_send_failure_event();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user