Skip to content

Commit

Permalink
More universal way to get chip model
Browse files Browse the repository at this point in the history
  • Loading branch information
lorol committed Dec 15, 2020
1 parent a41ef5c commit e4c702f
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/ESP32FS.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import processing.app.Sketch;
import processing.app.tools.Tool;
import processing.app.helpers.ProcessUtils;
import processing.app.helpers.PreferencesMap;
import processing.app.debug.TargetPlatform;

import org.apache.commons.codec.digest.DigestUtils;
Expand Down Expand Up @@ -536,16 +537,10 @@ private void eraseFlash(){
}
}

private String getChip() {
String targetBoardId = BaseNoGui.getTargetBoard().getId();

if (targetBoardId.contains("s2")) {
return "esp32s2";
}
else {
return "esp32";
}

private String getChip(){
PreferencesMap prefs = BaseNoGui.getTargetBoard().getPreferences();
String mcu = prefs.get("build.mcu", "esp32");
return mcu;
}

public void run() {
Expand Down

0 comments on commit e4c702f

Please sign in to comment.