Switch to recording the actual wire state

…rather than the inverse pin state