Skip to content

Commit e4c702f

Browse files
committed
1 parent a41ef5c commit e4c702f

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/ESP32FS.java

+5-10
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import processing.app.Sketch;
4444
import processing.app.tools.Tool;
4545
import processing.app.helpers.ProcessUtils;
46+
import processing.app.helpers.PreferencesMap;
4647
import processing.app.debug.TargetPlatform;
4748

4849
import org.apache.commons.codec.digest.DigestUtils;
@@ -536,16 +537,10 @@ private void eraseFlash(){
536537
}
537538
}
538539

539-
private String getChip() {
540-
String targetBoardId = BaseNoGui.getTargetBoard().getId();
541-
542-
if (targetBoardId.contains("s2")) {
543-
return "esp32s2";
544-
}
545-
else {
546-
return "esp32";
547-
}
548-
540+
private String getChip(){
541+
PreferencesMap prefs = BaseNoGui.getTargetBoard().getPreferences();
542+
String mcu = prefs.get("build.mcu", "esp32");
543+
return mcu;
549544
}
550545

551546
public void run() {

0 commit comments

Comments
 (0)