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

HID Switch to force sending of duplicate data and cleanup of JS API functions #4692

Merged
merged 15 commits into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions src/controllers/hid/hidcontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class HidControllerJSProxy : public ControllerJSProxy {
Q_INVOKABLE void send(const QList<int>& dataList,
daschuer marked this conversation as resolved.
Show resolved Hide resolved
unsigned int length,
const quint8& reportID,
bool resendUnchangedReport = false) {
const bool& resendUnchangedReport = false) {
JoergAtGithub marked this conversation as resolved.
Show resolved Hide resolved
Q_UNUSED(length);
QByteArray dataArray;
dataArray.reserve(dataList.size());
Expand All @@ -91,7 +91,7 @@ class HidControllerJSProxy : public ControllerJSProxy {
/// @param resendUnchangedReport If set, the report will also be send, if the data are unchanged since last sending
Q_INVOKABLE void sendOutputReport(const quint8& reportID,
const QByteArray& dataArray,
bool resendUnchangedReport = false) {
const bool& resendUnchangedReport = false) {
VERIFY_OR_DEBUG_ASSERT(m_pHidController->m_pHidIoThread) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/hid/hidiooutputreport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ HidIoOutputReport::HidIoOutputReport(
void HidIoOutputReport::updateCachedData(const QByteArray& data,
const mixxx::hid::DeviceInfo& deviceInfo,
const RuntimeLoggingCategory& logOutput,
bool resendUnchangedReport) {
const bool& resendUnchangedReport) {
auto cacheLock = lockMutex(&m_cachedDataMutex);

if (!m_lastCachedDataSize) {
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/hid/hidiooutputreport.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class HidIoOutputReport {

const mixxx::hid::DeviceInfo& deviceInfo,
const RuntimeLoggingCategory& logOutput,
bool resendUnchangedReport);
const bool& resendUnchangedReport);

/// Sends the OutputReport to the HID device, when changed data are cached.
/// Returns true if a time consuming hid_write operation was executed.
Expand Down