Code Monkey home page Code Monkey logo

Comments (3)

savageautomate avatar savageautomate commented on July 19, 2024

Hi drvonnostrand,

I have updated the source code to include two new pieces of logic to help detect hard-float.
I added a slightly modified version of the code you posted as well as a method that obtains the "bash" version which includes a unique tag for hard-float as shown below:

.. on hard-float ABI :
GNU bash, version 4.2.36(1)-release (arm-unknown-linux-gnueabihf)

.. on soft-float ABI :
GNU bash, version 4.2.36(1)-release (arm-unknown-linux-gnueabi)

On the hasReadElfTag() check, I am keying off this tag instead: "Tag_ABI_HardFP_use".

see:
https://github.com/Pi4J/pi4j/blob/develop/pi4j-core/src/main/java/com/pi4j/system/SystemInfo.java#L157

I did deploy a new 0.0.5-SNAPSHOT build to include this fix.
http://code.google.com/p/pi4j/downloads/list

Look Good?
Thanks, Robert

from pi4j-v1.

drvonnostrand avatar drvonnostrand commented on July 19, 2024

Hi Robert,

Great. I took a look at the code and it looks good. A couple minor comments:

  • Since getBashVersionInfo and getReadElfTag are public, it would be consistent with the other
    public methods to throw these exceptions up or they could be made private since they seem to
    be helpers for isHardFloatAbi().
  • In getReadElfTag(String tag):
    I'm not sure if all Tags are guaranteed to have values(ie. text after the colon). If not,
    the following code will throw when trying to access lineParts[1]:
    if (line.startsWith(tag) && line.contains(":")) {
    String lineParts[] = line.split(":", 2);
    tagValue = lineParts[1].trim();
    break;
    }

Thanks for all your work.

cheers,
-- rick

On Sun, Dec 30, 2012 at 09:53:02AM -0800, Robert Savage wrote:

Hi drvonnostrand,

I have updated the source code to include two new pieces of logic to help
detect hard-float.
I added a slightly modified version of the code you posted as well as a
method that obtains the "bash" version which includes a unique tag for
hard-float as shown below:

.. on hard-float ABI :
GNU bash, version 4.2.36(1)-release (arm-unknown-linux-gnueabihf)

.. on soft-float ABI :
GNU bash, version 4.2.36(1)-release (arm-unknown-linux-gnueabi)

On the hasReadElfTag() check, I am keying off this tag instead:
"Tag_ABI_HardFP_use".

see:
https://github.com/Pi4J/pi4j/blob/develop/pi4j-core/src/main/java/com/pi4j/system/SystemInfo.java#L157

I did deploy a new 0.0.5-SNAPSHOT build to include this fix.
http://code.google.com/p/pi4j/downloads/list

Look Good?
Thanks, Robert

Reply to this email directly or view it on GitHub.

from pi4j-v1.

savageautomate avatar savageautomate commented on July 19, 2024

Hi Rick, thanks for the feedback. I actually intended to make those private but forgot to go back and do it before the commit. I have now made them private and added the additional logic to handle the cases where a value may not be a value after the split().

Thanks, Robert

from pi4j-v1.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.