@@ -87,13 +87,15 @@ bool LightBoxInterface::updateProperties()
87
87
{
88
88
m_DefaultDevice->defineProperty (LightSP);
89
89
m_DefaultDevice->defineProperty (LightIntensityNP);
90
+ if (!FilterIntensityNP.isEmpty ())
91
+ m_DefaultDevice->defineProperty (FilterIntensityNP);
90
92
}
91
93
else
92
94
{
93
95
m_DefaultDevice->deleteProperty (LightSP);
94
96
m_DefaultDevice->deleteProperty (LightIntensityNP);
95
97
96
- if (FilterIntensityNP.count () > 0 )
98
+ if (! FilterIntensityNP.isEmpty () )
97
99
m_DefaultDevice->deleteProperty (FilterIntensityNP);
98
100
}
99
101
@@ -197,7 +199,7 @@ bool LightBoxInterface::processText(const char *dev, const char *name, char *tex
197
199
if (!ActiveDeviceTP[0 ].isEmpty ())
198
200
{
199
201
IDSnoopDevice (ActiveDeviceTP[0 ].getText (), " FILTER_SLOT" );
200
- IDSnoopDevice (ActiveDeviceTP[0 ].text , " FILTER_NAME" );
202
+ IDSnoopDevice (ActiveDeviceTP[0 ].getText () , " FILTER_NAME" );
201
203
}
202
204
// If filter removed, remove presets
203
205
else
@@ -236,13 +238,15 @@ bool LightBoxInterface::SetLightBoxBrightness(uint16_t value)
236
238
// //////////////////////////////////////////////////////////////////////////////////////////////////////
237
239
bool LightBoxInterface::snoop (XMLEle *root)
238
240
{
239
- // If dimming not supported, we return
240
- if (!(m_Capabilities & CAN_DIM))
241
+ auto deviceName = findXMLAttValu (root, " device" );
242
+
243
+ // If dimming not supported or not our device, we return
244
+ if (!(m_Capabilities & CAN_DIM) || strcmp (ActiveDeviceTP[0 ].getText (), deviceName))
241
245
return false ;
242
246
243
- XMLEle *ep = nullptr ;
244
- const char * propTag = tagXMLEle (root);
245
- const char * propName = findXMLAttValu (root, " name" );
247
+ XMLEle *ep = nullptr ;
248
+ auto propTag = tagXMLEle (root);
249
+ auto propName = findXMLAttValu (root, " name" );
246
250
247
251
if (!strcmp (propTag, " delProperty" ))
248
252
return false ;
@@ -273,6 +277,7 @@ bool LightBoxInterface::snoop(XMLEle *root)
273
277
if (isDifferent)
274
278
{
275
279
m_DefaultDevice->deleteProperty (FilterIntensityNP);
280
+ FilterIntensityNP.resize (0 );
276
281
}
277
282
else
278
283
return false ;
0 commit comments