sensorATriggered boolean = false;
if (currStateA! = prevStateA)And what happened when you tried to compile it?
if (currStateA! = prevStateA)