fix for setting pin state with whole number pid output