gpz, on 09 May 2014 - 04:03 AM, said:
After reading about it, it seems that these are not the same indeed. I read that the most used english term is "overcharge".
You may rename the varible if you know it is wrong. There is currently no brake system maintainer in OR team, you seem to have the most knowledge among the members. :rofl:
I've searched on the internet about the word you found. Seems like it's the correct one. I'll rename it for my next version.
And the main experience I have in the brake system is because I worked on the model of a French metro : the NeoVAL of Siemens. I recoded a big part of its brake system (the pneumatic part).
For the UIC brake system operation, I use a French website created by an Alstom engineer, most of the time.
But I really like to work on the rolling stock (because of what I did at Siemens) and the signalling (because that's my current job :bravo: ).
So maybe you can assign me as the brake system maintainer... but I will be very likely to code some other things for other systems (mainly on the rolling stock (such as the circuit breaker) and things on the ground that use electricity (I would love to be able to put substations along the track and to be able to decrease the voltage of the overhead wire during the acceleration of my train :oldstry: )).
gpz, on 08 May 2014 - 10:22 PM, said:
Serana, one more thing I dislike about the new braking API, which I haven't noticed before for whatever reason, is the GetStatus() method. In my opinion it shouldn't return strings, because (beyond that this form of handling looks kinda primitive) they are unlocalizable, and the strings are also redundant, since the same strings (except the emergency push-button and emerg. tcs) are already available in their localized form in MSTSNotch.GetName(). (Your script's "Overload" might be the same as MSTSNotchType.Suppression, isn't it?)
These two enumerations should be "merged" somehow by a new enum IMHO, and both the script's GetStatus() and the MSTSNotch.GetName() should end up using this common enum, and only the main program code should decode it to a string. (I haven't investigated this issue in details just started thinking on it...)
I will move the MSTSNotchType enum in the ORTS.Scripting.Api namespace (otherwise, we won't be able to use it in the scripts) and rename it to ControllerState (if we add the TCS values, they won't be notch types any more).
I will also add a dictionary that will contain the strings. In the keys, there will be the ControllerState values.
The GetStatus of the script will return a ControllerState value.
The GetStatus of BrakeController will return the string associated to the state using the dictionary.
gpz, on 09 May 2014 - 01:09 AM, said:
And sorry for arguing continuously, but I found one more thing. I think it is also a mistake to "outsource" the SetRDPercent. We cannot require from 3rd-party script developers to handle RailDriver correctly, considering that many of them haven't even seen one. So I think this should go back to main code too.
What is worse is that some generic functions in MSTSLocomotive use "RD specific" function : SetTrainBrakePercent, for example, uses SetRDPercent of BrakeController !
I will rename those SetRDPercent functions to SetPercent because they might be useful for other things some day.
On the notch controller side, it's weird that the code of SetRDPercent is not using the SetValue function. I would have done something like "find the associated value" and then "use SetValue".
Since it's probable that we may have new input devices, maybe we should find some way to create an input device plug-in interface. That way, all Rail Driver related code will be in a plug-in.