Coder Social home page Coder Social logo

4refr0nt / esplorer Goto Github PK

View Code? Open in Web Editor NEW
1.2K 1.2K 326.0 16.87 MB

Integrated Development Environment (IDE) for ESP8266 developers

Home Page: http://esp8266.ru/esplorer/

License: GNU General Public License v2.0

Lua 0.47% Java 99.47% Batchfile 0.01% Python 0.03% Shell 0.02%

esplorer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esplorer's Issues

Font size change does not match corresponding menu?

View -> Terminal font size inc/dec and Change font size from x to y in terminal's popup menu does not work;
View -> Editor font size inc/dec and Inc/Dec font size in editor's popup menu does not change the editor font size, but changes the terminal font size instead.

File Manager Panel - Scroll Box

Hello,

Can you please add in File Manager Panel, one scroll box with buttons (up and down) to be possible to open all files in list ?

Regards,

VS

Timeout error on connect

After updating to RC5 the connection no longer gives connecting dots and I get a time out waiting answer from ESP. I have to send node.heap() to get a response.
Linux 64 os.

How does the autodetect work?

I'm having a bit of trouble getting ESPlorer to autodetect my NodeMCU firmware, what is the expected handshake? It seems to be a caret distance of more than 10? The thing is, this only seems to happen when the device is restarted, not when opening the port. So when opening the port it just hangs unless resetted. Unless autodetect is disabled, then it works fine. I'm a bit new, in earlier versions upon opening the port it printed out the firmware version?

This seems to be the section responsible for autodetecting the firmware:

public void CheckComm() {
        if (!AutodetectFirmware.isSelected()) {
            portJustOpen = false;
            return;
        }
        portJustOpen = true;
        TerminalAdd("\r\nCommunication with MCU..");
        checker = new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                if (portJustOpen) {
                    btnSend("");  // only CR+LF
                    TerminalAdd(".");
                    if (Terminal.getCaretOffsetFromLineStart() >= 10) {
                        TerminalAdd("\r\n");
                    }
                } else {
                    try {
                        openTimeout.stop();
                    } catch (Exception e) {
                        log(e.toString());
                    }
                }
            }
        };
        openTimeout = new Timer(3000, watchDog);
        openTimeout.setRepeats(false);
        openTimeout.setInitialDelay(3000);
        openTimeout.start();
    }

This is the 'error' message I'm getting:

PORT OPEN 115200

Communication with MCU..<this is the point I've resetted!>Got answer! Communication with MCU established.
AutoDetect firmware...

Can't autodetect firmware, because proper answer not received (may be unknown firmware). 
Please, reset module or continue.
lnn���b�p�lrlrlp�n����lbn�|��l�|��b��nn�l��l`����nnl`���nr���nr��`�p�n���r�����bn�|����b��nn�l`����nnl�l`���nr���n�bl`�`�n��b�nl���nn���lp�n���r�����l�bn�|�b��nn�l�l`����nnl`���nr���n����l�r��n����l������n��r��n|�llll`���r�l�l���

NodeMCU 1.5.4.1 build unspecified powered by Lua 5.1.4 on SDK 1.5.4.1(39cb9a32)
lua: cannot open init.lua - See more at: http://www.esp8266.com/viewtopic.php?f=23&t=13378#sthash.kMMJglx5.dpuf

So I've resetted the device, otherwise it would hang on the ..

wifi ssid pass

Hi
where setup wifi ssid & pass for "wifi conn" button
Thank You

Hardware reset into Lua prompt

It would be really convenient if there was a dialogue button dedicated to hardware reset to Lua prompt based on the common scheme of a init.lua that bales out on gpio.read(3) == 0.

The button would assert RTS for say 500ms, release it and say 200ms later assert DTR for 5000ms and release it.

This is equivalent to pushing the /RST and FL buttons on the board, but they might be be readily accessible.

