lorol / arduino-esp32fs-plugin

Arduino plugin for uploading files to ESP32 file system
GNU General Public License v2.0
122 stars 18 forks source link

Add OTA password support #17

Open enjoyneering opened 7 months ago

enjoyneering commented 7 months ago

Hi, can you add the OTA passwords support like LeisureLadi did for ESP8266? Thank you in advance.

            // ask for a password
            String passCode = JOptionPane.showInputDialog(editor, "Please enter password:\n(leave empty if none required!)","ESP8266LittleFS OTA Update", JOptionPane.QUESTION_MESSAGE);
            if(passCode != null) {
                if(passCode.isEmpty()) {
                    sysExec(new String[]{pythonCmd, espota.getAbsolutePath(), "-i", serialPort, "-s", "-f", imagePath});
                } else {    
                    sysExec(new String[]{pythonCmd, espota.getAbsolutePath(), "-i", serialPort, "-s", "-f", imagePath, "-a", passCode});
                }
            }