Author Topic: JMRI question  (Read 730 times)

0 Members and 1 Guest are viewing this topic.

djconway

  • Crew
  • *
  • Posts: 482
  • Respect: +74
JMRI question
« on: June 11, 2022, 05:18:38 PM »
0
Is there a way to change the decoder type for a saved roster entry?
I keep a lot of history in the roster file for each loco, so when I swap a decoder is there a way to keep that history, but update the decoder type?

crusader27529

  • Posts: 13
  • Respect: 0
Re: JMRI question
« Reply #1 on: July 01, 2022, 05:29:27 PM »
0
No.

John

  • Administrator
  • Crew
  • *****
  • Posts: 13403
  • Respect: +3260
Re: JMRI question
« Reply #2 on: July 01, 2022, 05:45:56 PM »
0
If you open JMRI and look in the roster directory, there should be a file for each locomotive .. if you keep your notes in the comments field, you can edit the xml file and copy the info to the new decoder file for that loco ..

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/xml/XSLT/locomotive.xsl" type="text/xsl"?>
<locomotive-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://jmri.org/xml/schema/locomotive-config.xsd">
  <!--Written by JMRI version 5.0+Rc441642522 on Fri Jul 01 17:41:37 EDT 2022-->
  <locomotive id="test" fileName="test.xml" roadNumber="" roadName="" mfg="" owner="" model="" dccAddress="3" comment="this is were we keep the comments .. you can copy this to the new decoder file" developerID="-1" manufacturerID="129" productID="" maxSpeed="100" imageFilePath="" iconFilePath="" URL="" IsShuntingOn="">
    <dateUpdated>2022-07-01T21:41:37.753+00:00</dateUpdated>
    <decoder model="DN140" family="Basic FX" comment="" maxFnNum="28" />
    <locoaddress>
      <dcclocoaddress number="3" longaddress="no" />
      <number>3</number>
      <protocol>dcc_short</protocol>
    </locoaddress>
    <functionlabels />
    <soundlabels />
    <values>

djconway

  • Crew
  • *
  • Posts: 482
  • Respect: +74
Re: JMRI question
« Reply #3 on: July 01, 2022, 06:31:43 PM »
0
John,

Thanks - I was so hoping for an easy way. 

Spent 35 years in computer systems support so it shouldn't be too bad.

Who knows I may learn some JAVA along the way. 

John

  • Administrator
  • Crew
  • *****
  • Posts: 13403
  • Respect: +3260
Re: JMRI question
« Reply #4 on: July 01, 2022, 06:54:57 PM »
0
This might only work if you create a new decoder file .. all the info probably should be in the comments fields -- which is what I think you meant ?   give it a try on a couple of test roster entries and see if it works for you .. have a good holiday