Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isDriverLoaded is broken in newest version #4

Open
onokje opened this issue Jun 10, 2015 · 1 comment
Open

isDriverLoaded is broken in newest version #4

onokje opened this issue Jun 10, 2015 · 1 comment
Labels

Comments

@onokje
Copy link

onokje commented Jun 10, 2015

The isDriverLoaded() function is no longer working properly. It returns false even if the driver is loaded properly.

Howto reproduce:

var sensor = require('ds18x20');

if (sensor.isDriverLoaded()){
    console.log("Sensor Driver is not loaded! To load the driver, run: sudo modprobe w1-gpio && sudo modprobe w1-therm");
    process.exit(1);
}

sensor.list(function (err, listOfDeviceIds) {
    console.log(listOfDeviceIds);
});

var tempObj = sensor.getAll();
console.log(tempObj);

Load the driver and run it. It will still exit. Then try again, but comment or remove the process.exit() line.
isDriverLoaded will still return false, but i will get my devices and temps even so.

All this is only the case with the new version with kernel upgrade (raspberry pi 2). I used the help on this page: https://groups.google.com/forum/#!topic/webiopi/_C7KNiS-aPE to get wire1 working again.

@mraxus
Copy link
Owner

mraxus commented Jun 14, 2015

Thanks for your report. As I don't have a rPi v2 and I haven't worked with the ds18x20 for a long time I cannot reproduce this bug. Should you find a way to solve this in my module, please submit a pull request.

//Marcus

@mraxus mraxus added the bug label Jun 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants