Warnings after uploading DCCPlusPlus / Basestation software

Peter Hagenaars Mar 17, 2017

  1. Peter Hagenaars

    Peter Hagenaars TrainBoard Member

    18
    19
    8
    I have just recently discovered dcc++ and would like to use it for a small new to build 0-scale shuttle layout.

    I would like the control it with dcc++, but I am totally new to this and have little electronics knowledge or skills and I am no programmer, so I have to rely heavily on other people's knowledge and experience. But I hope that this is no problem, because I'd like to learn something new and I think it's a great project with already an enormous amount of (programming) work done. Fantastic!.

    At the moment I have an Arduino Uno (clone) and a Motorshield (L298P). The Arduino is connected to my MacBookPro and connects via "/dev/cu/wchusbserialfa130". I have only downloaded the DCCPlusPlus / Basestation software and uploaded it into the Arduino and immediately experience some strange things, which I don't know if it is right.

    First: after uploading the software DCCpp_Uno.ino I see in the bootom (black) window 6 lines:

    /Users/peterhagenaars/Documents/BaseStation-1.2.1/DCCpp_Uno/DCCpp_Uno.ino:414:152: warning: backslash and newline separated by space
    R.currentBit=0; /* reset current bit pointer and determine which Register and Packet to process next--- */ \
    ^
    /Users/peterhagenaars/Documents/BaseStation-1.2.1/DCCpp_Uno/DCCpp_Uno.ino:420:100: warning: backslash and newline separated by space
    R.tempPacket=R.currentReg->activePacket; /* flip active and update Packets */ \
    ^
    /Users/peterhagenaars/Documents/BaseStation-1.2.1/DCCpp_Uno/DCCpp_Uno.ino:436:103: warning: backslash and newline separated by space
    } /* END-ELSE */ \
    ^
    /Users/peterhagenaars/Documents/BaseStation-1.2.1/DCCpp_Uno/DCCpp_Uno.ino:437:88: warning: backslash and newline separated by space
    \
    ^
    /Users/peterhagenaars/Documents/BaseStation-1.2.1/DCCpp_Uno/DCCpp_Uno.ino:194:59: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
    CurrentMonitor mainMonitor(CURRENT_MONITOR_PIN_MAIN,"<p2>"); // create monitor for current on Main Track
    ^
    /Users/peterhagenaars/Documents/BaseStation-1.2.1/DCCpp_Uno/DCCpp_Uno.ino:195:59: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
    CurrentMonitor progMonitor(CURRENT_MONITOR_PIN_PROG,"<p3>"); // create monitor for current on Program Track
    ^

    I have tried to find something in these threads but there is so much that I get lost in it.

    Can somebody explain if these lines indeed indicate that something is wrong or what I have to do?

    Kind regards,
    Peter Hagenaars
    the Netherlands
     
    Scott Eric Catalano likes this.
  2. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    That's the Arduino compiler being pedantic about how some of the code is written. Those warnings should be "cleaned up" by the folks writing/maintaining the code, but you need not worry about them.

    It's the software equivalent of a spelling/grammar checker in your word processor pointing out something like "use of passive voice" which might be technically bad grammar depending on what you are writing, but even if it is, it's still perfectly readable English (or Dutch, as the case may be).

    That being said, it's good programming practice to squash these sorts of things, so one of the programmers (like me?) should probably look into cleaning this up.


    (Sometimes compiler warnings can point to things that actually are bugs. That's why the compiler issues them. I don't think that's the case in these specific instances, but I also don't want to give the blanket impression that all warnings can be blithely ignored)
     
    Scott Eric Catalano and esfeld like this.
  3. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    Many of these have been addressed in various pull requests and I have also corrected a number of them on my clone.
     
    Scott Eric Catalano likes this.
  4. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    Oh good. Then all we need to do is merge the PRs...

    Were any of them actual issues, or just "grammar"?
     
    Scott Eric Catalano likes this.
  5. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    no real issues as far as I could tell.
     
    Scott Eric Catalano and TwinDad like this.
  6. Peter Hagenaars

    Peter Hagenaars TrainBoard Member

    18
    19
    8
    Happy to hear that it is no big issue, now I can go on and also attach my Shield and start testing on that.
    B.t.w. does this mean you (or someone) are/is going to modify the program? ;-))
     
    Scott Eric Catalano likes this.
  7. Peter Hagenaars

    Peter Hagenaars TrainBoard Member

    18
    19
    8
    Today I ran the Diagnostic <D> program and all went according to the 'manual'; the leds went ON and OFF as they should do. Next I tested the Motor Shield and there too, all went as it should. So the Arduino, Motor Shield and software work properly.
    Next to do is to find out how things (i.e. my little shuttle layout) have to be connected and defined.
    I intend to make this layout in Rocrail, so next item is to study how to define it in Rocrail.
    Anybody suggestions or experience with DCC++ and Rocrail?

    So far thanks for the help.

    Kind regards,
    Peter Hagenaars
    the Netherlands
     
    Scott Eric Catalano likes this.
  8. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    Glad to hear things are working out for you!

    I'm afraid I can't help with Rocrail.
     
    Scott Eric Catalano likes this.
  9. Peter Hagenaars

    Peter Hagenaars TrainBoard Member

    18
    19
    8
    Well, so far so good....
    I was hoping someone could help with DCC++ and Rocrail, because my English is a bit better than my German.
    However Rocrail its own forum too, so I'll ask for help there.
    Thanks anyway.
     
    Scott Eric Catalano likes this.

Share This Page