gepd / uPiotMicroPythonTool

MicroPython Sublime Text Plugin
MIT License
29 stars 6 forks source link

observations and questions #2

Open gepd opened 6 years ago

gepd commented 6 years ago

Copied from https://github.com/gepd/uPiotMicroPythonTool/issues/1

@jevers76

  1. Is there a good way to update your changes? I un-installed and re-installed upiot. Could I just overlay the new files on top of the old?
  2. Is there a way to connect to the ESP where every key goes to the ESP. Right now many keys seem to be filtered out like ctrl-C and other control keys.
  3. when I did 'sampy ls' it showed my files, but when I did 'sampy run myfile.py' it showed file not found
  4. The run command 'UPIOT:Run Current File' did not seem to work, but I think it did work one time, i think
  5. It would be nice to have a stop program command, perhaps the ctrl-C functioning would satisfy that.
  6. It would be nice to show the COM port connection status somewhere.

I only was able to spend a short time today, but I will in the near future. I was planning to merge ampy with the terminal example that is with pyserial snd build my own ide, but now I will use upiot. Thank You

John

gepd commented 6 years ago
  1. Yes, if you installed the plugin as is described in the setup section, it will automatically update the plugin, but if you are not receiving a recent change you can force it using the Package Control: Upgrade/Overwrite All Packages option.

  2. Due the limitations of ST it's not possible to do that exactly as you do in the windows console or bash. But I think it's possible to assign some shortcuts to get a similar behavior, I'll check this. Implemented with: https://github.com/gepd/uPiotMicroPythonTool/commit/f2fe9631be97004cd1562367c52369204087e216

  3. sampy run will execute a local file in your board, you can use the command Sync Files From Device (ctrl+alt+m) to store your files in your machine and then execute them in the board.

  4. You need to make sure your windows file is in focus/selected and then run your file, note that you can use a shortcut for that.

  5. I'll add this in a near future too, at this moment in you close the console or disconect the device, it will close the connection automatically.

  6. I agree, I'm experimenting with a fuction to change the status bar when it happens, and also information with the port connected. implemented in v0.1.3-alpha https://github.com/gepd/uPiotMicroPythonTool/commit/b3c7e0279ab4a03dc1a4dd1be3775b1068c21060

I'm still working in the plugin and has been like a week since the first public alpha release so I still have to improve somethings until the first stable release, but I really appreciate your comments/questions, it will help me to improve the plugin.

You can keep commenting here with doubts or new features you feel it's missing

gepd commented 6 years ago

In https://github.com/gepd/uPiotMicroPythonTool/commit/f2fe9631be97004cd1562367c52369204087e216 I've add a shortcut and a command to send the ctrl+c string. I've added the documentation about it too

jevers76 commented 6 years ago
  1. I was able to upgrade to your newest code using the Package Control: upgrade package. I am not sure if I also needed to specify the repository or not because I attempted to upgrade both ways without restarting Sublime inbetween. The upgrade tool affect only when Iexited and restarted Sublime.

  2. I am still having getting a program to show its output. I loaded the following program: print('abc') i = 1 while(1): print(i) i = i + 1 Nothing was printed. I was able to use the Ctrl-C to stop the program. Where should the program output be shown?

  3. I used the command 'sampy ls' and would see a list of files current loaded on my board. poot.py and main.py and others including my.py. When I attempt to run with the command 'sampy run mp.py' it reports 'no such file or directory'. I expected it to run my program.

On Wed, Nov 1, 2017 at 9:56 PM, gepd notifications@github.com wrote:

1.

Yes, if you installed the plugin as is described in the setup https://github.com/gepd/uPiotMicroPythonTool#setup section, it will automatically update the plugin, but if you are not receiving a recent change you can force it using the Package Control: Upgrade/Overwrite All Packages option. 2.

Due the limitations of ST it's not possible to do that exactly as you do in the windows console or bash. But I think it's possible to assign some shortcuts to get a similar behavior, I'll check this. 3.

sampy run will execute a local file in your board, you can use the command Sync Files From Device (ctrl+alt+m) to store your files in your machine and then execute them in the board. 4.

You need to make sure your windows file is in focus/selected and then run your file, remember you can use a shortcut https://github.com/gepd/uPiotMicroPythonTool#shortcuts for that. 5.

I'll add this in a near future too, at this moment in you close the console or disconect the device, it will close the connection automatically. 6.

I agree, I'm experimenting with a fuction to change the status bar when it happens, and also information with the port connected.

I'm still working in the plugin and has been like a week since the first public alpha release so I still have to improve somethings until the first stable release, but I really appreciate your comments/questions, it will help me to improve the plugin.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gepd/uPiotMicroPythonTool/issues/2#issuecomment-341303669, or mute the thread https://github.com/notifications/unsubscribe-auth/AEWshU36nY2XUYufZOxOkNkiCrUYO-xJks5syS90gaJpZM4QPGQo .

gepd commented 6 years ago
  1. You only have to specify the repository once, when you install the plugin, that way you will automatically receive the changes in the develop branch. The Upgrade Package option will not affet the plugin if you manually installing it.

The upgrade tool affect only when Iexited and restarted Sublime.

Yes, you always have to reinstall ST

  1. At this moment won't be output until you stop the program, that is the way how ampy works, but I'm making the changes to solve this. https://github.com/gepd/uPiotMicroPythonTool/commit/6ceba526b00f3812b4e64d9ae0f0187cbaaae9a2 should improve this issue

  2. You are missunderstanding sampy run, you can't run a file that is already on the device, you first need to save in your machine. use Sync Files From Device to do that and then you can run your script like in this gif.

Just note that your file need to be selected (in focus) when your run the command or press the shorcut

sampy run