Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev: list of bugs and Improvements #209

Open
tablatronix opened this issue Feb 12, 2018 · 74 comments
Open

Dev: list of bugs and Improvements #209

tablatronix opened this issue Feb 12, 2018 · 74 comments

Comments

@tablatronix
Copy link

tablatronix commented Feb 12, 2018

The new commits issues.

Ill just post them here before creating a bunch on new dev issues.

terminal /serial select all during update

Windows
The deviot terminal and serial monitor text gets selected all(highlighted) when it is running. It is very odd. as it updates all the text highlights and stays selected.

@tablatronix
Copy link
Author

tablatronix commented Feb 12, 2018

Serial pane

Windows
Serial monitor forces new layout pane, kind of annoying, I already use serial in pane, but I don't always want it, it also adds new panes when I already have one open, sometimes I have multiple terminals open also (I change com port and start, so i can debug multiple uarts and devices at once). Interesting feature, might need some polishing or options.

If i already have custom layout, I don't need new panes created, so it conflicts with my layouts and messes stuff up.

Every time I close and restart serial, it creates an additional new pane, also.

Also if I do shortcut for serial monitor , it does not seem to work always, but seems to only work when that pane is focused, this was not the case in the past. INVALID, I was toggling it off ( github markdown needs a strikeout! )

also please fix #171

@tablatronix
Copy link
Author

tablatronix commented Feb 12, 2018

Warnings

