Hint from brave sw developer requested...

ardsuppi May 4, 2020

  1. ardsuppi

    ardsuppi TrainBoard Member

    33
    8
    3
    Is there a patch or a code change for DCC++ standard, that a dummy like me can utilize, to make loco lights still on when they loose contact for a while? I can have them still run at the desired speed but lights are off. I have to toggle OFF/ON to make them light again.

    Thanks in advance.
     
  2. wvgca

    wvgca TrainBoard Member

    499
    305
    21
    nope, not as far as I know ...
    The decoder is set [by firmware] to have function outputs disabled when powered on,
     
  3. Trusty

    Trusty TrainBoard Member

    52
    33
    6
    The decoders should keep the states of lights for a few seconds when the loco loose contact, but all decoders dont do that correctly...
    The solution in DCC++ is to affect a permanent register to the functions. In the normal configuration, all function commands are set with the register 0 which do not repeat orders. But the DCC++ setFunction() method do not accept a register number as an argument.
    I have modified DCC++ in my library version DCCpp to accept to send a function order on another register than the traditionnal 0.
     
  4. ardsuppi

    ardsuppi TrainBoard Member

    33
    8
    3
    @wvgca
    Maybe I didn't was too clear. I mean the information sent from the base station to the tracks is repeated every once.

    In this packet is present the speed information, otherwise when i take the loco off the rail it should stop when i put on tracks again.

    What I asked is if anyone has modified the DCC++ code to achieve the repeated packet information include the state of lights.
     
  5. Trusty

    Trusty TrainBoard Member

    52
    33
    6
    Maybe I was not too clear too :)...
    In DCC norm, speed packets are sent continuously on the track. Function packets (not the same as speed packets!) are sent only once.
    In DCC++ program, register 0 is reserved for one shot packets like functions, accessories or emergency stop. All others registers repeat the packets all the time. To avoid loosing the light information, you can use these registers for this kind of packet, instead of the DCC++ hard coded register 0.
     
  6. ardsuppi

    ardsuppi TrainBoard Member

    33
    8
    3
    @Trusty
    Thank you, it's clear for me now. But does it means that commercial cs have something like a function register or a loco packet that includes state of F0 (lights)?
    This because using those cs the loco keeps the state of lights even if I took them off track for a while. I mean only F0 state, indeed they would sound again a whistle or activate other functions.
    Do there is anyway to include F0 state in the speed repeated packet under DCC++? I know it's not a hard trouble, I just toggle OFF/ON and have lights on.
     
  7. wvgca

    wvgca TrainBoard Member

    499
    305
    21
    as far as i know, commercial DCC controllers [such as MRC, etc] do not include repeatable F0 packets, only once per key press..
    You would have to modify the DCC++ source to include F0 in the repeating portion / not register 0
     
  8. Trusty

    Trusty TrainBoard Member

    52
    33
    6
    I dont have any clue about this, but perhaps commercial cs repeat the functions packets with a long (electronically speaking) delay like one second and not on a few millisecond basis like speed packets.
    In DCC++, the only way to keep ligths on is to repeat the function packets (there are four or five different function packets, from F0 to F28...), and the only way to repeat a packet is to use any other register than 0.
     
  9. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    why not just a "keep alive" circuit connected to the decoder, if it supports it (not all do)?

    ~Travis
     
  10. ardsuppi

    ardsuppi TrainBoard Member

    33
    8
    3
    Sorry but I don't see the point. Do you mean capacitors on loco to keep power for a while?

    In my request I asked, in other words, why DCC++, despite all the good things that works very nice as base station, does not repeat F0 status to the loco, while other standard CS do. With my Hornby basic Select CS for example, when I turn on loco lights, even if I took it off the rails then on again, that loco keeps speed and light status.
     

Share This Page