Commit graph

54 commits

Author SHA1 Message Date
Micke Prag
aa16302e1e Add function ControllerManager::count()
This function also rescans the controllers to add new ones if none is
connected.
2012-11-02 13:34:34 +01:00
Micke Prag
6688f44084 Missing username in TODO according to Google style guidelines "readability/todo" 2012-06-19 12:30:52 +02:00
Micke Prag
5d2e3f33c8 Use C++ casting instead of C casting according to Google style guidelines "readability/casting" 2012-06-19 12:30:52 +02:00
Micke Prag
dc357ddeca Remove extra blank lines according to Google style guidelines "whitespace/blank_line" 2012-06-19 12:30:51 +02:00
Micke Prag
3a0cee353a Fix include header order according to Google style guidelines "build/include_order" 2012-06-19 12:30:50 +02:00
Micke Prag
75f21588e5 Should have a space between // and comment "whitespace/comments" 2012-06-19 12:30:50 +02:00
Micke Prag
e1608f94a8 { should almost always be at the end of the previous line, according to Google style guidelines "whitespace/braces" 2012-06-19 12:30:50 +02:00
Micke Prag
8d0228ced2 Add copyright message according to Google style guidelines "legal/copyright" 2012-06-19 12:30:50 +02:00
Micke Prag
5b5be387cd Include the directory when naming .h files. According to Google style guideline "build/include". 2012-06-19 12:30:49 +02:00
Micke Prag
f57eebad74 Merge remote branch 'erijo/get-controller-value'. This closes #202.
Conflicts:
	telldus-core/client/telldus-core.cpp
2012-03-30 16:49:42 +02:00
Erik Johansson
902c12d88d The controller added callback should pass the controller type
This unifies the behavior between loadControllers() and
loadStoredControllers().
2012-03-17 19:16:27 +01:00
Erik Johansson
8170629f48 Make "available" a valid parameter to query with tdControllerValue 2012-03-16 14:36:24 +01:00
Erik Johansson
5e49cfffe4 Make it possible to get controller name with tdControllerValue
The name can be changed with tdSetControllerValue but unless you listen to the
change event you had to fetch all controllers again to get the new name.
2012-03-16 14:34:48 +01:00
Micke Prag
9500c4c898 Convert dos endings to unix in telldus-core, see #160 2012-02-27 17:37:52 +01:00
Micke Prag
d728664785 Signal the firmware version as a modified signal. This since we don't know the firmware when a new controller is found. We need to communicate with the device first and the version will be detected later 2012-02-27 15:32:21 +01:00
Micke Prag
237cf4e8e7 Implement controller callback in telldus-service 2012-02-27 15:28:09 +01:00
Micke Prag
42beb57169 Pass around an EventRef instead of a raw Event pointer. This is safer 2012-02-24 17:39:52 +01:00
Micke Prag
a766fe32de Add public function tdRemoveController() to telldus-core, see #108 2012-02-23 12:34:31 +01:00
Micke Prag
345ff62a93 Add new function tdControllerValue(), see #108 2012-02-23 12:14:33 +01:00
Micke Prag
fae493f497 Store the new name in tdSetControllerValue() 2012-02-23 12:14:33 +01:00
Micke Prag
0800cfde10 When enumerating usb-devices, try matching them to the stored ones and add them if they are not found 2012-02-23 12:14:33 +01:00
Micke Prag
23f368b968 If the requested controller is not avaialable, find the firt available one 2012-02-23 12:14:33 +01:00
Micke Prag
f1c71e64a0 Don't remove controllers, just mark them as unavailable 2012-02-23 12:14:32 +01:00
Micke Prag
94ca412554 Load controllers from settings 2012-02-23 12:14:32 +01:00
Micke Prag
62fa35926c Name should be wide 2012-02-23 12:14:32 +01:00
Micke Prag
979e6082c2 Implement tdSetControllerValue in TelldusService 2012-02-23 10:07:17 +01:00
Micke Prag
00eeea1283 Add function to query controllers in the service 2012-02-23 10:07:16 +01:00
Micke Prag
799c25f98e Refactor ControllerManager's list of controllers to allow for metadata storage and loaded controller without an actual connected controller 2012-02-23 10:07:16 +01:00
Micke Prag
e834160492 Move class Event and EventHandler into the TelldusCore namespace 2012-02-03 17:09:38 +01:00
Micke Prag
c35be687c0 pid=0 and vid=0 means all. This way we can easily disconnect all controllers or initiate a rescan 2012-01-25 17:41:27 +01:00
Stefan Persson
b84e8b3806 Added TELLSTICK_ERROR_BROKEN_PIPE to distinguate between when communication with TellStick fails due to timeout or actual error. 2012-01-12 11:39:04 +01:00
Stefan Persson
8d22eff5da Added wait for ack on noop-command 2012-01-11 11:38:03 +01:00
Stefan Persson
673daf471d Sending noop to TellStick every 5 minutes, attempting to reconnect if TellStick is missing. In Linux. 2012-01-10 16:00:14 +01:00
Stefan Persson
06ac023b4a Resetting USB and retrying send once if TellStick is not found, in Linux 2012-01-10 09:55:26 +01:00
Stefan Persson
bf4589fb0f Code cleanup, printouts removed 2011-03-03 16:00:49 +00:00
Micke Prag
cccaf86cb8 Made it possible to specify a serial to a controller to disconnect. This controller will be disconnected even if it is still available 2011-03-03 11:21:41 +00:00
Micke Prag
72ad39381e Loop to remove all controllers 2010-10-29 10:13:51 +00:00
Micke Prag
00b7713761 Removed debug message 2010-10-28 09:19:18 +00:00
Micke Prag
4e9b4a55e5 Added controllerId 2010-10-25 14:42:08 +00:00
Stefan Persson
a9f8acc063 More consistent locks 2010-10-21 11:36:51 +00:00
Micke Prag
e68c3b8bca Iterator cannot be const if we want to erase something from it 2010-10-20 13:49:08 +00:00
Micke Prag
4dd2e24972 Added an event for controllers to signal. 2010-10-20 13:27:53 +00:00
Micke Prag
2e02e3724c Remove controllers when they are disconnected. 2010-10-15 13:51:52 +00:00
Micke Prag
6d7fc0cdee Add the controller when it's found. 2010-10-15 13:32:02 +00:00
Micke Prag
800e0f7a9a Added a check so we don't open a controller twice. 2010-10-15 13:31:23 +00:00
Micke Prag
1c8667f4f8 Iterate over a const iterator. 2010-10-15 13:30:34 +00:00
Micke Prag
dfa1a2e897 Added function stub ControllerManager::deviceInsertedOrRemoved() 2010-10-15 12:38:04 +00:00
Micke Prag
41ff18ca45 Added listlock for ControllerManager 2010-10-15 12:37:16 +00:00
Stefan Persson
579f42568e Code cleanup, some changed in lock and turnoff implemented. 2010-10-14 11:54:05 +00:00
Micke Prag
008feec1c3 Rewrote the TellStick controller 2010-10-13 12:23:01 +00:00