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

Use same password dialog as in Arduino IDE to authenticate for FS data upload#34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kotl wants to merge1 commit intoesp8266:master
base:master
Choose a base branch
Loading
fromkotl:master
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletionsrc/ESP8266FS.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,12 +34,14 @@
import java.lang.reflect.InvocationTargetException;
import javax.swing.JOptionPane;


import processing.app.PreferencesData;
import processing.app.Editor;
import processing.app.Base;
import processing.app.BaseNoGui;
import processing.app.Platform;
import processing.app.Sketch;
import processing.app.forms.PasswordAuthorizationDialog;
import processing.app.tools.Tool;
import processing.app.helpers.ProcessUtils;
import processing.app.debug.TargetPlatform;
Expand DownExpand Up@@ -307,7 +309,23 @@ private void createAndUpload(){

System.out.println("[SPIFFS] IP : "+serialPort);
System.out.println();
sysExec(new String[]{pythonCmd, espota.getAbsolutePath(), "-i", serialPort, "-s", "-f", imagePath});

PasswordAuthorizationDialog dialog = new PasswordAuthorizationDialog(
editor, "Type board password to upload new data");
dialog.setLocationRelativeTo(editor);
dialog.setVisible(true);
if (dialog.isCancelled()) {
editor.statusNotice("Upload cancelled");
return;
}
String pass = dialog.getPassword();
if (pass.isEmpty()) {
sysExec(new String[]{pythonCmd, espota.getAbsolutePath(),
"-i", serialPort, "-s", "-f", imagePath});
} else {
sysExec(new String[]{pythonCmd, espota.getAbsolutePath(),
"-i", serialPort, "-a", pass, "-s", "-f", imagePath});
}
} else {
System.out.println("[SPIFFS] address: "+uploadAddress);
System.out.println("[SPIFFS] reset : "+resetMethod);
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp