Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: Motion Event Running Twice?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Dean, 

I was experimenting with building a tragectory of my motion sensed location. 

I have a variable driver field called lastknownposition. Each time I go through a motion sensor it updates with that zones location id. 

So I decided to build a history, by creating a second field called previousknownposition. 

In the motion event I update the previous with the last and then update the last, but what is happenening is that for a second it's working then after 5 seconds the prev gets updated with the last. Not desired, obviously. 

I put a pause(1000ms) in there in case a race situation was occuring, but that didnt do anything. 

EventDump shows: 

EvID=976FB93961A74C47-91154AEABB4A0249
cqsl.header
{
    v=1
    sysid=A4EC6719AFC37DC2-552EE5D99872167E
    class=cqsl.motion
    source=cqsl.field:ELK.MOT#LFTPiv
}
cqsl.motioninfo
{
    type=start
    sensornum=56
    name=LFTPiv
}

EvID=976FB93961A74C47-91154AEABB4A024A
cqsl.header
{
    v=1
    sysid=A4EC6719AFC37DC2-552EE5D99872167E
    class=cqsl.fldchange
    source=cqsl.field:LogicSrv.MotionDetected
}
cqsl.fldval
{
    val=True
}

EvID=976FB93961A74C47-91154AEABB4A024B
cqsl.header
{
    v=1
    sysid=A4EC6719AFC37DC2-552EE5D99872167E
    class=cqsl.motion
    source=cqsl.field:ELK.MOT#LFTPiv
}
cqsl.motioninfo
{
    type=end
    sensornum=56
    name=LFTPiv
}

Any idea what might be going on?
One of them is the start of motion and one of them is the end of motion. So you want to filter for a motion start event and ignore the motion end. So just add another filter to the event to check for start motion, in addition to the one you are doing to check for a specific motion field.
(07-31-2017, 08:03 PM)Dean Roddey Wrote: [ -> ]One of them is the start of motion and one of them is the end of motion. So you want to filter for a motion start event and ignore the motion end. So just add another filter to the event to check for start motion, in addition to the one you are doing to check for a specific motion field.

Boom. That worked. 

Thanks