DCC-EX / WebThrottle-EX

WebThrottle-EX is a web based (html,jQuery,JavaScript) Controller/Throttle for DCC-EX EX-CommandStations
https://dcc-ex.com/WebThrottle-EX
GNU General Public License v3.0
21 stars 14 forks source link

Add emulator #8

Closed matt-vdv closed 3 years ago

matt-vdv commented 3 years ago

I have added an emulator to the web interface. There is now a dropdown menu next to the connect button that lets the user select between serial and the emulator (serial is the default). image If the emulator is selected, it allows the whole of the emulator interface to be used without errors, whilst still providing the debug statements in the debug console. I also added handling of the error that occurs if the user cancels the serial port selection. This is the feature I was talking about in issue #7 (Add an Emulator).

FrightRisk commented 3 years ago

That's pretty great Matt! Do you see anything that needs to be changed or things that need to be added to the emulator?

matt-vdv commented 3 years ago

@FrightRisk, as far as I can see, it is ready to be merged and used! As more is added to the software, I can add these to the emulator and submit new pull requests.

FrightRisk commented 3 years ago

What do you think about adding responses to the emulator? I'm not sure all of them could be added easily, because for things like turnouts and sensors you would have to store what was entered so you could spit back a list, but most commands have some kind of response like for power off, etc. The list of commands is here: https://github.com/DCC-EX/CommandStation-EX/wiki/DCC-EX-Command-Reference. Thanks again for the great work.

matt-vdv commented 3 years ago

Sure! I will look into that.