Elvas Tower: Distantsignal at same pole with Normalsignal doesn't open in Manual-Mode - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Distantsignal at same pole with Normalsignal doesn't open in Manual-Mode Rate Topic: -----

#1 User is offline   eugenR 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 472
  • Joined: 15-April 13
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 23 December 2016 - 06:14 AM

If in ManualMode a Distantsignal at the same pole with a Normalsignal before a switch
ask the state of the next signal type NORMAL ( behind the switch)
with the function next_sig_lr (SIGFNTYPE_NORMAL) it get always STOP as answer.

The same Distandsignal stand alone, with the same script work fine.

At the Bugreport here:
https://bugs.launchp...or/+bug/1650012
I have attached a Testroute and pictures

#2 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,025
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 23 December 2016 - 07:33 AM

I have checked.
The problem arises during execution of this else if clause within sigscr.dat
else if (next_state ==# SIGASP_CLEAR_2)	

and in particular in calculation of next_state, that is
next_state = next_sig_lr (SIGFN_NORMAL);

Within the OR code this calls next_sig_lr(MstsSignalFunction fn_type) .
Within this method sigfound[(int)fn_type] for fn_type equal to SIGFN_NORMAL is -1, because in Manual Mode sigfound is not routinely computed. The method then calls SONextSignal(fn_type) to find sigfound. However SONextSignal returns -1 if the "starting" signal is NORMAL and the request is for next NORMAL signal. This explains why in the test route the standalone distant signal works correctly, while the composed distant signal+normal signal does not work well.
Instead of modifying the delicate signal code, I have preferred to routinely compute sigfound within the method CheckManualPath of train.cs, and have implemented this patch:
Attached File  Train_nextsignal.cs.patch.zip (575bytes)
Number of downloads: 190
This is the .dll to be replaced within x.3714
Attached File  Orts.Simulation.dll.zip (386.66K)
Number of downloads: 193

I wonder if the same should be done with method CheckExplorerPath.

If there are no objections, I have the intention to commit the patch.

#3 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 7,025
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 26 December 2016 - 07:02 AM

Fixed in x.3718.

#4 User is offline   eugenR 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 472
  • Joined: 15-April 13
  • Gender:Male
  • Simulator:MSTS
  • Country:

Posted 27 December 2016 - 03:40 AM

View PostCsantucci, on 26 December 2016 - 07:02 AM, said:

Fixed in x.3718.

Hi Carlo, It work fine.
So I can let this old minor Signal-Problem in the old Year!

Thank You
Eugen

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users