krausyao
08-11-2008, 04:44 PM
When would you use a two head permissive signal that is not junction linked?
Signal SL 2Hd Permissive SL2per.s does not have junction links that can be set in route editor. When this is the last signal on the track before a switch the top signal shows yellow approach 1 and the bottom signal shows red stop and proceed. The top signal is showing approach 1 because next_sig_lr returns SIGASP_STOP when there are no signals before the end of the track.
After using debug statements the reason the bottom signal is stop and proceed is that block_state is returning different results for the two heads on the same mast. For the top head it returns BLOCK_CLEAR and for the bottom head it returns BLOCK_OCCUPIED. Both heads return route_set of true for either position of the switch.
The code for the top head SL3ColorB and the bottom head SL3ColorC both calculate the same indication. They differ in setting draw state based on has_approach_limited or has_approach_slow, which are user signal features, for indication SIGASP_APRROACH_2.
Edit: The script for the bottom head is being calculated for both tracks beyond the switch. It was reporting occupied because my train was on one of the tracks and not the other. The train was coming from the convering side of the switch and then reversed but never went past the signal before the diverging side of the switch.
Edit: The script showed unoccupied for the first two debug frames which is before the train was placed on the tracks at game start. The following four debug frames show occupied for both heads as expected.
Edit: This signal would be used before a switch with one additional signal between this signal and the switch. If the switch was set for the main that signal would have state SIGASP_CLEAR_2 and this signal would also be SIGASP_CLEAR_2 and show green over red.
Signal SL 2Hd Permissive SL2per.s does not have junction links that can be set in route editor. When this is the last signal on the track before a switch the top signal shows yellow approach 1 and the bottom signal shows red stop and proceed. The top signal is showing approach 1 because next_sig_lr returns SIGASP_STOP when there are no signals before the end of the track.
After using debug statements the reason the bottom signal is stop and proceed is that block_state is returning different results for the two heads on the same mast. For the top head it returns BLOCK_CLEAR and for the bottom head it returns BLOCK_OCCUPIED. Both heads return route_set of true for either position of the switch.
The code for the top head SL3ColorB and the bottom head SL3ColorC both calculate the same indication. They differ in setting draw state based on has_approach_limited or has_approach_slow, which are user signal features, for indication SIGASP_APRROACH_2.
Edit: The script for the bottom head is being calculated for both tracks beyond the switch. It was reporting occupied because my train was on one of the tracks and not the other. The train was coming from the convering side of the switch and then reversed but never went past the signal before the diverging side of the switch.
Edit: The script showed unoccupied for the first two debug frames which is before the train was placed on the tracks at game start. The following four debug frames show occupied for both heads as expected.
Edit: This signal would be used before a switch with one additional signal between this signal and the switch. If the switch was set for the main that signal would have state SIGASP_CLEAR_2 and this signal would also be SIGASP_CLEAR_2 and show green over red.