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

CV programming #48

Open
matt-vdv opened this issue Dec 7, 2020 · 6 comments
Open

CV programming #48

matt-vdv opened this issue Dec 7, 2020 · 6 comments
Labels
discussion-needed this feature needs to be discussed before it is implemented Enhancement New feature or request
Milestone

Comments

@matt-vdv
Copy link
Member

matt-vdv commented Dec 7, 2020

Just remembered we are lacking this.
This is a crucial part of a DCC setup, so we should probably try and implement it sooner rather than later...

@matt-vdv matt-vdv added Enhancement New feature or request discussion-needed this feature needs to be discussed before it is implemented labels Dec 7, 2020
@matt-vdv matt-vdv added this to the Backlog milestone Dec 7, 2020
@FrightRisk
Copy link
Member

FrightRisk commented Dec 8, 2020

This is strange. I added this, or thought I did the same day I input the bug report for return values not coming back from the serial monitor. Maybe I forgot to save it? Oh well, I need to see if there was anything else I intended to add and lost.

I remember I was asking about how to handle the programming. Should we have some buttons for standard programming like loco address, CV29, etc. so they can be in a "quick access" table? Then just allow "CV VALUE VERIFY" and the user just enters what they want? I don't see a way to do a table, though I guess we could of every possible number on a page. You could do like JMRI and read every CV and see which ones return. Thoughts?

@ManiAkasapu
Copy link
Member

CV level programming is OK. We can have UI similar to JMRI. User can have button to read current CV value and button to Write (overwrite) desired value. And have buttons to Read All and Write all.

@FrightRisk How many CVs will be available? NMRA standards etc..I do not know about these rules & limitations..
if you will be number of CVs supported then we can add these..

We need to introduce page for Programming and get this UI ready.
@matt-hu

On the other note, we should focus first on Turnout data and how to use them with in Throttle page.

@FrightRisk
Copy link
Member

Rather than repeat the spec, I'll point to it and we can discuss. Basically, we have CVs from 1-1024. There is a method for extending them to allow for for 65,537 CVs. I think for starters, we just handle 1-1024 as normal CVs.

https://dccwiki.com/Configuration_Variable#:~:text=NMRA%20Standards,-Main%20article%3A%20Configuration&text=2.2%20defined%20the%20ranges%201,512%2D1024%20as%20normal%20CVs.

@matt-vdv
Copy link
Member Author

matt-vdv commented Feb 9, 2021

@FrightRisk thanks for that! I know very little about CVs (I have only changed the address and acceleration of my decoders!), so I will make sure to have a look at that...

@FrightRisk
Copy link
Member

I think we can start with the following regarding CVs. We can't just say "adjust volume" or "change to bell number 3" because things are so non standard. JMRI gets around some of this by maintaining a list of 100s of decoder definition files for all those locos. We could copy those, but I am thinking simple is better. People need to get out their loco sheet and look at the table and then just put in a number. JMRI has a "single CV program" screen and a "program sheet" with all the CVs on it. So you can read an entire page worth of CVs and save the values if you want for that loco. Again, just having the ability to program would be a big deal, it doesn't have to be fancy now. It could even be just a box to enter the cv, a box for the value and then a read and write button. What we know:

1-46 and 65-112 are standard for the most part.
We can look at the tables for the major decoder manufacturers and load that as a starting point. That would mean reading us creating files for the major decoder manufacturers.
If we are going to read pages, we are going to have to know how to set CV32 to page 1, 2, or 3 and then read CVs 257. Where it could get complicated is if we want ease of use features, like knowing that CV 1 has all zeros and therefore we need to read CV12 and then report we see an alternate power mode. Or read the CV for consisting and show that address. CV29 is a special case of bitflags, so do we decode them and print a table of what things are on and off? ETc. Etc.

@matt-vdv
Copy link
Member Author

@FrightRisk @ManiAkasapu I have added a blank CV programming page to the features/cv branch

@matt-vdv matt-vdv modified the milestones: Backlog, 1.4.0 Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion-needed this feature needs to be discussed before it is implemented Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants