First Experience - Trying to get basic scripted I/O through DCC++

Greg Privette Dec 7, 2016

Tags:
  1. Greg Privette

    Greg Privette TrainBoard Member

    12
    11
    8
    First off, JMRI/DCC++ are all free - I am grateful and not complaining. Thank you much for ALL the effort that has gone into this.

    I believe that this is the direction model railroading should go! But as an embedded software engineer having numerous problems for a month+; I fear many would-be users give up. I wanted to describe my configuration and some of my troubles (in case my config isn't supported much) and ask if a major release might be in work to improve user experience (MR is suppose to be fun :) )

    CONFIG: MacBookPro OS 10.11.6, USB Serial to real Arduino Mega with Motor Shield, DCC++ software loaded with jumper from digital pin 4 to pin 13. LEDs (with resistors) on pins 5, 6 and 7. Have no decoder or external power supply at this time since my first decoder has been on back order for a month. Just using PanelPro at this time - no DecoderPro.

    1) I take laptop/Arduino to multiple sites for development - have seen situations where if I plug USB in different laptop slot, Arduino nor mouse work. Reversing them has fixed the problem.

    2) Often have to do "force quit" on PanelPro and seems I usually have to restart my computer before it will work again.

    3) Was trying to use JMRI "Lights" to light my LEDs - took a while to find the TB thread that I should be using Turnouts with the "EXACT" edited setting.

    4) The Jython script "sleep" command (as shown in a JMRI distributed script) doesn't seem to work on my Mac - had to use self.waitMsec() within a class to get functionality.

    5) Can't find documentation to determine how script commands work. There's one short web page that defines how print "Hello" works and then you have to decipher some kind of Java Class page to try and understand more. Examples help some - thanks.

    6) Tried to just display fast clock time from a script. I see the IMCURRENTTIME memory that is created but haven't seen how I can get access from a script.

    7) I saw a web page where some were using eclipse for JMRI/jython. I installed Jython on my eclipse. I thought the auto-fill of class methods could be used to help me learn what I can do with different classes. But am getting errors on import jmri and import java statements. Tried to bring in jmri.jar file to the project but still doesn't resolve errors (I'm an embedded S/W developer - not an eclipse pro).

    Sorry for the data dump but hope it can shed light on some frustration that might keep more users from embracing this approach.
    Greg
     
    sboyer2 and Scott Eric Catalano like this.
  2. KC Smith

    KC Smith TrainBoard Member

    109
    111
    12

    Greg,

    Sorry no one has replied to this post as yet.

    Unfortunately, I do not have experience with Mac OS. But it seems to me that you may want to try JMRI release 4.6 or 4.71 with DCC++ and see if that helps with Items (1 & 2). You may want to post Questions (3 -7) directly on the JMRI support site instead of here in DCC++.

    I was hoping someone with Mac OS could have responded to you sooner.

    Please let us know if you make any progress...

    Regards,
    Kevin
     
    Scott Eric Catalano likes this.
  3. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    I'm on MacOS. Have not seen the crashing problems you mention but JMRI does get confused if you set up a profile with one port then later start up when plugged into another port. I think it's a legacy of it being based around serial ports, so it doesn't take proper/full advantage of USB enumeration.

    I'd strongly suggest you go to the JMRI Users Yahoo! Group for the scripting issues. Lots of very experienced help there including some of the developers.

    Also, yes, make sure you are using 4.7.1 or newer with DCC++. I'm in the midst of fixing a LOT of bugs that produce confusing and errant behavior.
     
    Scott Eric Catalano likes this.

Share This Page