File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 4343import processing .app .Sketch ;
4444import processing .app .tools .Tool ;
4545import processing .app .helpers .ProcessUtils ;
46+ import processing .app .helpers .PreferencesMap ;
4647import processing .app .debug .TargetPlatform ;
4748
4849import 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 () {
You can’t perform that action at this time.
0 commit comments