Skip to content

Commit

Permalink
Improve HID event push error message
Browse files Browse the repository at this point in the history
On HID event push failure, add the event type in the error message.
  • Loading branch information
rom1v committed Feb 24, 2022
1 parent 59656fe commit 8d91cda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/src/usb/hid_keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ push_mod_lock_state(struct sc_hid_keyboard *kb, uint16_t mods_state) {

if (!sc_aoa_push_hid_event(kb->aoa, &hid_event)) {
sc_hid_event_destroy(&hid_event);
LOGW("Could not request HID event");
LOGW("Could not request HID event (mod lock state)");
return false;
}

Expand Down Expand Up @@ -382,7 +382,7 @@ sc_key_processor_process_key(struct sc_key_processor *kp,

if (!sc_aoa_push_hid_event(kb->aoa, &hid_event)) {
sc_hid_event_destroy(&hid_event);
LOGW("Could not request HID event");
LOGW("Could not request HID event (key)");
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/usb/hid_mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ sc_mouse_processor_process_mouse_motion(struct sc_mouse_processor *mp,

if (!sc_aoa_push_hid_event(mouse->aoa, &hid_event)) {
sc_hid_event_destroy(&hid_event);
LOGW("Could not request HID event");
LOGW("Could not request HID event (mouse motion)");
}
}

Expand All @@ -203,7 +203,7 @@ sc_mouse_processor_process_mouse_click(struct sc_mouse_processor *mp,

if (!sc_aoa_push_hid_event(mouse->aoa, &hid_event)) {
sc_hid_event_destroy(&hid_event);
LOGW("Could not request HID event");
LOGW("Could not request HID event (mouse click)");
}
}

Expand All @@ -228,7 +228,7 @@ sc_mouse_processor_process_mouse_scroll(struct sc_mouse_processor *mp,

if (!sc_aoa_push_hid_event(mouse->aoa, &hid_event)) {
sc_hid_event_destroy(&hid_event);
LOGW("Could not request HID event");
LOGW("Could not request HID event (mouse scroll)");
}
}

Expand Down

0 comments on commit 8d91cda

Please sign in to comment.