Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Commit 5a0776e

Browse files
author
sebba
committed
Issue #1 fixed : Libs calculation improved
Errors in Arduino Alpha < A.S.> using Wire lib. Thanks to @FrankOcean11
1 parent 11168ca commit 5a0776e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

node/compiler.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,19 @@
112112
console.log("User lib");
113113
paths.push(sketchbook + path.sep + "libraries" + path.sep + libname + path.sep + "src");
114114
}
115+
//<editor-fold desc="test new path for lib">
116+
else if(fs.existsSync(plat.root + path.sep + "hardware" + path.sep + "arduino" + path.sep + arch + path.sep + "libraries" + path.sep + libname))
117+
{
118+
console.log("User lib");
119+
paths.push(plat.root + path.sep + "hardware" + path.sep + "arduino" + path.sep + arch + path.sep + "libraries" + path.sep + libname);
120+
if(fs.existsSync(plat.root + path.sep + "hardware" + path.sep + "arduino" + path.sep + arch + path.sep + "libraries" + path.sep + libname + path.sep + "src"))
121+
paths.push((plat.root + path.sep + "hardware" + path.sep + "arduino" + path.sep + arch + path.sep + "libraries" + path.sep + libname + path.sep + "src"))
122+
if(fs.existsSync(plat.root + path.sep + "hardware" + path.sep + "arduino" + path.sep + arch + path.sep + "libraries" + path.sep + libname + path.sep + "utility"))
123+
paths.push((plat.root + path.sep + "hardware" + path.sep + "arduino" + path.sep + arch + path.sep + "libraries" + path.sep + libname + path.sep + "utility"))
124+
}
125+
//</editor-fold>
115126
else
116-
console.log("Library " + libname + "not exist")
127+
console.log("Library " + libname + " not exist")
117128
}
118129
});
119130
if(cb) cb();

0 commit comments

Comments
 (0)