I note that this reset scheme does not work as commonly wired in articles on the net, but connecting a diode cathode to GPIO16 and anode to /RST does work on the dev kit boards I have on hand. (Detailed explanation at http://owenduffy.net/blog/?p=10024 .

Owen

Allow custom key combinations for code autocomplete

In a Chinese environment, the Ctrl + Space hotkey is a global hotkey preserved for toggling the Chinese input method. Hence the autocomplete cannot be triggered when the default key combination is pressed.

Save&Compile App Button raises Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0

I use this script:

print("test 3")

esplorer_v0_2_0-rc2_by_4refr0nt

leads to:

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0
    at ESPlorer.ESPlorer.FileCompileDoLCActionPerformed(ESPlorer.java:7820)
    at ESPlorer.ESPlorer.access$6200(ESPlorer.java:38)
    at ESPlorer.ESPlorer$60.actionPerformed(ESPlorer.java:1295)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.Component.processMouseEvent(Component.java:6516)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
    at java.awt.Component.processEvent(Component.java:6281)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4872)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:708)
    at java.awt.EventQueue$4.run(EventQueue.java:706)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Issue with saving files with block comments

If I use block comments in my code, I get interpreter errors saying nesting of [[..]] is deprecated.
Resultant file on ESP has all lines uncommented, which is wrong.

e.g.

print("this should print")
--[[
print("this should NOT print")
print("even this should not, since it is block comment")
--]]
print("this should also print")

Above code prints all the lines.

micropython: uploading file problems/fixes.

  • Problem: The editor uploads items too fast, setting dummy mode to delay of 100ms solves, opening options and closeing options causes this value to reset.

  • Solution: make delay of 100ms default.

  • Problem: Characters in string are taken as literals.

  • Solution: change pyfiller.java->escape to
    `
    public String escape(String str) {
    char ch;
    StringBuilder buf = new StringBuilder(str.length() * 2);
    int intValue;
    for (int i = 0, l = str.length(); i < l; ++i) {

        ch = str.charAt(i);
        if (ch == '"') {
            //intValue = ch;
            buf.append("\\");
            //buf.append(ch);
            buf.append(ch);
        } else if (ch == '\'') {
            intValue = ch;
            buf.append("\\");
            //buf.append(intValue);
        } else {
            buf.append(ch);
        }
        else if(ch == '\\')
        {
            buf.append("\\\\");
        }
        else
        {
            buf.append(ch);
        }
    }
    return buf.toString();
    } // escape`
    
  • Problem: file writing adds it all as a single line.

  • Solution: Change line 32 of Pifiller to: sendBuf.add("f.write('" + escape(subs) + "\\n')");

GUI bug driving me crazy :)

If the tooltip is summoned one time, all the GUI get weird and each button redraws the window. Take a look:
image
Any way to disable tooltips?

Themes/Skins

I have great request to make:
because of my visual impairment (not so uncommon at my age) it is very hard to me to use ESPlorer with available skins because they are all dark themes (light text on dark/black background). Also current GUI colours (black on grey) are very hard (almost harder)on my eyes. Because of that I'd really to request that you provide at list one light coloured skin (i.e. dark text on white background). I'd request white background for the GUI as well if that is not overly difficult.
If that means too much effort for you - is it possible that I do it myself somehow?? Of course I'd need some instructions how to go about it.

FileManager Panel Refresh

History:
Up to rc2 it was possible to resize the FileManager panel with the files shown in multiple columns when the manager width is increased.

Problem:
After rc2 up to latest rc, the files shown only show in a single column and it is impossible to see all the files on the ESP.

Suggested fix:
Change the FileManager control to be similar as in rc2.
Add a scroll bar to the panel to scroll down to be able to reach all the files on the ESP

Thread error when "Save to ESP"

My simple test program in Lua:
-------begin---------------
print('tobytest.lua ver 1.0')
wifi.setmode(wifi.STATION)
-------end-------------------

Termial window displays somthing like following:
--------begin---------------------------------------

file.remove("tobytest.lua");
file.open("tobytest.lua","w+");
w = file.writeline;
w([==[pr>> int('tobytest.lua ver 1.0')]==]);
w([==[wifi.setmode(wifi.STATION)]==]);
file.flush();file.close();
dofile("tobytest.lua");
tobytest.lua:2: '=' expected near 'int'
stack traceback:
[C]: in function 'dofile'
stdin:1: in main chunk
--------end-------------------------------------------

More information of the problem:
in ESPlorer.java line 12994
------- original code ---------------
delay = LineDelay.getValue();
------- original code end ----------
I found delay is 0 after this line.
If I increases delay, the problem will lessen, but won't solved . (Still similar error if the program saving has a very long line.)

Save to ESP doesn't work for Micropython

Hello, I use v 0.2.0-rc6 on MacOS.

