Hairy Animal
Member
I hope this is trivial, but I've been trying for a whole day now to discover why something's not happening and have tracked it down eventually to a bit variable getting set when I'm not expecting it to.
The much abbreviated code is:
Using SERTXD (thanks to whoever suggested that recently) I can see that the bit variable "stp_state" = 1 until the program comes into this section when fwd_thrtl = 1.
While the program stays in the DO UNTIL loop, stp_state should still be 1, but it seems to get set to 0 which results in things not happening when they should. It appears therefore that the code outside the DO LOOP is being executed at least once.
Does anyone know if this is this possible please? Or have I made a mistake somewhere else (quite possible!)?
The much abbreviated code is:
Code:
IF fwd_thrtl = 1 THEN ; the throttle has been moved into the forward position.
;
DO UNTIL Fwd_pb = 1 OR fwd_thrtl = 0
GOSUB eval_jystk ; update throttle position in case
; it's returned to centre
LOOP
;
stp_state = 0
GOTO jsf_active ; enter the jsf_active loop
ENDIF
While the program stays in the DO UNTIL loop, stp_state should still be 1, but it seems to get set to 0 which results in things not happening when they should. It appears therefore that the code outside the DO LOOP is being executed at least once.
Does anyone know if this is this possible please? Or have I made a mistake somewhere else (quite possible!)?