currently it is probably like this
b=0
do rf stuff
b=1
but if you want it to not happen if lt is pulled it would be something like this
if lt=0 then
b=0
endif
do rf stuff
b=1
now since I dont know what language you are making it in I just wrote this out in psudo basic, but you should be able to translate this into whatever language you are using