Adding a name to the LIFX controller

This commit is contained in:
Chris
2022-08-08 02:02:43 +10:00
parent 223ec45a75
commit 4d7fe885c9
5 changed files with 28 additions and 7 deletions

View File

@@ -11,8 +11,10 @@
using json = nlohmann::json;
using namespace std::chrono_literals;
LIFXController::LIFXController(std::string ip)
LIFXController::LIFXController(std::string ip, std::string name)
{
this->name = name;
/*-----------------------------------------------------------------*\
| Fill in location string with device's IP address |
\*-----------------------------------------------------------------*/
@@ -36,7 +38,7 @@ std::string LIFXController::GetLocation()
std::string LIFXController::GetName()
{
return("LIFX");
return(name);
}
std::string LIFXController::GetVersion()