Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Revert "We inherited code from Nico Hood's HID project that would always send empty reports at setup" #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/BootKeyboard/BootKeyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ int BootKeyboard_::getDescriptor(USBSetup& setup) {


void BootKeyboard_::begin() {
// Force API to send a clean report.
// This is important for and HID bridge where the receiver stays on,
// while the sender is resetted.
releaseAll();
sendReport();
}


Expand Down
2 changes: 2 additions & 0 deletions src/DeviceAPIs/AbsoluteMouseAPI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ int16_t AbsoluteMouseAPI::qadd16(int16_t base, int16_t increment) {
}

void AbsoluteMouseAPI::begin() {
// release all buttons
end();
}

void AbsoluteMouseAPI::end() {
Expand Down
2 changes: 2 additions & 0 deletions src/MultiReport/ConsumerControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ ConsumerControl_::ConsumerControl_() {
}

void ConsumerControl_::begin() {
// release all buttons
end();
}

void ConsumerControl_::end() {
Expand Down
2 changes: 2 additions & 0 deletions src/MultiReport/Gamepad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ Gamepad_::Gamepad_() {
}

void Gamepad_::begin() {
// release all buttons
end();
}

void Gamepad_::end() {
Expand Down
4 changes: 4 additions & 0 deletions src/MultiReport/Keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ Keyboard_::Keyboard_() {
}

void Keyboard_::begin() {
// Force API to send a clean report. This is important for and HID bridge
// where the receiver stays on, while the sender is resetted.
releaseAll();
sendReportUnchecked();
}


Expand Down
1 change: 1 addition & 0 deletions src/MultiReport/Mouse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Mouse_::Mouse_() {
}

void Mouse_::begin() {
end();
}

void Mouse_::end() {
Expand Down
2 changes: 2 additions & 0 deletions src/MultiReport/SystemControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ SystemControl_::SystemControl_() {
}

void SystemControl_::begin() {
// release all buttons
end();
}

void SystemControl_::end() {
Expand Down