Datenheld / Bulldog

Bulldog is a GPIO API for the Beaglebone Black written in Java
Apache License 2.0
38 stars 36 forks source link

ArrayIndexOutOfBoundsException on Beaglebone #16

Closed lhuet closed 9 years ago

lhuet commented 9 years ago

With a beaglebone (white), an ArrayIndexOutOfBoundsException is throwed on the Board instanciation.

This is due to the difference with the BBB (no eMMC and no HDMI).

The following instructions returned -1 :

sysFs.getSlotNumber("BB-BONELT-HDMI") on line : https://github.com/Datenheld/Bulldog/blob/master/bulldog.board.beagleboneblack/src/main/java/org/bulldog/beagleboneblack/BeagleBoneBlack.java#L298 sysFs.getSlotNumber("BB-BONE-EMMC-2G") on line : https://github.com/Datenheld/Bulldog/blob/master/bulldog.board.beagleboneblack/src/main/java/org/bulldog/beagleboneblack/BeagleBoneBlack.java#L303

A quick fix by returning false when the index if -1 show that the rest of the code seems to run correctly on a beaglebone (white). Is there any plan to support the first generation BeagleBone ?

Datenheld commented 9 years ago

Hi,

this has been fixed on the devline 1 branch, you can try the binaries from there. There won't be any support for the first beagle bone generation, as i have not enough time.

Best regards, datenheld aka bulldog Am 03.12.2014 22:18 schrieb "Laurent HUET" notifications@github.com:

With a beaglebone (white), an ArrayIndexOutOfBoundsException is throwed on the Board instanciation.

This is due to the difference with the BBB (no eMMC and no HDMI).

The following instructions returned -1 :

sysFs.getSlotNumber("BB-BONELT-HDMI") on line : https://github.com/Datenheld/Bulldog/blob/master/bulldog.board.beagleboneblack/src/main/java/org/bulldog/beagleboneblack/BeagleBoneBlack.java#L298 sysFs.getSlotNumber("BB-BONE-EMMC-2G") on line : https://github.com/Datenheld/Bulldog/blob/master/bulldog.board.beagleboneblack/src/main/java/org/bulldog/beagleboneblack/BeagleBoneBlack.java#L303

A quick fix by returning false when the index if -1 show that the rest of the code seems to run correctly on a beaglebone (white). Is there any plan to support the first generation BeagleBone ?

— Reply to this email directly or view it on GitHub https://github.com/Datenheld/Bulldog/issues/16.

lhuet commented 9 years ago

Thanks for the fast response ! What are the content of the devline1 / devline2 branches ? If I want to make a PR to add some devices or propose bug fixes, which branch should I use ?

Datenheld commented 9 years ago

hi,

devline1 is the original version 0.1.0 and contains bugfixes. devline 2 will he the next version, but sadly i have too few time to work on it currently. I'd advise you to fork from devline1.

kind regards, datenhels

Von Samsung Mobile gesendet

-------- Ursprüngliche Nachricht --------
Von: Laurent HUET notifications@github.com
Datum:03.12.2014 22:30 (GMT+01:00)
An: Datenheld/Bulldog Bulldog@noreply.github.com
Cc: Datenheld Datenheld@gmail.com
Betreff: Re: [Bulldog] ArrayIndexOutOfBoundsException on Beaglebone (#16)
Thanks for the fast response ! What are the content of the devline1 / devline2 branches ? If I want to make a PR to add some devices or propose bug fixes, which branch should I use ? — Reply to this email directly or view it on GitHub.
lhuet commented 9 years ago

Ok. Thanks for the advice. The devline1 is ok with my code (I2C BMP085 Device) on beaglebone (the original one). I close this issue.