Skip to content

Commit

Permalink
Removed resendUnchangedReport implementation from PR mixxxdj#4692 for…
Browse files Browse the repository at this point in the history
…m HidIoOutputReport
  • Loading branch information
JoergAtGithub committed Mar 4, 2023
1 parent 08a33be commit 9b3be50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/controllers/hid/hidiooutputreport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ void HidIoOutputReport::updateCachedData(const QByteArray& data,
data.constData(),
data.size());
m_possiblyUnsentDataCached = true;
m_resendUnchangedReport = resendUnchangedReport;
}

bool HidIoOutputReport::sendCachedData(QMutex* pHidDeviceAndPollMutex,
Expand All @@ -82,7 +81,7 @@ bool HidIoOutputReport::sendCachedData(QMutex* pHidDeviceAndPollMutex,
return false;
}

if (!(m_resendUnchangedReport || m_lastSentData.compare(m_cachedData))) {
if (!m_lastSentData.compare(m_cachedData)) {
// An HID OutputReport can contain only HID OutputItems.
// HID OutputItems are defined to represent the state of one or more similar controls or LEDs.
// Only HID Feature items may be attributes of other items.
Expand Down
4 changes: 1 addition & 3 deletions src/controllers/hid/hidiooutputreport.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class HidIoOutputReport {

/// Caches new report data, which will later send by the IO thread
void updateCachedData(const QByteArray& data,

const mixxx::hid::DeviceInfo& deviceInfo,
const RuntimeLoggingCategory& logOutput,
bool resendUnchangedReport);
Expand All @@ -28,12 +27,11 @@ class HidIoOutputReport {
QByteArray m_lastSentData;

/// Mutex must be locked when reading/writing m_cachedData
/// or m_possiblyUnsentDataCached, m_resendUnchangedReport
/// or m_possiblyUnsentDataCached
QMutex m_cachedDataMutex;

QByteArray m_cachedData;
bool m_possiblyUnsentDataCached;
bool m_resendUnchangedReport;

/// Due to swapping of the QbyteArrays, we need to store
/// this information independent of the QBytearray size
Expand Down

0 comments on commit 9b3be50

Please sign in to comment.