Merge remote branch 'erijo/get-controller-value'. This closes #202.
Conflicts: telldus-core/client/telldus-core.cpp
This commit is contained in:
commit
f57eebad74
2 changed files with 6 additions and 2 deletions
|
@ -1198,8 +1198,8 @@ int WINAPI tdController(int *controllerId, int *controllerType, char *name, int
|
|||
}
|
||||
|
||||
/**
|
||||
* This function gets a parameter on a controller. Valid parameters are: @c
|
||||
* serial and @c firmware
|
||||
* This function gets a parameter on a controller.
|
||||
* Valid parameters are: \c serial, \c name, \c available and \c firmware
|
||||
*
|
||||
* @param[in] controllerId
|
||||
* The controller to change.
|
||||
|
|
|
@ -278,6 +278,10 @@ std::wstring ControllerManager::getControllerValue(int id, const std::wstring &n
|
|||
}
|
||||
if (name == L"serial") {
|
||||
return it->second.serial;
|
||||
} else if (name == L"name") {
|
||||
return it->second.name;
|
||||
} else if (name == L"available") {
|
||||
return it->second.controller ? L"1" : L"0";
|
||||
} else if (name == L"firmware") {
|
||||
if (!it->second.controller) {
|
||||
return L"-1";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue