Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4e629c4

Browse files
committed
Update plugin for newer Arduino IDE
- Travis updated to build against Arduino 1.6.12- source updated to find the sketch folder- dropped support for ESP31B
1 parent42e38ec commit4e629c4

File tree

2 files changed

+32
-23
lines changed

2 files changed

+32
-23
lines changed

‎.travis.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jdk:
1616
script:
1717
-export SRC=$PWD
1818
-cd $HOME
19-
-export TAG=1.6.6
19+
-export TAG=1.6.12
2020
-wget https://github.com/arduino/Arduino/archive/$TAG.zip
2121
-unzip $TAG.zip
2222
-rm $TAG.zip

‎src/ESP8266FS.java‎

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -112,36 +112,45 @@ public void run() {
112112
}
113113

114114
privateStringgetBuildFolderPath(Sketchs) {
115+
// first of all try the getBuildPath() function introduced with IDE 1.6.12
116+
// see commit arduino/Arduino#fd1541eb47d589f9b9ea7e558018a8cf49bb6d03
115117
try {
116-
FilebuildFolder =FileUtils.createTempFolder("build",DigestUtils.md5Hex(s.getMainFilePath()) +".spiffs");
117-
DeleteFilesOnShutdown.add(buildFolder);
118-
returnbuildFolder.getAbsolutePath();
118+
Stringbuildpath =s.getBuildPath().getAbsolutePath();
119+
returnbuildpath;
119120
}
120-
catch (IOExceptione) {
121-
editor.statusError(e);
121+
catch (IOExceptioner) {
122+
editor.statusError(er);
122123
}
123-
catch (NoSuchMethodErrore) {
124-
// Arduino 1.6.5 doesn't have FileUtils.createTempFolder
125-
// String buildPath = BaseNoGui.getBuildFolder().getAbsolutePath();
126-
java.lang.reflect.Methodmethod;
124+
catch (Exceptioner) {
127125
try {
128-
method =BaseNoGui.class.getMethod("getBuildFolder");
129-
Filef = (File)method.invoke(null);
130-
returnf.getAbsolutePath();
131-
}catch (SecurityExceptionex) {
132-
editor.statusError(ex);
133-
}catch (IllegalAccessExceptionex) {
134-
editor.statusError(ex);
135-
}catch (InvocationTargetExceptionex) {
136-
editor.statusError(ex);
137-
}catch (NoSuchMethodExceptionex) {
138-
editor.statusError(ex);
126+
FilebuildFolder =FileUtils.createTempFolder("build",DigestUtils.md5Hex(s.getMainFilePath()) +".tmp");
127+
returnbuildFolder.getAbsolutePath();
128+
}
129+
catch (IOExceptione) {
130+
editor.statusError(e);
131+
}
132+
catch (Exceptione) {
133+
// Arduino 1.6.5 doesn't have FileUtils.createTempFolder
134+
// String buildPath = BaseNoGui.getBuildFolder().getAbsolutePath();
135+
java.lang.reflect.Methodmethod;
136+
try {
137+
method =BaseNoGui.class.getMethod("getBuildFolder");
138+
Filef = (File)method.invoke(null);
139+
returnf.getAbsolutePath();
140+
}catch (SecurityExceptionex) {
141+
editor.statusError(ex);
142+
}catch (IllegalAccessExceptionex) {
143+
editor.statusError(ex);
144+
}catch (InvocationTargetExceptionex) {
145+
editor.statusError(ex);
146+
}catch (NoSuchMethodExceptionex) {
147+
editor.statusError(ex);
148+
}
139149
}
140150
}
141151
return"";
142152
}
143153

144-
145154
privatelonggetIntPref(Stringname){
146155
Stringdata =BaseNoGui.getBoardPreferences().get(name);
147156
if(data ==null ||data.contentEquals(""))return0;
@@ -150,7 +159,7 @@ private long getIntPref(String name){
150159
}
151160

152161
privatevoidcreateAndUpload(){
153-
if(!PreferencesData.get("target_platform").contentEquals("esp8266") && !PreferencesData.get("target_platform").contentEquals("esp31b") && !PreferencesData.get("target_platform").contentEquals("ESP31B")){
162+
if(!PreferencesData.get("target_platform").contentEquals("esp8266")){
154163
System.err.println();
155164
editor.statusError("SPIFFS Not Supported on "+PreferencesData.get("target_platform"));
156165
return;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp