Code: Select all
global_inCar=true;
Code: Select all
global_inCar = false;
The alternative is to maintain two multiple trigger conditions, one for Connected and another for Disconnected, but I thought sharing a list between the two would be neater.
Moderator: Martin
Code: Select all
global_inCar=true;
Code: Select all
global_inCar = false;
Code: Select all
if (isList(connected_devices_names))
{
for (c in global_list_cars)
{
inCar=containsElement(connected_devices_names, c);
if (inCar)
{
break;
}
}
if (global_state_inCar!=inCar)
{
global_state_inCar=inCar;
}
}
else
{
global_state_inCar=false;
log("NOT A LIST: connected_devices_names");
}