From: Lars Op den Kamp Date: Wed, 28 Sep 2011 23:42:46 +0000 (+0200) Subject: cec: fix hardcoded ackmask in SetAckMast(). set a shorter display name in the test... X-Git-Tag: upstream/2.2.0~1^2~321 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=645188320df76606fa9bd2b828a760e20bed07e0;p=deb_libcec.git cec: fix hardcoded ackmask in SetAckMast(). set a shorter display name in the test client. the previous one was too long and being rejected --- diff --git a/src/lib/CECParser.cpp b/src/lib/CECParser.cpp index 52b2711..06a1715 100644 --- a/src/lib/CECParser.cpp +++ b/src/lib/CECParser.cpp @@ -802,25 +802,21 @@ bool CCECParser::SetAckMask(cec_logical_address ackmask) strLog.Format("setting ackmask to %d", (uint16_t) ackmask); AddLog(CEC_LOG_NOTICE, strLog.c_str()); - //TODO!! - uint16_t tackmask = 0x10; - AddLog(CEC_LOG_WARNING, "TODO: forcing ackmask to 0x10"); - cec_frame output; m_iLogicalAddress = ackmask; output.push_back(MSGSTART); PushEscaped(output, MSGCODE_SET_ACK_MASK); - PushEscaped(output, tackmask >> 8); - PushEscaped(output, (uint8_t) tackmask); + PushEscaped(output, (uint8_t) ackmask >> 8); + PushEscaped(output, (uint8_t) ackmask << 2); output.push_back(MSGEND); if (m_serialport->Write(output) == -1) { - CStdString strError; - strError.Format("error writing to serial port: %s", m_serialport->GetError().c_str()); - AddLog(CEC_LOG_ERROR, strError); + CStdString strDebug; + strDebug.Format("error writing to serial port: %s", m_serialport->GetError().c_str()); + AddLog(CEC_LOG_ERROR, strDebug); return false; } diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index 1aa790b..0edf5cd 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -105,7 +105,7 @@ void show_help(const char* strExec) int main (int argc, char *argv[]) { - ICECDevice *parser = LoadLibCec("CEC Test Client"); + ICECDevice *parser = LoadLibCec("CEC Tester"); if (!parser && parser->GetMinVersion() > CEC_TEST_CLIENT_VERSION) { cout << "Unable to create parser. Is libcec.dll present?" << endl;