I've written a file using 'Save to ESP' button.
screen shot 2017-12-27 at 22 46 38
It was successful.
Then I checked the file using picocom:
screen shot 2017-12-27 at 22 48 56
And seems that it's empty.

Btw, several times I couldn't even write a file using 'Save to ESP' - the last line was cut.

Different font sizes

On my hdpi monitor I get a lot of different font sizes. And many of them too small.

screen

JComboBox Port to small

Hi,

I developed something similar, but stop the minute I saw this project! Really great work. HUGE thumbs up!

I've just to minor issues:
-On Mac or Linux the serial ports are named like this: /dev/tty.usbserial-A4001Ib9. This does not fit into the combobox and you have to sort of guess which one is the right.
-You could set a relative working directory or leave it blank. C:... does not exist on none-M$ machines.

Keep on developing.
Thanks
Juergen

Timeout for single line commands

I've been chasing sporadic timeouts when running ESPlorer 0.2.0-rc2 against the latest NodeMCU dev branch builds. Even though #22 resolved the most obvious cases, there remain a few more. Specifically, actions which trigger single line commands can fail with timeout under the following conditions:

  1. User requests to remove a file, FileRemoveESP() is called.
  2. ESPlorer sends command file.remove() and sleeps for ~200 ms.
  3. NodeMCU firmware needs more than 200 ms to complete the command and has not yet responded with the > prompt when FileListReload.doClick() is called.
  4. So ListFiles() sets up everything to list the files.
  5. After total of 270 ms, NodeMCU finally sends the prompt and triggers PortFilesReader. Since the received characters are not related to the intended command for listing the files, it will stop the timer for sending.
  6. No further command is sent to NodeMCU and there's no response, thus WatchDog() triggers after a couple of seconds.

I'd guess that simple activities like file.remove() or node.compile() should have some code to wait and consume the resulting prompt. Just sleeping with the expectation that the prompt is received in time can cause such sporadic issues.

Add saveas and send as init.la

Add saveas to files, so you can save an file and keep track of versions.

Add a button (Send as init.lua) so that you can send files to the esp and rename them as init.lua

Seems lost characters during Save to ESP

file.remove("test.lua");
file.open("test.lua","w+");
w = file.writeline
w([==[str = "Hello World!";]==]);
w([==[print(str);]==]);
file.close();
dofile("test.lua");
stdin:1: attempt to call field 'writelinew' (a nil value)
stack traceback:
stdin:1: in main chunk

Each time I hit "Save to ESP" the console returns something similar to this. Just seems like something has been lost. However "Send to ESP" works. No use changing baud rate.

Bug in file saving process

IDE doesn't write LUA file lines to memory
for some reason it uses (file.writeline) command instead of (file.write)

Example:

file.remove("test.lua");
file.open("test.lua","w+");
w = file.writeline
w([==[print("Test")]==]);
file.close();
dofile("test.lua");
stdin:1: attempt to call field 'writelinew' (a nil value)
stack traceback:
stdin:1: in main chunk

Problems with One-Line Comments

Hey Guys,
I don't know if this is already fixed but with v0.2.0-rc3 I experienced that some code was never called.
The reason is this:

-- Do XYZ
print("Do something")

Now this got into:

