set fadecandy default port to original fcserver port number

tune debug output of fadecandy device


Former-commit-id: 651459e5294ce5721ebe3bb2a6acdc1d096d9cfb
This commit is contained in:
redpanther 2016-01-04 12:26:06 +01:00
parent 13715202d8
commit 7f5a664864
2 changed files with 2 additions and 4 deletions

View File

@ -247,7 +247,7 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
else if (type == "fadecandy")
{
const std::string host = deviceConfig.get("output", "127.0.0.1").asString();
const uint16_t port = deviceConfig.get("port", 8080).asInt();
const uint16_t port = deviceConfig.get("port", 7890).asInt();
device = new LedDeviceFadeCandy(host,port);
}
else if (type == "tpm2")

View File

@ -21,8 +21,6 @@ LedDeviceFadeCandy::LedDeviceFadeCandy(const std::string& host, const uint16_t p
_opc_data[1] = OPC_SET_PIXELS;
_opc_data[2] = 0;
_opc_data[3] = 0;
qDebug("connect to %s %i",_host.c_str(),_port);
}
LedDeviceFadeCandy::~LedDeviceFadeCandy()
@ -38,7 +36,7 @@ bool LedDeviceFadeCandy::isConnected()
bool LedDeviceFadeCandy::tryConnect()
{
if ( _client.state() == QAbstractSocket::UnconnectedState ) {
qDebug("connecting");
qDebug("connecting to %s %i",_host.c_str(),_port);
QHostAddress addr(_host.c_str());
_client.connectToHost(addr, _port);
if (_client.waitForConnected(1000))