hal/external/tellstick-core/ProtocolComen.cpp
Ziver Koc 2df55ef214 Added Oregon protocoll
Former-commit-id: ad6e4110a0338bdc1190f593cb3bd1c64ac4965c
2015-11-19 01:27:18 +01:00

23 lines
646 B
C++
Executable file

//
// Copyright (C) 2012 Telldus Technologies AB. All rights reserved.
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "service/ProtocolComen.h"
#include <string>
int ProtocolComen::methods() const {
return (TELLSTICK_TURNON | TELLSTICK_TURNOFF | TELLSTICK_LEARN);
}
int ProtocolComen::getIntParameter(const std::wstring &name, int min, int max) const {
if (name.compare(L"house") == 0) {
int intHouse = Protocol::getIntParameter(L"house", 1, 16777215);
// The last two bits must be hardcoded
intHouse <<= 2;
intHouse += 2;
return intHouse;
}
return Protocol::getIntParameter(name, min, max);
}