w([==[ -- Do XYZ ]==]); w([==[  print("Do something"....

So the goal would be to regexp something like /--(.*)/ to /--[[ (.*) --]]/, so that we can fully flash the correct code (Or maybe even escape the --'s when one really wants the same code on the device)

missing newline on esp

I am new to programming esp's
When i send my micropython code to the ESP (ESP-01) i see that he is sending each line like this:

f = open('main.py', 'w')
f.write('import fancyStuff')
f.write('do fancyStuff')
f.close();

This result in a oneliner because there is no \n at the end of each line.
When i execute print([x for x in open('main.py').readlines()])
i get this: ['import fancyStuffdo fancyStuff']

Do i have to put a "\n" in each line of my sourcecode to get newlines on my esp?

The command line does not support native Mac shortkeys

I'm using ESPlorer on a Mac running El Capitan. While I can use all shortkeys like cmd+A, cmd+C, cmd+V inside the code editor as usual, the command line input field does react only on combinations of ctrl+A, ctrl+C, ctrl+V ignoring the native key combinations.

Add button for ping

Would be great to also have an input field + button for sending a ping on the AT station tab.

Line Endings not preserved in Python code

When a Python file is sent to ESP Flash, the line feeds are getting removed. This results in an invalid python file.

The file uploaded via Esplorer looks like
['def main(): print ("Hello Main2")print('Hello Main 1')main()']

The same file uploaded via WebRepl looks like
['def main():\n', ' print ("Hello Main2")\n', '\n', "print('Hello Main 1')\n", 'main()']

As you can see the "\n" chars are getting removed when sending via esplorer.

Sample python code in main.py

def main():
  print ("Hello Main2")

print('Hello Main 1')
main()

Sending garbage in strings to NodeMCU v1.0

I really don't know what is happening, but when I send or save to nodemcu, lua code, most of the times it can't send and throw stdin errors and in the console I see that what is being sent contains garbage characters and that's why it is breaking. Any ideas on how to fix this?

Example: Sending print("Hello World") -> print(""#$...") and other garbage.

Build .jar files

Could you build the .jar file for the new beta or give me a short instruction how I can do it on my own?
Thank You!

Send settings does not stick. (MicroPython)

In MicroPython mode, Send settings does not stick, and gets reset to "Dumb Mode" with 0ms line delay.
This happens uppon hovering the "Select firmware -> MicroPython" checkbox/text, and after saving a file.

If I change the setting, and make sure not to hover "MicroPython" when changing to the scripts tab, I am able to upload a file, before the settings are reset and I have to change them again.

Could be related to #41, and magic happening there.

recording

You can also clearly see #48 happening here, when hovering the Cancel button.

Version in use is trunk, with some minor adjustments to the way file writes are encoded 80893ea
Compiled with NetBeans on Archlinux, and ran on Windows 10.

NodeMCU firmware autodetection

Communication with MCU...
Got answer! AutoDetect firmware...
Can't autodetect firmware, because proper answer not received.

I can't understand this. With latest NodeMCU firmware (nodemcu_float_0.9.6-dev_20150704.bin), the answer to "CR/LF" is "CR/LF/> ". Which is detected by code "if (data.contains("\r\n>")) {". But I can't find where "CR/LF" is sent to the NodeMCU... Any idea to improve ?

Open recent files list

New menu option
File > Open recent from disk >
which displays a list of the 10 most recent files in last opened order. Click on list item to open file.

ESPlorer waits for NodeMCU reply ... forever .......... ..... ....

Flashing newest firmware is done well using command "sudo python esptool.py --port /dev/ttyUSB0 write_flash 0x00000 ./nodemcu_latest.bin"

after that, i launch ESPlorer using command "sudo ./ESPlorer.jar"
it founds port /dev/ttyUSB0 successfully, but when it tries to comunicate ("open" button) no response is comming from node mcu, please help ...

SnippedText and Terminal

Hello,

I have these errors in netbeans:

cannot find symbol Terminal and SnippedText.

Any suggestion?

Thanks in advance

feature request:file manager scroll

Hello,
it must be easy to be done, if someone have time and desire,
I usually have around 30 files on my ESP and file managerpanel show only 10 of them. If it was made scroll able will be awesome.

Let's uncheck AutoRun

There is no way to uncheck "AutoRun file after save tor ESP" at settings tab.
Perhaps this is the reason for issue #17.
esplorer

"Save" command behaves as "Save and Run"

When issuing Save (both from Ctrl+S or button), an upload followed by dofile(FILE) call is executed. There is acually no way to just upload a file (e.g. not a LUA file)

ESplorer v0.2.0-rc5 no longer autodetects AT firmware of ESP-01

I'm using ESP-01 modules with an USB-CH340 adapter; since v0.2.0-rc5 (binary downloaded as v0.2.0-rc6 from your site, but title bar and About dialog names it v0.2.0-rc5) the autodetection of the AT firmware of my ESP-01 modules does no longer work; when I switch back to v0.2.0-rc3 then my modules are properly detected again; modules have:
AT version:0.40.0.0(Aug 8 2015 14:45:58)
AT version:0.60.0.0(Jan 29 2016 15:10:17)

Code editor: Search and replace

Search and replace dialog in code editor.

  1. Find, Replace and Replace All buttons.
  2. Match case, Match whole word, In selection options checkboxes.
  3. Selecting a word and pressing Ctrl+F opens dialog with selected text pre filled in and selected. Enter performs search (selects next match).
  4. Ideally, highlight all matches in other color.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.