Windows
Compile linter context errors not working anymore ( I know they were wrong line numbers and annoying but they were very useful, I stated getting used to them )
(FYI aside, arduino precompiler says it adds #linenum directives to source code, wonder if that would help)

@gepd gepd changed the title NEW DEV BUGS Dev: list of bugs and Improvements Feb 12, 2018
@gepd
Copy link
Owner

gepd commented Feb 12, 2018

Every time I close and restart serial, it creates an additional new pane, also.

What is you O.S?
I'm on windows and that is not the behavior I get when I restart it

Also if I do shortcut for serial monitor , it does not seem to work always, but seems to only work when > that pane is focused, this was not the case in the past.

I've not change any code related with the shortcut(s), can you check if there is an error in the console when you run the shortcut?

also please fix #171

it was fixed in dev14

@tablatronix
Copy link
Author

Sorry it has nothing to do with shortcuts, the menu does it also, open serial monitor, new pane is created, close serial tab, open serial monitor , new pane is created again ad infinitum

@tablatronix
Copy link
Author

tablatronix commented Feb 12, 2018

I think the shortcut not working was something to do with the focus and text selection constantly changing. I will see if it happens again.

@tablatronix
Copy link
Author

tablatronix commented Feb 12, 2018

ahh with regards to the shortut issue, I did not realize that the shortcut toggled the serial monitor, I was toggling it on and off accidentally, while trying to restart it , It is hard to know when its on or off, could the tab title be changed to reflect it ?

@gepd
Copy link
Owner

gepd commented Feb 12, 2018

could the tab title be changed to reflect it ?

In dev14 I've introduced a new feature that makes the status bar change the color to green when the serial monitor is connected, and red for 3 seconds when it's disconnected.

However there are some issues I'm solving now related to this new feature (the color keeps green when you close the window)

The updates will come in a few hours

@tablatronix
Copy link
Author

tablatronix commented Feb 12, 2018

Will this continue to work with multiple serial windows running ?
ohh status bar, yeah that doesn't really help with multiples at all. Since it can only show one status.
I thought maybe tab title [off] or something

@tablatronix
Copy link
Author

tablatronix commented Feb 12, 2018

2018-02-12_13-27-08

not sure if gifs work but this is a gif of several issues

  • console doesn't work until its created
  • consoles get highlighted selected all
  • serial monitor creates new panes
  • pio terminal creates new panes

@gepd
Copy link
Owner

gepd commented Feb 12, 2018

I'll add a modification to show the color in the tab instead of the status bar, that way shouldn't be a problem

@tablatronix
Copy link
Author

tablatronix commented Feb 12, 2018

This is how I use serial alot, sometimes even 4 uarts at a time ( debug uarts etc )
2018-02-12_13-36-09

I have not tested manually starting them from terminal, i just change com and start for now.

@gepd
Copy link
Owner

gepd commented Feb 12, 2018

console doesn't work until its created

I'll solved this now, the rest of the issues are already solved. I'll it push it all together

@tablatronix
Copy link
Author

Sounds good, let me know if you need anything to be tested, I will follow up also on OSX later

gepd added a commit that referenced this issue Feb 12, 2018
…minal; setting options are `terminal_direction` and `monitor_direction` possible values `up`, `down`, `left`, `right`, `self` (Issue: #209)
@gepd
Copy link
Owner

gepd commented Feb 12, 2018

Released dev.15

The deviot terminal and serial monitor text gets selected all(highlighted) when it is running. It is very odd. as it updates all the text highlights and stays selected.

Fixed

Serial monitor forces new layout pane, kind of annoying, I already use serial in pane, but I don't always want it, it also adds new panes when I already have one open, sometimes I have multiple terminals open also (I change com port and start, so i can debug multiple uarts and devices at once). Interesting feature, might need some polishing or options.

If i already have custom layout, I don't need new panes created, so it conflicts with my layouts and messes stuff up.

I've added the menu to edit the deviot preferences, go to Preferences > Package Settings > Deviot > Settings

Changes the option terminal_direction and monitor_direction to self. It will avoid to create a new panel

Compile linter context errors not working anymore ( I know they were wrong line numbers and annoying but they were very useful, I stated getting used to them )
(FYI aside, arduino precompiler says it adds #linenum directives to source code, wonder if that would help)

I hope to bring back this soon

console doesn't work until its created

Fixed too

@tablatronix
Copy link
Author

osx first run update, it said could not import color_ something, some color file and deviot didnt start, I restarted and it works. Ill see if i logged it somewhere.

@tablatronix
Copy link
Author

tablatronix commented Feb 13, 2018

  • osx serial not working
reloading settings Packages/User/deviot.sublime-settings
Exception in thread Thread-519:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "/Users/shawn/Library/Application Support/Sublime Text 3/Packages/Deviot (Arduino IDE)/libraries/serial.py", line 94, in start
    if is_available(self.port):
  File "/Users/shawn/Library/Application Support/Sublime Text 3/Packages/Deviot (Arduino IDE)/libraries/serial.py", line 182, in is_available
    serial.open()
  File "/Users/shawn/Library/Application Support/Sublime Text 3/Packages/Deviot (Arduino IDE)/libraries/pyserial/serialposix.py", line 271, in open
    self._reconfigure_port(force_update=True)
  File "/Users/shawn/Library/Application Support/Sublime Text 3/Packages/Deviot (Arduino IDE)/libraries/pyserial/serialposix.py", line 373, in _reconfigure_port
    if self._stopbits == serial.STOPBITS_ONE:
NameError: global name 'serial' is not defined

@tablatronix
Copy link
Author

tablatronix commented Feb 13, 2018

  • osx upload error
    if i compile first then upload it works... seems platformio.ini has to exist, or upload does not compile first?

top level value must be an array
Exception in thread Thread-563:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "/Users/shawn/Library/Application Support/Sublime Text 3/Packages/Deviot (Arduino IDE)/platformio/upload.py", line 40, in start_upload
    self.check_port_selected()
  File "/Users/shawn/Library/Application Support/Sublime Text 3/Packages/Deviot (Arduino IDE)/libraries/project_check.py", line 229, in check_port_selected
    config.read(ini_path)
  File "/Users/shawn/Library/Application Support/Sublime Text 3/Packages/Deviot (Arduino IDE)/libraries/readconfig/__init__.py", line 99, in read
    if(not path.exists(filepath)):
  File "./python3.3/genericpath.py", line 18, in exists
TypeError: can't specify None for path argument

@gepd
Copy link
Owner

gepd commented Feb 13, 2018

I've pushed a commit to solve the serial problems, checks and let me know if you keep getting that errors.

Upload compiles too, I suspect it's related with the serial issue It's, pyserial is returning a null port that is why the second error

@tablatronix
Copy link
Author

tablatronix commented Feb 13, 2018

here is that upgrade error, osx and windows.

reloading plugin Deviot (Arduino IDE).Deviot
Traceback (most recent call last):
  File "C:\Users\user\Documents\projects\bin\sublimetext\sublime_plugin.py", line 109, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 584, in _check_name_wrapper
  File "<frozen importlib._bootstrap>", line 1022, in load_module
  File "<frozen importlib._bootstrap>", line 1003, in load_module
  File "<frozen importlib._bootstrap>", line 560, in module_for_loader_wrapper
  File "<frozen importlib._bootstrap>", line 868, in _load_module
  File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed
  File "C:\Users\user\Documents\projects\bin\sublimetext\Data\Packages\Deviot (Arduino IDE)\Deviot.py", line 20, in <module>
    from .libraries.paths import getDeviotUserPath, getPluginName, status_color_folder
ImportError: cannot import name status_color_folder
  • deviot does not start, after restarting ST it works.

@tablatronix
Copy link
Author

tablatronix commented Feb 13, 2018

  • terminal_direction not self still makes additional panes, not sure if you meant that was fixed or not. (feature..)

  • self works as before 👍

@tablatronix
Copy link
Author

tablatronix commented Feb 13, 2018

Windows

  • deviot console does not scroll if serial auto scroll off.

@gepd
Copy link
Owner

gepd commented Feb 13, 2018

No new panel is created when I change the setting in my machine:

panel_direction

@tablatronix
Copy link
Author

When NOT self

@tablatronix
Copy link
Author

tablatronix commented Feb 13, 2018

windows

  • starting serial monitor opens deviot console.

@tablatronix
Copy link
Author

tablatronix commented Feb 14, 2018

Of course
Ill make a gif, my serial restarts in the focused pane, the left pane.
confirmed only osx, not reproducible on windows

@tablatronix
Copy link
Author

Windows
console still opens when starting serial monitor.

@tablatronix
Copy link
Author

so far very stable, been using it all day. Will try to test advanced stuff like ota etc.

@gepd
Copy link
Owner

gepd commented Feb 15, 2018

I've pushed a possible fix for the console issue (9b77d5c)

I'll add two more features before release the next version

  1. Linter context errors
  2. An option to cancel the compile/upload process

@tablatronix
Copy link
Author

tablatronix commented Feb 16, 2018

using osx today, also looking pretty good and stable.

  • End timestamp
    Can you add a timestamp to the end of the deviot console when done with stuff, I know its at the top, but having an end stamp would be useful, say when upload done, when compile done, so i can just check it and make sure I am not looking at old output... "shit did I reupload this change? ahh just run it again"

@tablatronix
Copy link
Author

Does serial monitor log to a temp file, or it is just a buffer?

@gepd
Copy link
Owner

gepd commented Feb 16, 2018

Can you add a timestamp to the end of the deviot console when done with stuff

Yes I can, I did that in the past for the same reason. When I rewrite the code I forgot to added again.

Does serial monitor log to a temp file, or it is just a buffer?

It's just a buffer, but wouldn't it be a problem to be stored in a file. Do you want this for the trace decoder?

@tablatronix
Copy link
Author

tablatronix commented Feb 16, 2018

Yes I figured I can run external stuff on it in real time if so, without hooking into ST to do it.

I have been using the ST log highlighter plugin for coloring the terminal, serial ports and live log files, its pretty powerful.

@gepd
Copy link
Owner

gepd commented Feb 16, 2018

Excelent. Maybe I can log only the backtraces and exceptions, that way would be easy

@tablatronix
Copy link
Author

That might be too specific for other uses, unless you were adding specfic debug save to file feature maybe with regex i guess.

@gepd
Copy link
Owner

gepd commented Feb 16, 2018

That might be too specific for other uses, unless you were adding specfic debug save to file feature maybe with regex i guess.

Yes, it's a good idea, I don't know how many people will need that feature, but maybe will be good to have it

I've added the End timestamp and the errors inline feature. Cancel process has a lot of work to make it work, I'll let for next release.

let me know if you find any problem

@tablatronix
Copy link
Author

tablatronix commented Feb 16, 2018

only thing i noticed is that serial terminal takes a long time now to start back up ( as in after upload), even adding a 5000 delay, i miss the boot sometimes.

  • serial takes too long to start
    Looks like its about 2.4 seconds, on osx, I used to be ok with a 1000ms delay after serial.begin

@gepd
Copy link
Owner

gepd commented Feb 17, 2018

You mean, when you are using the serial monitor, uploads your firmware and the monitor starts again?

@tablatronix
Copy link
Author

Yup

@tablatronix
Copy link
Author

I think auto clean broke, on osx i have 77k lines

@gepd
Copy link
Owner

gepd commented Feb 17, 2018

good catch, fixed

@tablatronix
Copy link
Author

tablatronix commented Feb 17, 2018

protip, at 77k lines it just stops apparently, lol i cleared it and it started printing away again

@tablatronix
Copy link
Author

time to be picky
lol

========================= [SUCCESS] Took 10.40 seconds =========================

================================== [SUMMARY] ==================================
Environment esp32doit-devkit-v1	[SKIP]
Environment nodemcuv2_dev      	[SUCCESS]
========================= [SUCCESS] Took 10.40 seconds =========================

[Fri Feb 16 22:54:43 2018]

success is displayed twice with same timestamp, remove one, and the 2 empty lines and you get 3 more lines of info in a smaller panel... just saying... lol

still seems pretty stable, and running well all around.

Loving this version so far.

screen shot 2018-02-16 at 10 57 01 pm

@gepd
Copy link
Owner

gepd commented Feb 17, 2018

serial takes too long to start

I'll have to check this when I have a osx device on my hands, there is not a deliberate delay in that part of the code, but I'll check it later to reduce it somehow

protip, at 77k lines it just stops apparently, lol i cleared it and it started printing away again

Did you try that after the fix? the bug was causing an error, so is possible it was causing the stop

success is displayed twice with same timestamp, remove one, and the 2 empty lines and you get 3 more lines of info in a smaller panel... just saying... lol

It's displayed by PIO. Maybe the best solution is to add the regex filter (thinking in the debug tool too) and remove it, I'll let it to the next release

@tablatronix
Copy link
Author

I will retest, Is it possible to set global environments somewhere?
Does pio check for ini files along some path?

@gepd
Copy link
Owner

gepd commented Feb 17, 2018

I will retest, Is it possible to set global environments somewhere?

Global environments for compile? or to do what?

Does pio check for ini files along some path?

In Deviot the ini file will be checked in the same path where the sketch is stored, also in the parent folder or in the system temp\deviot folder

Normally PIO Core will search the platformio.ini in the current working directory but you can change this with --project-dir More Info

@tablatronix
Copy link
Author

tablatronix commented Feb 17, 2018

Yeah like if i create a new file, can it just use some global environments as in platformio.ini files in heirarchy and create the ini file for me for example. I probably use pio completely wrong, but that is exactly why I use deviot, its not annoying like the atom IDE where you have to have strict projects , i just want to throw a file together, select board, compile and have a new platformio.ini and be running. It kind of works already like this, but I thought platform io might be able to grab ini files along the path to the file.

@gepd
Copy link
Owner

gepd commented Feb 17, 2018

Maybe you can use my python library to read and write ini files: https://github.com/gepd/ReadConfig
I started that library to work with PIO, it's really easy to use. If you are working with ST, you shouldn't have any problem, it's used by Deviot too

@tablatronix
Copy link
Author

I noticed my .cpp file shave a deviot syntax, not c++, and my autocomplete doesn't work well.
If i change it to c++ it works properly and shows my classnames and methods etc.
Is that fixable? I do like the deviot syntax better

@tablatronix
Copy link
Author

tablatronix commented Feb 19, 2018

I figured out the problem with the console, its not those extra lines, it is that it seems to scroll past the buffer leaving lots of empty space and I can never see the output as well.

sublime_text_2018-02-19_08-09-09

I think it did not do that before. id have to rollback to be sure.

Also can
Error: and [ERROR] be syntax scoped ?

@gepd
Copy link
Owner

gepd commented Feb 19, 2018

I noticed my .cpp file shave a deviot syntax, not c++, and my autocomplete doesn't work well.
If i change it to c++ it works properly and shows my classnames and methods etc.
Is that fixable? I do like the deviot syntax better

I'll check how to improve this, can you give me an example to reproduce that diference?

I figured out the problem with the console, its not those extra lines, it is that it seems to scroll past the buffer leaving lots of empty space and I can never see the output as well.

Yes I'm using a new method to scroll lines in the console, what you can do is set the scroll_past_end option to false in the ST settings

Error: and [ERROR] be syntax scoped ?

In don't see where is Error: but anything in the console can be syntax scoped

I also fell like the console syntax need a lot of work, I'll start to make some changes this week

@fiveangle
Copy link

fiveangle commented Aug 11, 2018

Seems a lot of terminal stuff is in this thread, but one annoyance is the creation of a new pane when "Hide Terminal" is selected:

https://www.screencast.com/t/wTTJOtCIemy

Opened #255 for this, but figured would post here since might be relevant

@tablatronix
Copy link
Author

tablatronix commented Aug 11, 2018

I noted this similar in #254 never noticed it on hide though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants