OpenRoberta / robertalab-ev3dev

roberta lab connector for ev3dev
Apache License 2.0
17 stars 14 forks source link

Crashes on non-EV3 hardware. #8

Closed dlech closed 6 years ago

dlech commented 8 years ago

This should be able to work on PiStorms and soon EVB as well. There are a few issues that need to be addressed though.

The first issue I ran into is that the path for the buttons is hard coded. I think it would be better to search by name rather than by path as paths may change in future versions anyway.

This is probably something that is best solved in ev3dev-lang-python, but robertalab-ev3dev will need to be adapted to use it.

ensonic commented 8 years ago

Which path? The only hard-coded thing I found was the batteryLevel code: https://github.com/OpenRoberta/robertalab-ev3dev/blob/develop/roberta/lab.py#L40. The button presses use the python api: https://github.com/OpenRoberta/robertalab-ev3dev/blob/develop/roberta/ev3.py#L131

dlech commented 8 years ago

Hmm... maybe I didn't look at the stack trace hard enough and the crash is in ev3dev-lang-python.

Tip on the battery (though this should really be done in ev3dev-lang-python as well)... Search for device with scope property of System in /sys/class/power_supply instead of hard-coding path.

ensonic commented 8 years ago

It should be better now. Will see if I can get a brickpi for testing.

dlech commented 8 years ago

Cool. I should have have the FatcatLab EVB working with ev3dev in a few more weeks. It is actually the most similar hardware-wise to the EV3 and should work with OpenRoberta using the EV3Basis. It does have some issues though, like auto-detection of NXT sensors doesn't work and the holes in the case are not a LEGO compatible diameter (spacing is correct though). I also like the PiStorms better than BrickPi for RPi because it has a screen and better motor control.

ensonic commented 6 years ago

I'll close this now since there seems to be no overlap in user bases. Also with the rate of how we rename stuff, it is kind of hard to keep things running using python (sad).

dlech commented 6 years ago

FWIW, the name changes in hardware paths ev3dev-stretch are only because drivers have made it into the mainline kernel with those names. So at least those won't be breaking anymore. As far as ev3dev-lang-python goes, I'm pushing for parallel 1.x and 2.x versions so that people can keep using 1.x and things don't keep getting broken.