tm3d
/
owTools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add access with W1-Kernelmodule
[owTools.git]
/
src
/
main.cpp
diff --git
a/src/main.cpp
b/src/main.cpp
index
7c28e12
..
8bc4452
100755
(executable)
--- a/
src/main.cpp
+++ b/
src/main.cpp
@@
-476,6
+476,12
@@
int main(int argc, char *argv[]) {
printf("\033[1;31mGPIO works with Raspberry PI only \033[0m\n");
}
} else
printf("\033[1;31mGPIO works with Raspberry PI only \033[0m\n");
}
} else
+ if(adapter.find("W1")!=std::string::npos) {
+ owi=new owW1Interface();
+ if (owi->InitAdapter(0)) {
+ printf("Use W1-Kernel 1-Wire functions on /sys/bus/w1\n");
+ } else printf("No W1-Kernel module found!!\n");
+ } else
#endif
if (adapter.find("ARDUINO") != std::string::npos) {
owi = new owARDUINOInterface();
#endif
if (adapter.find("ARDUINO") != std::string::npos) {
owi = new owARDUINOInterface();