mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Implemented LightFX game model
This commit is contained in:
1 parent
f0b0df28b3
commit
a043068033
6 files changed
+69
-16
No files matched your search
@@ -20,14 +20,11 @@ LightFxState::~LightFxState()
|
||||
|
||||
json LightFxState::GetJson()
|
||||
{
|
||||
json root;
|
||||
json j;
|
||||
root["lightFxState"] = { j };
|
||||
|
||||
j["game"] = Game;
|
||||
j["mask"] = {
|
||||
{ "location", LocationMask },
|
||||
{ "light", LocationMaskLight->GetJson() }
|
||||
{"location", LocationMask},
|
||||
{"light", LocationMaskLight->GetJson()}
|
||||
};
|
||||
j["devices"] = {};
|
||||
for (LightFxDevice* device : Devices)
|
||||
@@ -35,5 +32,5 @@ json LightFxState::GetJson()
|
||||
j["devices"].push_back(device->GetJson());
|
||||
}
|
||||
|
||||
return j;
|
||||
return json{{"lightFxState", j}};
|
||||
}
|
||||
@@ -80,8 +80,8 @@ FN_DECLSPEC LFX_RESULT STDCALL LFX_Update()
|
||||
Transmit(j.dump().c_str());
|
||||
|
||||
// Only bother dumping it indented if actually debugging
|
||||
if (FILELog::ReportingLevel() == logDEBUG1)
|
||||
FILE_LOG(logDEBUG1) << "JSON: " << j.dump(4);
|
||||
if (FILELog::ReportingLevel() == logDEBUG1)
|
||||
FILE_LOG(logDEBUG1) << "JSON: " << j.dump(4);
|
||||
|
||||
return LFX_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user