Debugging DIN

Working now!!!

I am yet to investigate, but I put in a different sdcard, the core then generated a new DEFAULT.NGC, etc, and the default set up is reading the DIN o.k with all versions! :rolleyes: 
I will first of all copy all the files from the “faulty” sdcard to the new card, then see if the problem comes back, but I’ll also zip the files for later inspection.

 

I guess the sdcard and it’s contents (other than the *.ncg) was something I have been overlooking.

Well it seems the problem lies in my projects default.ngc.

 

It only manifests the problem (not reading the first DINx4 SRs) if my project (sys.ngc renamed to default.ngc) is in the sdcard slot during power up. If it is, then loading a simple button reader script like in post #3 (buttons.ngc) will have the problem. It seems like only a power cycle will restore proper functionality (with another script such as buttons.ngc renamed to default.ngc). When this is done I can manually load sys.ngc and the DIN works o.k (there are still “LCD labels not updating” problems which are probably unrelated).

 

I stress the importance of “power cycle” in reproducing this fault.  When trying different scripts I have been tending to load manually, or type “reset” in MIOS Studio. 

 

TK, I will email the sys.ngc to you, as it is rather large, then when you can, see if you can reproduce.

Basically, if sys.ngc is default.ngc on power up, then the DIN problem persists until you power up with a different default.ngc

 

Note as before, this problem does not manifest on V1.017 and earlier.

 

OMG this has been very confusing! :wacko:

Found it! :smile:
 
The @(1:: ) directives in your .NGL file caused the issue.
This is a syntax error - actually you wanted to write @(1:1:1)
 
In v1.018 I enhanced the LCD label parser to cover more cases (reported by users) - and I overlooked this possible syntax error case.
With the effect, that @(1:: ) leads to an endless loop. The thread will never continue, therefore some functions (like DIN handler) won’t be called anymore.
 
The fix is already available in the repository (the wrong directive “@(1::)” will now be print on screen - this complies to the way how printf() would handle an erroneous string)
 
Best Regards, Thorsten.

/edit: I’m writing @(1:: ) with space to avoid that the editor will replace : ) by a smilie :smile:

yay! :happy:

 

More good news: it fixed the “LCD Labels value not changing” problem.

 

Thanks TK!