mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-16 01:22: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) {
|
static void process_command(uint8_t *data, uint16_t len) {
|
||||||
uint8_t cmd = data[0];
|
uint8_t cmd = data[0];
|
||||||
bool success = true;
|
bool success = true;
|
||||||
|
bool send_response = true;
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case INTERNAL_CMD_SEND_STATE:
|
case INTERNAL_CMD_SEND_STATE:
|
||||||
|
send_response = false;
|
||||||
|
management_send_status_event();
|
||||||
break;
|
break;
|
||||||
case INTERNAL_CMD_ADVERTISING_ON: {
|
case INTERNAL_CMD_ADVERTISING_ON: {
|
||||||
uint8_t color = data[2];
|
uint8_t color = data[2];
|
||||||
@ -132,10 +135,12 @@ static void process_command(uint8_t *data, uint16_t len) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (success) {
|
if (send_response) {
|
||||||
management_send_success_event();
|
if (success) {
|
||||||
} else {
|
management_send_success_event();
|
||||||
management_send_failure_event();
|
} else {
|
||||||
|
management_send_failure_event();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user