Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new method HidController::send_feature_report #3051

Merged
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
43349a2
Added new method HidController::send_feature_report
JoergAtGithub Aug 30, 2020
6cffd7e
Removed out commented code line
JoergAtGithub Aug 30, 2020
d0b12ad
Clang format fix
JoergAtGithub Aug 30, 2020
ffbe673
Clang fix next iteration
JoergAtGithub Aug 30, 2020
5bf1c18
Clang format fix again
JoergAtGithub Aug 30, 2020
004fc03
Renamed function from send_feature_report to sendFeatureReport
JoergAtGithub Aug 30, 2020
7e1bc5b
Merge branch 'master' into HidController.send_feature_report
JoergAtGithub Aug 30, 2020
8676365
Fixed incorrect merge
JoergAtGithub Aug 30, 2020
f817802
Made sendFeatureReport working with master
JoergAtGithub Aug 30, 2020
bf0478e
Changed number of spaces
JoergAtGithub Aug 30, 2020
f850111
Use spaces instead of tabulator
JoergAtGithub Aug 30, 2020
bcbcf17
Added newline at end of file
JoergAtGithub Aug 30, 2020
26a45d7
Clang format
JoergAtGithub Aug 30, 2020
52ecf40
Changed type cast
JoergAtGithub Aug 30, 2020
a0c2b74
Clang syntax warnings fixed
JoergAtGithub Aug 30, 2020
895cae2
Added missing argument name in declaration
JoergAtGithub Aug 31, 2020
ba1ab39
Replaced prepend by append
JoergAtGithub Aug 31, 2020
7b00ecf
Fixed clang syntax error
JoergAtGithub Aug 31, 2020
ec19a1c
Added constexpr sizeOfReportID in anonymous namespace
JoergAtGithub Sep 9, 2020
28f9132
clang-format
JoergAtGithub Sep 9, 2020
9a2c4cc
clang-format
JoergAtGithub Sep 9, 2020
46a73ba
clang-format
JoergAtGithub Sep 9, 2020
e069659
Merge branch 'HidController.send_feature_report' of https://github.co…
JoergAtGithub Sep 9, 2020
9c8f242
clang-format
JoergAtGithub Sep 9, 2020
0577b25
Put this at the top of the file (below includes/forward declarations)
JoergAtGithub Sep 9, 2020
01551aa
Replaced the 512 by a constexpr in the anonymous namespace too
JoergAtGithub Sep 10, 2020
136464c
clang-format
JoergAtGithub Sep 10, 2020
eb079c6
Removed the redundant comments for the constexpr statements
JoergAtGithub Oct 2, 2020
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
8 changes: 7 additions & 1 deletion src/controllers/hid/hidcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,16 @@ void HidController::sendBytesReport(QByteArray data, unsigned int reportID) {
}
}


namespace
{
constexpr unsigned int sizeOfReportID = 1; // Size of an USB HID Report ID is always one byte
}
JoergAtGithub marked this conversation as resolved.
Show resolved Hide resolved

void HidController::sendFeatureReport(
const QList<int>& dataList, unsigned int reportID) {
QByteArray dataArray;
JoergAtGithub marked this conversation as resolved.
Show resolved Hide resolved
dataArray.reserve(1 + dataList.size());
dataArray.reserve(sizeOfReportID + dataList.size());

// Append the Report ID to the beginning of dataArray[] per the API..
dataArray.append(reportID);
Expand Down