Closed gantzm closed 4 years ago
Aha! I did not realise there was a stretch
branch! I'm building the branch now to see if it resolves my issues.
No joy, the stretch
branch file paths still don't match my device paths. I would be more than willing to submit pull requests to fix this but I'm not sure which piece is in error: the code or my device.
One option is to check driver changelogs, docs, and issue history, but the easier way to figure out the right stuff would be to look at what they Python library does: https://github.com/ev3dev/ev3dev-lang-python
Are you running ev3dev stretch?
The /sys/class/led
output you provided matches that for stretch.
Please check the ev3_led-dict.yu
file in the ev3dev-c/source/ev3/
folder. The version for stretch should show this:
($dict LED
(` LED_NAME LED_ID )
(`
( "led0:green:brick-status" EV3_LEFT_GREEN )
( "led1:green:brick-status" EV3_RIGHT_GREEN )
( "led0:red:brick-status" EV3_LEFT_RED )
( "led1:red:brick-status" EV3_RIGHT_RED )
( "outA::ev3dev" LED_OUTA )
( "outB::ev3dev" LED_OUTB )
( "outC::ev3dev" LED_OUTC )
( "outD::ev3dev" LED_OUTD )
)
)
If it is identical, it means you need to rebuild the ev3dev-c source files using the yupp preprocessor. By right the files that you checkout from the stretch branch should already be up to date. In addition, when you rebuild the ev3dev-c libraries, it should automatically trigger a preprocessor step to update the .h and .c files from the *.yu files. SKIP_PP
in source/ev3/makefile
should evaluate to 0
.
I suspect that you didn't checkout the stretch branch of ev3dev-c?
Use git branch
to show the active branch:
$ git branch
master
pr/11
pr/9
* stretch
(You can ignore anything other than master, jessie and stretch)
I suspect that you didn't checkout the stretch branch of ev3dev-c?
OK, I think I know what I did. I built the stretch branch and the paths were wrong. After a bit of research I think I realized I needed to rebuild the .h .c files. But, at that point I had switched back to master. I will switch back to the stretch branch and enable the rebuilding of .h and .c files.
Finally got back to this. I have the stretch branch checked out, but the file ev3_led-dict.yu
does not contain the following:
($dict LED
(` LED_NAME LED_ID )
(`
( "led0:green:brick-status" EV3_LEFT_GREEN )
( "led1:green:brick-status" EV3_RIGHT_GREEN )
( "led0:red:brick-status" EV3_LEFT_RED )
( "led1:red:brick-status" EV3_RIGHT_RED )
( "outA::ev3dev" LED_OUTA )
( "outB::ev3dev" LED_OUTB )
( "outC::ev3dev" LED_OUTC )
( "outD::ev3dev" LED_OUTD )
)
)
instead it contains
($dict LED
(` LED_NAME LED_ID )
(`
( "ev3:left:green:ev3dev" EV3_LEFT_GREEN )
( "ev3:right:green:ev3dev" EV3_RIGHT_GREEN )
( "ev3:left:red:ev3dev" EV3_LEFT_RED )
( "ev3:right:red:ev3dev" EV3_RIGHT_RED )
( "outA::ev3dev" LED_OUTA )
( "outB::ev3dev" LED_OUTB )
( "outC::ev3dev" LED_OUTC )
( "outD::ev3dev" LED_OUTD )
)
)
Finally got back to this. I have the stretch branch checked out, but the file
ev3_led-dict.yu
does not contain the following:
Sorry, I just verified the logs for the file, including the ev3_led.*
files. You are correct. Somehow that was missed in this repository. I've fixed it in my fork, and I thought it was picked up by in4lio already.
You can check out my fork of the project, I've synced up with the main repository.
https://github.com/tcwan/ev3dev-c/tree/stretch
See Issue #31
I've installed the ev3dev distribution onto the EV3 device and everything boots fine.
I've cloned and built the ev3dev-c library with no problem. But it appears I've either done something incredibly wrong or misunderstood what is compatible with what.
The file ev3_led.c refers to the following files:
But when I look in /sys/class/leds I find the following:
Did I skip an important step somewhere that normalises the file names or something? Or am I using mixed versions of things that aren't compatible?