Changeset d7cce5
- Timestamp:
- 01/11/12 14:53:46 (4 months ago)
- Branches:
- ('master', 'deebf2045e7119c339412580f37a1e653f7d5715')('controller-upgrade', '00f95d22e12d96ef089e0902ef62ae8ce841dc6f')
- Children:
- 4068742b254f2b7a11aba2fee7294d136447aa9b
- Parents:
- 8d22eff5da33b1ab94e7459832a33e1f1ab6587c
- git-author:
- Stefan Persson <stefan.persson@telldus.se>2012-01-11 14:53:46+01:00
- git-committer:
- Stefan Persson <stefan.persson@telldus.se>2012-01-11 14:53:46+01:00
- Location:
- telldus-core
- Files:
-
- 5 edited
-
client/Client.cpp (modified) (2 diffs)
-
service/ClientCommunicationHandler.cpp (modified) (1 diff)
-
service/SettingsConfuse.cpp (modified) (1 diff)
-
service/TellStick_libftdi.cpp (modified) (5 diffs)
-
service/tellstick.conf (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
telldus-core/client/Client.cpp
r86554b rd7cce5 297 297 s.connect(L"TelldusClient"); 298 298 if (!s.isConnected()) { //Connection failed 299 printf("Connection failed\n\r"); 299 300 msleep(500); 300 301 continue; //retry … … 302 303 s.write(msg.data()); 303 304 if (!s.isConnected()) { //Connection failed sometime during operation... (better check here, instead of 5 seconds timeout later) 305 printf("Connection failed after write\n\r"); 304 306 msleep(500); 305 307 continue; //retry 306 308 } 307 readData = s.read( 5000);309 readData = s.read(10000); //TODO changed to 10000 from 5000, how much does this do...? 308 310 if(readData == L""){ 311 printf("Readdata nothing\n\r"); 309 312 msleep(500); 310 313 continue; //TODO can we be really sure it SHOULD be anything? 314 //TODO perhaps break here instead? 311 315 } 312 316 313 317 if (!s.isConnected()) { //Connection failed sometime during operation... 318 printf("Connection failed in the end\n\r"); 314 319 msleep(500); 315 320 continue; //retry -
telldus-core/service/ClientCommunicationHandler.cpp
r36bfa0 rd7cce5 2 2 #include "Message.h" 3 3 #include "Strings.h" 4 #include "Log.h" //Debug 4 5 5 6 #include <stdlib.h> -
telldus-core/service/SettingsConfuse.cpp
rc4ef48 rd7cce5 376 376 CFG_STR(const_cast<char *>("group"), const_cast<char *>("plugdev"), CFGF_NONE), 377 377 CFG_STR(const_cast<char *>("deviceNode"), const_cast<char *>("/dev/tellstick"), CFGF_NONE), 378 CFG_STR(const_cast<char *>("ignoreControllerConfirmation"), const_cast<char *>("false"), CFGF_NONE), 378 379 CFG_SEC(const_cast<char *>("device"), device_opts, CFGF_MULTI), 379 380 CFG_END() -
telldus-core/service/TellStick_libftdi.cpp
r8d22ef rd7cce5 20 20 #include "Mutex.h" 21 21 #include "Log.h" 22 #include "Settings.h" 22 23 #include "Strings.h" 23 24 #include "common.h" 24 #include "Log.h"25 25 26 26 #include <unistd.h> … … 34 34 class TellStick::PrivateData { 35 35 public: 36 bool open ;36 bool open, ignoreControllerConfirmation; 37 37 int vid, pid, fwVersion; 38 38 std::string serial, message; … … 53 53 d->serial = td.serial; 54 54 d->running = false; 55 56 Settings set; 57 d->ignoreControllerConfirmation = set.getSetting(L"ignoreControllerConfirmation")==L"true"; 55 58 56 59 ftdi_init(&d->ftHandle); … … 214 217 delete[] tempMessage; 215 218 Log::notice("Message: %s", strMessage.c_str()); 216 if( strMessage == "N+" && ((pid() == 0x0C31 && firmwareVersion() < 5) || (pid() == 0x0C30 && firmwareVersion() < 6))){219 if(d->ignoreControllerConfirmation || (strMessage == "N+" && ((pid() == 0x0C31 && firmwareVersion() < 5) || (pid() == 0x0C30 && firmwareVersion() < 6)))){ 217 220 //these firmware versions doesn't implement ack to noop, just check that the noop can be sent correctly 218 221 Log::notice("Too old firmware, accepting this"); 219 222 if(c){ 223 Log::notice("Success"); 220 224 return TELLSTICK_SUCCESS; 221 225 } 222 226 else{ 227 Log::notice("Fail"); 223 228 return TELLSTICK_ERROR_COMMUNICATION; 224 229 } … … 231 236 ret = ftdi_read_data( &d->ftHandle, &in, 1); 232 237 if (ret > 0) { 238 Log::notice("Returned %c", in); 233 239 if (in == '\n') { 240 Log::notice("BREAK"); 234 241 break; 235 242 } -
telldus-core/service/tellstick.conf
rbea7b7 rd7cce5 1 1 user = "nobody" 2 2 group = "plugdev" 3 ignoreControllerConfirmation = "false" 3 4 device { 4 5 id = 1
Note: See TracChangeset
for help on using the changeset viewer.
