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

Changing speed steps in JMRI crashes ED on MCII #225

Open
SonnysHansen opened this issue Apr 20, 2018 · 12 comments
Open

Changing speed steps in JMRI crashes ED on MCII #225

SonnysHansen opened this issue Apr 20, 2018 · 12 comments
Assignees

Comments

@SonnysHansen
Copy link

I have discovered a strange behavior on my ESU MCII with Engine Driver app.
When I use a throttle from JMRI with the same engine number as on ESU MCII, and set speed step in JMRI throttle to 28, then the Engine Driver app is crashing.
It looks like the ESU MCII with the Engine Driver app can´t handle 28 speed steps.

Sonny.

@mstevetodd
Copy link
Contributor

@SonnysHansen I'm not aware of any interaction between the JMRI Throttle Window and Engine Driver. Can you be specific with the steps you're taking to see this?
What version of JMRI are you running, and what hardware are you connected to?
Also, what do you have selected as the EngineDriver preference "Speed Units"?

@SonnysHansen
Copy link
Author

Yesterday I was visiting an H0 US train club, to show my ESU MCII working with Engine Driver app.
The club uses Lenz equipment, and a Lenz USB unit to connect to JMRI version 4.10. Also started up was the Withrottle. Some of the members use Engine Driver on Smart phones, and they have no problems.
When I, with my ESU MCII acquire e.g. loco address 554, MCII shows speed step 27 in the speed step field.
I turn the throttle knob up on my ESU, and the speed stops on speedstep 6, when the knob is all the way up. Then I tried to use the finger slider and the app crash.
My ESU Engine Driver was in preferences set to speed units, Auto speed steps. I change that to 128 speed steps, and try again. Now I could turn the knob all way up, and it shows 27 in the speed step field. trying to use the finger slider and the app crash, to great fun for the members of the club.
After I while trying to get it to work, I realized.
Lenz LZV100 command station always start up in 27 speed steps, and you can´t change that. If you want 128 speed steps, you have to change it on the Lenz throttles.
After several attempts whit the same fault results, I was ready to give up, but then I tried open a JMRI throttle, set it as the same address as in my ESU Engine Driver, change the JMRI throttle speed step window from slider to show speed steps. It shows 27 speed steps, then I change it to 128, and the ESU Engine Driver worked again, with no problems. I have to do this every time I change to another loco address.
I have this morning try the same on my JMRI version 4.11.3.
I used Lenz Express Simulator to try it out. The same fault acquire, until I change the speed steps in a JMRI throttle.
Does this make sense or do you need more information?

@mstevetodd
Copy link
Contributor

Update: I figured out how to change the speed steps in the JMRI Throttle window.
If I set the EngineDriver "Speed Units" preference to "Auto Speed Steps", acquire the same address in ED and in a JMRI Throttle Window, and then change the speed steps in the JMRI Throttle window to "28 SS", the speed steps value in ED changes to match. (a "s2" message is sent). No crash on my phone, but the speed value isn't updated until something changes.

@mstevetodd
Copy link
Contributor

@SonnysHansen I don't see this crash reported to the Play Store. Are you running the production version of EngineDriver 2.18.1 installed from the Play Store?

@SonnysHansen
Copy link
Author

Yes! my version is 2.18.1

@SonnysHansen
Copy link
Author

Do I have to rapport it, when Engine Driver crash on my ESU MCII?

@mstevetodd
Copy link
Contributor

Thanks, @SonnysHansen that detailed narrative is very helpful. Also thanks for verifying it happens with the Lenz Simulator, as I doubt that the developers who have MCII's also have Lenz hardware.
If you are prompted to send a crash report to the Play Store, always select Yes. The report includes a detailed stack trace showing the actual error message and the lines of code that crashed.

@n3ix
Copy link
Contributor

n3ix commented Apr 20, 2018 via email

@n3ix
Copy link
Contributor

n3ix commented Apr 20, 2018

@mattharris Another issue I noticed while testing is that the Knob is not rotated in response to external speed changes. For instance if I change the speed using a JMRI throttle, the displayed speed in ED on the MC II changes however the Knob doesn't move. If I change the speed using the slider in ED on the MC II, the Knob does move to track the change.

@mstevetodd mstevetodd changed the title 28 speed steps Changing speed steps crashes ED on MCII Apr 20, 2018
@mstevetodd mstevetodd changed the title Changing speed steps crashes ED on MCII Changing speed steps in JMRI crashes ED on MCII Apr 20, 2018
@mattharris
Copy link
Member

@n3ix I've separated out the external speed change issue into #292.

@mattharris
Copy link
Member

We've another user report of this same issue.

@mattharris
Copy link
Member

Just a quick update to say that I'm still working on identifying the root cause for this, but it looks to be in the way we deal with the speed step response from the WiThrottle server and not correctly considering the ESU Throttle Scaling setting. Still need to debug directly on a device which is taken a bit longer due to some problems I had in my dev environment (now fixed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants