Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poor mans switch panel on tablet #831

Merged
merged 22 commits into from Sep 19, 2023

Conversation

sweiland-openrails
Copy link
Contributor

@sweiland-openrails sweiland-openrails commented May 8, 2023

Basically it's a webpage with 10 times 4 buttons. Buttons for instance for closing doors, direction, switching front light etc. Buttons also contain a label with the status. For doors: closed, opening, open and closing. Blinks red when doors are open and train moves. Hard to implement this with real hardware. I display this webpage on a tablet sitting between the keyboard and monitor.

I'm using the keyboard for brakes, forward, etc. The keys you need every second. Different keys can be shown on the tablet for different types of locomotives: steam, diesel or electric. There are not much buttons for steam engines yet.

Implementing the websocket part is rather clean and not that much code. The same for firing the action in Open Rails when pushing the button on the tablet. However determining the status needs a lot of code, as there is no such thing in Open Rails. But not all buttons would need a status displayed, for instance subwindows like map, track monitor etc. would not need it.

I hope this does not interfere with existing OR web solutions. I saw for instance that César recently created a "Using Arduino devices with Open Rails" change. If it does gives problems undo the PR, no problem.

https://trello.com/c/1EISQgFg/566-poor-mans-switch-panel

@sweiland-openrails sweiland-openrails marked this pull request as draft May 8, 2023 18:44
twpol pushed a commit that referenced this pull request May 8, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at 2388225: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 745d101: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at b9350ff: Electric locomotive hot start
- Pull request #831 at 6a319a8: preliminary version switchpanel on tablet
@cesarBLG
Copy link
Contributor

cesarBLG commented May 9, 2023

That's really nice! It's great that you used WebSockets. I'll study your code to see if we can build an standarized API using them. Now I'm using GET and POST requests which are probably slow for some purposes.

I don't think my changes will conflict with yours, but I'd suggest you take advantage from them. I created the ExternalDeviceState and ExternalDeviceButton classes, which already manage IsPressed, IsUp, IsDown, etc. for you. You could inherit your SwitchPanel from them, which would unify all devices. Then, instead of adding SwitchPanelModule.IsPressed() to MSTSLocomotiveViewer, you would add it to the UserInput.IsPressed function. You can follow the example of the RailDriver class, which I refactored so that RailDriver and WebDeviceState share common code.

@sweiland-openrails
Copy link
Contributor Author

Thanks for looking into my changes.

Yes, I think websockets are faster and more reliable. But one would need a websocket implementation for the Arduino. Looks like that's available. Also for the ESP32, my preferred MCU as it has WIFI onboard.

I'm not so good with GIT, so I might wait with your suggestions until after my enhancement is merged, but I'll give it a try. Should I pull master into my local branch? So that I see your changes you made in PR 715 locally and can react on that?

@cesarBLG
Copy link
Contributor

Yes, I think websockets are faster and more reliable. But one would need a websocket implementation for the Arduino. Looks like that's available. Also for the ESP32, my preferred MCU as it has WIFI onboard.

I'm using a bridge program which converts information from the OR interface to serial port data, so this is not a problem. Websockets would probably add too much overhead for the MCU, and they cannot be used with non-Wifi boards. Using an Arduino Mega + Serial Port bridge is great because it's cheap but you get lots of GPIO, which is what you need for a cab desk.

I'm not so good with GIT, so I might wait with your suggestions until after my enhancement is merged, but I'll give it a try. Should I pull master into my local branch? So that I see your changes you made in PR 715 locally and can react on that?

