X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftestclient%2Fmain.cpp;h=1b13848021c7bc2bf694efa0f6af90dedf9f91f3;hb=d2f1c15733e3f6f2c8a17abfd3c6612ea93ce734;hp=cc3b2299dccd566cf0f186468cf09eebae94555d;hpb=ec0deac13dec6671370fbc17483b0957541d49cb;p=deb_libcec.git diff --git a/src/testclient/main.cpp b/src/testclient/main.cpp index cc3b229..1b13848 100644 --- a/src/testclient/main.cpp +++ b/src/testclient/main.cpp @@ -227,7 +227,7 @@ void ShowHelpConsole(void) "[on] {address} power on the device with the given logical address." << endl << "[standby] {address} put the device with the given address in standby mode." << endl << "[la] {logical address} change the logical address of the CEC adapter." << endl << - "[p] {port number} change the HDMI port number of the CEC adapter." << endl << + "[p] {device} {port} change the HDMI port number of the CEC adapter." << endl << "[pa] {physical address} change the physical address of the CEC adapter." << endl << "[osd] {addr} {string} set OSD message on the specified device." << endl << "[ver] {addr} get the CEC version of the specified device." << endl << @@ -445,7 +445,7 @@ int main (int argc, char *argv[]) if (iHDMIPort > 0) { - parser->SetHDMIPort((uint8_t)iHDMIPort); + parser->SetHDMIPort((cec_logical_address)CEC_DEFAULT_BASE_DEVICE, (uint8_t)iHDMIPort); FlushLog(parser); } @@ -560,10 +560,10 @@ int main (int argc, char *argv[]) } else if (command == "p") { - string strvalue; - if (GetWord(input, strvalue)) + string strPort, strDevice; + if (GetWord(input, strDevice) && GetWord(input, strPort)) { - parser->SetHDMIPort((uint8_t)atoi(strvalue.c_str())); + parser->SetHDMIPort((cec_logical_address)atoi(strDevice.c_str()), (uint8_t)atoi(strPort.c_str())); } } else if (command == "pa")