You should update your master branch using "git pull" (you have to ensure that you pull from openrails/openrails and not from your fork sweiland-openrails/openrails, otherwise you won't update anything). Then you switch to the SwitchPanel branch and perform a "git merge master"

It is usually a good idea that you update your master branch before creating a new branch from it. This allows you to start working from the most recent codebase, and will reduce the possiblity of conflicting with other changes.

In this case my suggestion of merging my changes is not because of conflicts (I think there aren't any, since the Unstable version contains your panel), but because I think it would simplify the code a bit.

I'm surprised that you had to create a function for every control you're inserting to the panel. This means that whenever we add a new control, the interface would need to be updated. Do you think there is a solution that gets all data automatically?

twpol pushed a commit that referenced this pull request May 10, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at 2388225: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 745d101: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at b9350ff: Electric locomotive hot start
- Pull request #831 at 10aa2f3: preliminary version switchpanel on tablet
twpol pushed a commit that referenced this pull request May 12, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at 2388225: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 745d101: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at b9350ff: Electric locomotive hot start
- Pull request #831 at 10aa2f3: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
twpol pushed a commit that referenced this pull request May 12, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 745d101: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at b9350ff: Electric locomotive hot start
- Pull request #831 at 10aa2f3: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
twpol pushed a commit that referenced this pull request May 12, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 745d101: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at 280ee74: Electric locomotive hot start
- Pull request #831 at 10aa2f3: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
twpol pushed a commit that referenced this pull request May 14, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 745d101: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at 280ee74: Electric locomotive hot start
- Pull request #831 at 10aa2f3: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
- Pull request #833 at d708fee: Implement brake relay valve
twpol pushed a commit that referenced this pull request May 14, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 0d2162a: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at 280ee74: Electric locomotive hot start
- Pull request #831 at 10aa2f3: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
- Pull request #833 at d708fee: Implement brake relay valve
- Pull request #834 at 7a98eca: Replaces email service with FormSpark
twpol pushed a commit that referenced this pull request May 16, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 0d2162a: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at 280ee74: Electric locomotive hot start
- Pull request #831 at 10aa2f3: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
- Pull request #833 at ea5a3b4: Implement brake relay valve
- Pull request #834 at 7a98eca: Replaces email service with FormSpark
twpol pushed a commit that referenced this pull request May 16, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 0d2162a: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at 280ee74: Electric locomotive hot start
- Pull request #831 at 10aa2f3: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
- Pull request #833 at 0679592: Implement brake relay valve
- Pull request #834 at 7a98eca: Replaces email service with FormSpark
twpol pushed a commit that referenced this pull request May 17, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 0d2162a: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at 280ee74: Electric locomotive hot start
- Pull request #831 at c8927a4: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
- Pull request #833 at 0679592: Implement brake relay valve
- Pull request #834 at 7a98eca: Replaces email service with FormSpark
@sweiland-openrails
Copy link
Contributor Author

I'm using a bridge program which converts information from the OR interface to serial port data, so this is not a problem. Websockets would probably add too much overhead for the MCU, and they cannot be used with non-Wifi boards. Using an Arduino Mega + Serial Port bridge is great because it's cheap but you get lots of GPIO, which is what you need for a cab desk.

Yes, I know. For my modeltrains I use two atmega32's for controlling the 2*28 leds on my layout. Leds in houses switched on/off randomly etc. Connected to a rpi zero for programming and controlling.

You should update your master branch using "git pull" (you have to ensure that you pull from openrails/openrails and not from your fork sweiland-openrails/openrails, otherwise you won't update anything). Then you switch to the SwitchPanel branch and perform a "git merge master"

succeeded, thanks.

I'm surprised that you had to create a function for every control you're inserting to the panel. This means that whenever we add a new control, the interface would need to be updated. Do you think there is a solution that gets all data automatically?

The controls on this panel are only a subset. I would not expect every new control has to be added. And needing custom code because first of all you need to place the button in the 4 times 10 matrix. And needing a description, which cannot be found in Open Rails. And for some controls I have two buttons instead of one. For instance gear up and down. However, I have enhanced this code a bit. I removed the extra function in between. And created a default function for most buttons, grabbing the description from the UserCommand enum. I hope this works ok for translations, have not yet seen a translated Open Rails, should gather some knowledge about this. For retrieving the status there is also much code.

I don't think my changes will conflict with yours, but I'd suggest you take advantage from them. I created the ExternalDeviceState and ExternalDeviceButton classes, which already manage IsPressed, IsUp, IsDown, etc. for you. You could inherit your SwitchPanel from them, which would unify all devices.

Code does not conflict. In my last commit I removed the IsPressed, only the IsUp and IsDown are left. I did not succeed in enhancing my code with your suggestion. That's yet too complicated for me. I might learn enough in the future to give it another try. Back in 1981 when I started programming as a career there was no object oriented programming... just Cobol.

@cesarBLG
Copy link
Contributor

The controls on this panel are only a subset. I would not expect every new control has to be added. And needing custom code because first of all you need to place the button in the 4 times 10 matrix. And needing a description, which cannot be found in Open Rails. And for some controls I have two buttons instead of one. For instance gear up and down. However, I have enhanced this code a bit. I removed the extra function in between. And created a default function for most buttons, grabbing the description from the UserCommand enum. I hope this works ok for translations, have not yet seen a translated Open Rails, should gather some knowledge about this. For retrieving the status there is also much code.

I see, thanks. It's great that you managed to add a default function for most buttons.

Code does not conflict. In my last commit I removed the IsPressed, only the IsUp and IsDown are left. I did not succeed in enhancing my code with your suggestion. That's yet too complicated for me. I might learn enough in the future to give it another try. Back in 1981 when I started programming as a career there was no object oriented programming... just Cobol.

Don't worry, I'll take a look at it later. Why are you using IsDown/IsUp here instead of IsPressed/IsReleased? The code expects the command to be triggered only once, but IsDown/IsUp return true as long as the relevant button is kept pressed/released

UserInput.IsPressed(command) || SwitchPanelModule.IsDown(command)

@sweiland-openrails
Copy link
Contributor Author

Why are you using IsDown/IsUp here instead of IsPressed/IsReleased?

At first for every key I decided whether it needed a IsPressed (for instance Control Door) or Isdown/IsUp. The last one was to be used for instance for the Sander button, which should be on as long as the button is pressed. Then I decided to test the IsDown/IsUp for both situations, reasoning that the IsDown is more or less the same as the IsPressed. And it worked, at least with the way I coded the javascript for the tablet. So less code leaving out the IsPressed. Might be I use the wrong names. In javascript the events are touchstart and touchend.

@cesarBLG
Copy link
Contributor

cesarBLG commented May 18, 2023

You should always use IsPressed/IsReleased for any type of control, regardless of whether it has to be continuously pressed (e.g. Sander) or not (e.g. pantograph). That is handled internally in the Input code. Your SwitchPanel should implement the following methods:

  • IsPressed: returns true only once, just after the button is pressed
  • IsReleased: returns true only once, just after the button is released
  • IsDown: returns true as long as the button is kept pressed

Also, you don't need to add SwitchPanelModule.IsDown(command) here

if (UserInput.IsPressed(command) || SwitchPanelModule.IsDown(command))

because UserInput.IsPressed() already contains a call for SwitchPanelModule.IsDown(), so this is redundant.

I think your logic is correct, but you are using different names: IsDown for IsPressed, and IsUp for IsReleased. It would be better to keep the same names in order to not confuse other developers.

twpol pushed a commit that referenced this pull request May 19, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 0d2162a: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at 280ee74: Electric locomotive hot start
- Pull request #831 at c8927a4: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
- Pull request #833 at 0679592: Implement brake relay valve
- Pull request #834 at 7a98eca: Replaces email service with FormSpark
- Pull request #835 at 86b0c1e: Correct Brake Shoe Force Calculation
twpol pushed a commit that referenced this pull request May 19, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 0d2162a: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at 280ee74: Electric locomotive hot start
- Pull request #831 at c8927a4: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
- Pull request #833 at 0679592: Implement brake relay valve
- Pull request #834 at 7a98eca: Replaces email service with FormSpark
- Pull request #835 at 366c96e: Correct Brake Shoe Force Calculation
twpol pushed a commit that referenced this pull request May 19, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 0d2162a: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at 280ee74: Electric locomotive hot start
- Pull request #831 at c8927a4: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
- Pull request #833 at 01aaca7: Implement brake relay valve
- Pull request #834 at 7a98eca: Replaces email service with FormSpark
- Pull request #835 at 366c96e: Correct Brake Shoe Force Calculation
twpol pushed a commit that referenced this pull request May 21, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 0d2162a: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at 280ee74: Electric locomotive hot start
- Pull request #831 at c8927a4: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
- Pull request #833 at 01aaca7: Implement brake relay valve
- Pull request #834 at 7a98eca: Replaces email service with FormSpark
- Pull request #835 at 2702520: Correct Brake Shoe Force Calculation
twpol pushed a commit that referenced this pull request May 21, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 0d2162a: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at 280ee74: Electric locomotive hot start
- Pull request #831 at c8927a4: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
- Pull request #833 at 01aaca7: Implement brake relay valve
- Pull request #834 at 7a98eca: Replaces email service with FormSpark
- Pull request #835 at 8b4e134: Correct Brake Shoe Force Calculation
twpol pushed a commit that referenced this pull request May 22, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 0d2162a: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at 280ee74: Electric locomotive hot start
- Pull request #831 at c8927a4: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
- Pull request #833 at 01aaca7: Implement brake relay valve
- Pull request #834 at 7a98eca: Replaces email service with FormSpark
- Pull request #835 at 8b4e134: Correct Brake Shoe Force Calculation
- Pull request #836 at 62e6d02: Adds policy on crashes and derailments
twpol pushed a commit that referenced this pull request May 23, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 0d2162a: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at 280ee74: Electric locomotive hot start
- Pull request #831 at c8927a4: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
- Pull request #833 at 01aaca7: Implement brake relay valve
- Pull request #834 at 7a98eca: Replaces email service with FormSpark
- Pull request #835 at 8b4e134: Correct Brake Shoe Force Calculation
- Pull request #836 at 62e6d02: Adds policy on crashes and derailments
- Pull request #837 at 0497316: copies website policies to repo
twpol pushed a commit that referenced this pull request May 23, 2023
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #757 at d9d75f4: Unify RailDriver code implementations
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at 7fdad38: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 0d2162a: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves
- Pull request #830 at ceeaba7: Electric locomotive hot start
- Pull request #831 at c8927a4: preliminary version switchpanel on tablet
- Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake
- Pull request #833 at 01aaca7: Implement brake relay valve
- Pull request #834 at 7a98eca: Replaces email service with FormSpark
- Pull request #835 at 8b4e134: Correct Brake Shoe Force Calculation
- Pull request #836 at 62e6d02: Adds policy on crashes and derailments
- Pull request #837 at 0497316: copies website policies to repo
twpol pushed a commit that referenced this pull request Sep 10, 2023
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations
- Pull request #831 at 3e672a8: poor mans switch panel on tablet
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #841 at 410a585: https://blueprints.launchpad.net/or/+spec/animating-trainset-windows
- Pull request #853 at d05f581: Notify out of focus
- Pull request #855 at b39e5d8: Adds new route from TrainSimulations
- Pull request #857 at 9afc8c3: Adding Air Flow Meters
- Pull request #863 at a34b857: Alternate preset 3D cabviewpoints
- Pull request #864 at e71bc5a: Fixes for Undesired Emergency Applications
- Pull request #865 at 776d6df: Dispatcher window improvements
- Pull request #866 at c15333e: Fix Articulation For 0-Axle Train Cars
- Pull request #870 at 5cb32fa: Fix water restore
- Pull request #871 at c2388e6: Signal aspects are multiplied when reopening Dispatcher Window
- Pull request #872 at 00c5b8b: Fix Retainer State Disappearing from HUD on Restore
@sweiland-openrails
Copy link
Contributor Author

dear César,

Would you find some time to review this enhancement? As you have already looked into into the code. I've asked Mauricio also. As he was mentioning this PR in a welcome Elvas Tower message. Still trying to find my way into the code and the review process. Don't hesitate to tell if I'm doing something wrong.

I did not yet have any comment from users testing the unstable version. Do not know why.

regards, Siebren.

@cesarBLG
Copy link
Contributor

Sure, I'll review it as soon as possible. I have no idea about JavaScript, but I'll try my best.

@sweiland-openrails sweiland-openrails added the for-unstable Special label to include a pull request in the Unstable Version label Sep 11, 2023
Copy link
Contributor

@cesarBLG cesarBLG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a couple of suggestions, but nothing really serious.

Trello card isn't sorted, so I cannot approve yet.

twpol pushed a commit that referenced this pull request Sep 14, 2023
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations
- Pull request #831 at 3e672a8: poor mans switch panel on tablet
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #841 at 410a585: https://blueprints.launchpad.net/or/+spec/animating-trainset-windows
- Pull request #853 at d05f581: Notify out of focus
- Pull request #855 at b39e5d8: Adds new route from TrainSimulations
- Pull request #857 at 9afc8c3: Adding Air Flow Meters
- Pull request #863 at a34b857: Alternate preset 3D cabviewpoints
- Pull request #864 at e71bc5a: Fixes for Undesired Emergency Applications
- Pull request #865 at 776d6df: Dispatcher window improvements
- Pull request #866 at c15333e: Fix Articulation For 0-Axle Train Cars
- Pull request #870 at 5cb32fa: Fix water restore
- Pull request #873 at cf0ed99: Reduce allocations in signal script
twpol pushed a commit that referenced this pull request Sep 14, 2023
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations
- Pull request #831 at 3e672a8: poor mans switch panel on tablet
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #841 at 410a585: https://blueprints.launchpad.net/or/+spec/animating-trainset-windows
- Pull request #853 at d05f581: Notify out of focus
- Pull request #855 at b39e5d8: Adds new route from TrainSimulations
- Pull request #857 at 9afc8c3: Adding Air Flow Meters
- Pull request #863 at a34b857: Alternate preset 3D cabviewpoints
- Pull request #864 at e71bc5a: Fixes for Undesired Emergency Applications
- Pull request #865 at 776d6df: Dispatcher window improvements
- Pull request #866 at c15333e: Fix Articulation For 0-Axle Train Cars
- Pull request #870 at 5cb32fa: Fix water restore
- Pull request #873 at cf0ed99: Reduce allocations in signal script
- Pull request #874 at d500329: Dynamic brake controller refactoring
twpol pushed a commit that referenced this pull request Sep 14, 2023
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations
- Pull request #831 at 3e672a8: poor mans switch panel on tablet
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #841 at 410a585: https://blueprints.launchpad.net/or/+spec/animating-trainset-windows
- Pull request #853 at d05f581: Notify out of focus
- Pull request #855 at b39e5d8: Adds new route from TrainSimulations
- Pull request #857 at 9afc8c3: Adding Air Flow Meters
- Pull request #863 at 516825f: Alternate preset 3D cabviewpoints
- Pull request #864 at e71bc5a: Fixes for Undesired Emergency Applications
- Pull request #865 at 776d6df: Dispatcher window improvements
- Pull request #866 at c15333e: Fix Articulation For 0-Axle Train Cars
- Pull request #870 at 5cb32fa: Fix water restore
- Pull request #873 at cf0ed99: Reduce allocations in signal script
- Pull request #874 at d500329: Dynamic brake controller refactoring
twpol pushed a commit that referenced this pull request Sep 15, 2023
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations
- Pull request #831 at 3e672a8: poor mans switch panel on tablet
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #841 at ce3bc1f: https://blueprints.launchpad.net/or/+spec/animating-trainset-windows
- Pull request #853 at d05f581: Notify out of focus
- Pull request #855 at b39e5d8: Adds new route from TrainSimulations
- Pull request #857 at 9afc8c3: Adding Air Flow Meters
- Pull request #865 at 776d6df: Dispatcher window improvements
- Pull request #866 at c15333e: Fix Articulation For 0-Axle Train Cars
- Pull request #870 at 5cb32fa: Fix water restore
- Pull request #873 at cf0ed99: Reduce allocations in signal script
- Pull request #874 at d500329: Dynamic brake controller refactoring
twpol pushed a commit that referenced this pull request Sep 15, 2023
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations
- Pull request #831 at fc94364: poor mans switch panel on tablet
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #841 at ce3bc1f: https://blueprints.launchpad.net/or/+spec/animating-trainset-windows
- Pull request #853 at d05f581: Notify out of focus
- Pull request #855 at b39e5d8: Adds new route from TrainSimulations
- Pull request #857 at 9afc8c3: Adding Air Flow Meters
- Pull request #865 at 776d6df: Dispatcher window improvements
- Pull request #866 at c15333e: Fix Articulation For 0-Axle Train Cars
- Pull request #870 at 5cb32fa: Fix water restore
- Pull request #873 at cf0ed99: Reduce allocations in signal script
- Pull request #874 at d500329: Dynamic brake controller refactoring
twpol pushed a commit that referenced this pull request Sep 15, 2023
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations
- Pull request #831 at 82d3be2: poor mans switch panel on tablet
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #841 at ce3bc1f: https://blueprints.launchpad.net/or/+spec/animating-trainset-windows
- Pull request #853 at d05f581: Notify out of focus
- Pull request #855 at b39e5d8: Adds new route from TrainSimulations
- Pull request #857 at 9afc8c3: Adding Air Flow Meters
- Pull request #865 at 776d6df: Dispatcher window improvements
- Pull request #866 at c15333e: Fix Articulation For 0-Axle Train Cars
- Pull request #870 at 5cb32fa: Fix water restore
- Pull request #873 at cf0ed99: Reduce allocations in signal script
- Pull request #874 at d500329: Dynamic brake controller refactoring
twpol pushed a commit that referenced this pull request Sep 15, 2023
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations
- Pull request #831 at f6ca1e1: poor mans switch panel on tablet
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #841 at ce3bc1f: https://blueprints.launchpad.net/or/+spec/animating-trainset-windows
- Pull request #853 at d05f581: Notify out of focus
- Pull request #855 at b39e5d8: Adds new route from TrainSimulations
- Pull request #857 at 9afc8c3: Adding Air Flow Meters
- Pull request #865 at 776d6df: Dispatcher window improvements
- Pull request #866 at c15333e: Fix Articulation For 0-Axle Train Cars
- Pull request #870 at 5cb32fa: Fix water restore
- Pull request #873 at cf0ed99: Reduce allocations in signal script
- Pull request #874 at d500329: Dynamic brake controller refactoring
@sweiland-openrails
Copy link
Contributor Author

hi César,

thanks for the review. See my comments for the details above.

What do I have to do with the Trello card? And do these Trello cards get replaced with something from Github in the future?
And do I have to push the "Resolve conversation" button or is that something for the reviewer?
And as a developer do you look at the "Codacy Static Code Analysis" and "CodeFactor" issues? I do not find them that relevant...

regards, Siebren.

@cesarBLG
Copy link
Contributor

What do I have to do with the Trello card? And do these Trello cards get replaced with something from Github in the future?

You don't have to do any additional step. ORMT usually approves new features after forum discussion with positive feedback, but maybe they forgot about this feature (it happens from time to time). You can contact them directly to get it approved (e.g. in the "ORMT-Sessions" thread.

And do I have to push the "Resolve conversation" button or is that something for the reviewer?

You can resolve them if you don't expect new messages (e.g. because you have already tackled the issues mentioned by the reviewer). But it doesn't matter, it can be easily undone if necessary.

And as a developer do you look at the "Codacy Static Code Analysis" and "CodeFactor" issues? I do not find them that relevant...

I only look at them just in case they detect silly bugs like doing a = 5 instead of a == 5 (it happened to me and I noticed thanks to that), but otherwise I don't look at them. In fact I'm against some of its suggestions, which in my opinion make the code harder to read.

twpol pushed a commit that referenced this pull request Sep 16, 2023
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations
- Pull request #831 at f6ca1e1: poor mans switch panel on tablet
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #853 at d05f581: Notify out of focus
- Pull request #855 at b39e5d8: Adds new route from TrainSimulations
- Pull request #857 at 9afc8c3: Adding Air Flow Meters
- Pull request #865 at 776d6df: Dispatcher window improvements
- Pull request #866 at c15333e: Fix Articulation For 0-Axle Train Cars
- Pull request #870 at 5cb32fa: Fix water restore
- Pull request #873 at cf0ed99: Reduce allocations in signal script
- Pull request #874 at d500329: Dynamic brake controller refactoring
twpol pushed a commit that referenced this pull request Sep 16, 2023
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations
- Pull request #831 at f6ca1e1: poor mans switch panel on tablet
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #853 at d05f581: Notify out of focus
- Pull request #855 at b39e5d8: Adds new route from TrainSimulations
- Pull request #857 at 9afc8c3: Adding Air Flow Meters
- Pull request #865 at 776d6df: Dispatcher window improvements
- Pull request #873 at cf0ed99: Reduce allocations in signal script
- Pull request #874 at d500329: Dynamic brake controller refactoring
@sweiland-openrails
Copy link
Contributor Author

hi Chris,

can you sort the Trello card for this enhancement? As César has reviewed this but is not able to approve: "Trello card isn't sorted, so I cannot approve yet."

thanks, Siebren.

twpol pushed a commit that referenced this pull request Sep 17, 2023
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations
- Pull request #831 at f6ca1e1: poor mans switch panel on tablet
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #853 at d05f581: Notify out of focus
- Pull request #855 at b39e5d8: Adds new route from TrainSimulations
- Pull request #857 at 9afc8c3: Adding Air Flow Meters
- Pull request #865 at 776d6df: Dispatcher window improvements
- Pull request #873 at cf0ed99: Reduce allocations in signal script
- Pull request #874 at d500329: Dynamic brake controller refactoring
- Pull request #875 at 43bf33e: Bug fix for https://bugs.launchpad.net/or/+bug/2036346 Player train switching doesn't work with 3D cabs
@cjakeman
Copy link
Contributor

cjakeman commented Sep 17, 2023 via email

Copy link
Contributor

@cesarBLG cesarBLG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing my comments, it looks good to me now

@sweiland-openrails sweiland-openrails merged commit 317d385 into openrails:master Sep 19, 2023
1 of 3 checks passed
@sweiland-openrails sweiland-openrails deleted the SwitchPanel branch September 23, 2023 07:39
Csantucci added a commit to Csantucci/openrails that referenced this pull request Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request for-unstable Special label to include a pull request in the Unstable Version
3 participants