Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 02:25 20 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMEdit V5

     Page 11 of 19    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 11:58pm 29 Aug 2022
Copy link to clipboard 
Print this post

1) still a lot more work to do on the help.
2) There will always be a conflict with which parameters to include as keywords but I agree that "UP" should not be one.
3) Not good, I will fix that.
4) Messy but this works:
  Quote  Command files: Command files are similar to batch files.

The following directives are available. There is no space between the ' and the command.
'reconnect nn [port] = Disconnect the device wait nn seconds then reconnect. If a com port in the form "com4:115200 etc is found, this port will be used to reconnect. This is useful if you have sent a command to change the console baud rate. Linux users - port change not available yet.

'nap nn = wait nn seconds before sending the next line. Useful for slow devices

One example of a command file is used for re-configuring a picomite after firmware updates. (This is not normally required)

'target port\com4:115200 s\command settime
option reset
'reconnect 3
flash erase all
'nap 3
var clear
'echo system cleared

'echo CPU speed changing - com port will reset
OPTION CPUSPEED 250000
'reconnect 5
OPTION SYSTEM SPI 14,15,16
'reconnect 5
OPTION SDCARD 17
'reconnect 5
OPTION LCDPANEL ILI9341,L,10,11,12
'reconnect 5
OPTION TOUCH 19,20
'reconnect 5
GUI CALIBRATE 0, 250, 504, 925, 747
'reconnect 5
'echo All done!
' OPTION SYSTEM SPI CLKpin, MOSIpin, MISOpin
' OPTION SDCARD CS
' OPTION LCDPANEL ILI9341, orientation, DCpin, RESETpin, CSpin
' OPTION TOUCH IRQpin, CSpin

Here we have reconnect 5 seconds after sending the OPTION RESET command.
snooze for three seconds after sending "FLASH ERASE ALL"
etc.

Note that, with all the pauses which currently pause the MMCC program, there will be periods of apparent inactivity.
Just be patient!

Updating a pico is as simple as
dragging the uf2 file onto the MMCC console, wait for the firmware update to finish,
drag the pico.bas configuration file onto the MMCC console area.

You now have an updated and clean picomite again.


VK7JH
MMedit   MMBasic Help
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 842
Posted: 07:05am 30 Aug 2022
Copy link to clipboard 
Print this post

Thanks Jim,
Exactly what I had in mind.

Cheers,

Andrew
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 05:55am 31 Aug 2022
Copy link to clipboard 
Print this post

A few bug fixes and some cosmetic fiddling
  Quote  Changes:

31 Aug 2022
Fixed bug with format code when last line did not have line-ending.
Changed AUTOSAVE upload timing to better allow for slow devices.
Fixed bug in MMCC macros

22 Aug 2022
Banished another bug which caused garbage to appear at the end of some files when loaded into the editor.
Improved VT terminal handling of chr(0). You have the option of creating it as space or null.

21 Aug 2022
MMEdit crunch now leaves lines starting with # intact.
Restored code folding which was lost when code completion was introduced.
Bug sending some empty lines during upload fixed. Unknown when that started!


Jim
VK7JH
MMedit   MMBasic Help
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3590
Posted: 08:50pm 31 Aug 2022
Copy link to clipboard 
Print this post

Hi Jim,

Installed your latest version on Ubuntu 20.04 (had installed QT5 already for the previos version) and it works great.

I adapted the paths in the 2 desktop files, and copied them to

/usr/share/applications/

(You have to be root to have rights to do that)

After that MMEdit and MMCC wgere visible in the menu, and could be started from the icons. From there you can move them to the desktop for easier access.

MMCC now remembers configurations.
I found only 1 cosmetic issue. The MMCC terminal window is larger than the default size of the window. Pulling the window larger solves the problem.

I have found no other issues. Works fine, since I have this QT version, I never opened the build in editor for development.

Thanks for this great product...

Volhout
PicomiteVGA PETSCII ROBOTS
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 09:30pm 31 Aug 2022
Copy link to clipboard 
Print this post

Thanks for the report. I think I am finally getting there but still plenty more to tidy up.
I tried putting my shortcut files into /usr/share/applications/ and they work but no icon. I think I might have to use png instead of ico files for the images. I will give that a try later.

Jim
VK7JH
MMedit   MMBasic Help
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 275
Posted: 12:11am 02 Sep 2022
Copy link to clipboard 
Print this post

  Quote   I think I might have to use png instead of ico files for the images. I will give that a try later.


I'm pretty sure that's the case... but I'm only a Linux Casual.  (Ubuntu website sort of backs me up on that)
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 1657
Posted: 12:12am 02 Sep 2022
Copy link to clipboard 
Print this post

I am using mmedit v4.1.4 build 9 dec 21 07-27-22 utc whatever and I like it for coding mmbasic. pisses over the built in editor imho.
if it is not broken then...you know.
as a new mmbasic user I have to enter options using a terminal and can not see how the inbuilt editor is not a terminal.
mmedit seems a normal windoze program with a few specific icons for mmbasic and so easy to use.
mmbasic new users are made aware of mmedit if downloading picomite but the emphasis is always the inbuilt editor which is a pain for windoze users.

Too early for me to try anything beta just hope it works well.
thanks for the version I use. stan
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 275
Posted: 12:50am 02 Sep 2022
Copy link to clipboard 
Print this post

really... stop using  v4.1.4 and give Version 5 a try.

No reason to be scared away because it says BETA.  It works, and any issues get fixed.
Edited 2022-09-02 10:51 by pwillard
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 05:38am 08 Sep 2022
Copy link to clipboard 
Print this post

I have uploaded an update for Windows and Linux (still no love given to RPi)

The main work has been getting some of the file transfer routines running in their own thread. It doesn't make things happen any faster but it stops the Window from looking like it has frozen.

The picomite keyword list has had some attention and should have all commands and function but not all parameters.

Command files now require the file extension to be 'mmc' instead of 'bas'
  Quote  Changes:

8 Sep 2022
Changed command file requirements. If using drag&drop, the file extension must be 'mmc'
Changed file uploading to use threads. No faster but the Windows don't freeze during uploads.
No longer require device connected when starting file manager but device specifications still need to be correct.
Bug with file manager and cmm2 fixed.

2 Sep 2022
Added \D and \H to the macros for UTC date and time. \d and \h are still local time.
Found where the pesky right-click popup menu in MMCC terminal was hiding.
Cosmetic improvements when selecting 'favorite' devices in MMCC


I have added some timing to the various transfer methods. "If you can't measure it, you can't control it."

A CMM2 running at 460800 baud uploads at about 30mS per line
A picomite running at full USB speed uploads the same 701 line file at about 23mS per line.
That's 16 seconds for the pico and 20 seconds for the CMM2

A line delay of 50mS in TeraTerm should be about right when pasting with AUTOSAVE.

If your program is a few thousand lines long , it is much quicker to do small edits with the built-in editor.

Jim
Edited 2022-09-08 15:40 by TassyJim
VK7JH
MMedit   MMBasic Help
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5771
Posted: 07:32am 08 Sep 2022
Copy link to clipboard 
Print this post

Stan:
When you use MMEdit you make changes to your program on the PC then download the entire program into the Pico using a terminal - although you don't see the terminal as a separate program. It's still a terminal as that's the only way to connect to a Pico.

When you use the built in editor you first connect using a terminal that you *do* see (usually Tera Term but it doesn't have to be). Anything you type is then sent over the terminal connection immediately, where the Pico acts on it.

The Pico, on first connection, is in command line mode. You set stuff up there. Press F4 and you are in the built-in editor. Press F1 from there and you are back in Command line or press F2 to run your program immediately - you don't need to download it first as it's already there. If your program stops for some reason then you are returned to the editor with the cursor on the line where the problem occurred. If you want a big editing screen set Tera Term (terminal settings) to the number of lines and characters that you want. You can also set the font etc. Then use OPTION DISPLAY lines [,chars] to match what you set Tera Term to. I currently use 40 lines of 120 characters. I could easily fill the full screen if I wanted to. All the function keys are labelled across the bottom of the display, so very easy to remember. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 03:49am 09 Sep 2022
Copy link to clipboard 
Print this post

Another update for the Linux version. No changes to Windows versions.

Most of the problems appeared when I changed the subsystem from GTK to qt to fix a problem with scrolling. I keep finding differences between qt and GTK so there may be other gotcha's.

With Linux, there were bugs with save to RTF, save keyword case and printing.
'Save to RTF' and 'save keyword case' have been fixed but printing under Linux still has issues so I took the cheats way out.
Printing under Linux sends the code file to your default editor for bas files and you can print from there.

On my Linux setup, after 'Save to RTF' the new file is opened in LibreOffice. I am not sure what will happen if you don't have an application that accepts RTF. I will add an option to not open a viewer if there are issues.

Jim
Edited 2022-09-09 14:22 by TassyJim
VK7JH
MMedit   MMBasic Help
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 275
Posted: 01:47pm 09 Sep 2022
Copy link to clipboard 
Print this post

  Quote  The Pico, on first connection, is in command line mode. You set stuff up there. Press F4 and you are in the built-in editor. Press F1 from there and you are back in Command line or press F2 to run your program immediately - you don't need to download it first as it's already there. If your program stops for some reason then you are returned to the editor with the cursor on the line where the problem occurred. If you want a big editing screen set Tera Term (terminal settings) to the number of lines and characters that you want. You can also set the font etc. Then use OPTION DISPLAY lines [,chars] to match what you set Tera Term to. I currently use 40 lines of 120 characters. I could easily fill the full screen if I wanted to. All the function keys are labelled across the bottom of the display, so very easy to remember. :)


While this makes sense and all... I find the editor (when used inside MMCC 2022-08-31) to be pretty much unusable...  the Terminal in MMCC seems to have no idea what it's doing and editing just makes a mess.

Works fine in Teraterm.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 10:24pm 09 Sep 2022
Copy link to clipboard 
Print this post

  pwillard said  While this makes sense and all... I find the editor (when used inside MMCC 2022-08-31) to be pretty much unusable...  the Terminal in MMCC seems to have no idea what it's doing and editing just makes a mess.

Works fine in Teraterm.

I agree that TeraTerm is a much better terminal program but could you expand on "editing just makes a mess"



If I don't know there is a problem, I don't know to try and fix it.

Jim
VK7JH
MMedit   MMBasic Help
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 275
Posted: 11:27pm 09 Sep 2022
Copy link to clipboard 
Print this post

It's kind of hard to explain. I'll focus on one behavior I see.

I'm using a picomite, latest beta, latest MMEDIT and MMCC.

I have a program running. (note: It's using VT100 sequences for cursor positioning)

I'll give you an example.

If I CTRL-C in MMCC to get command mode back and I then enter EDIT mode, I can move the cursor all around, no issues it seems... but let's say I move the cursor to the end of line 14.


'
' References:
'



I move the cursor to just after the colon ":" and press the SPACE key to add spaces after it.

I suddenly get:


'
' Reference:' Reference:
'



Heck, that's not right... It's like when I press the spacebar... I'm getting chars from a line buffer pasted in somehow.  Makes editing difficult if not impossible.  The unintended characters always come from the current line.

Another example:
' Program:      Vttime<-Cursor is here and I press space


becomes...


' Program:      Vttime' Program:      Vttime  


And it's not just end-of-line... if I go to the middle of a line and press the spacebar to add spaces... it inserts all the characters in the line up to that point where the cursor is.

I press the spacebar with the cursor between DEFAULT and INTEGER


Edited 2022-09-10 09:35 by pwillard
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 06:01am 10 Sep 2022
Copy link to clipboard 
Print this post

Another update.
This one includes the Linux fixes.
Fixes a bug in picomite editor when OPTION COLOURCODE ON is set. When colour is turned on, the pico has to start at the beginning of the line whenever you edit it to determine the correct colours to use. The way the pico moved to the start of the line is different to the cmm2. Both methods are valid but I hadn't allowed for the pico method.
You now have to select the end-of-line being received - leaving it at CRLF should be OK for most uses.
Cosmetic improvements to the MMCC terminal display.

  Quote  Changes:
10 Sep 2022
Fixed bugs in Linux version relating to 'print' 'save as RTF' and 'save keyword case'
(More work needed before Linux can print as it should - working on it)
Added line ending selection for received data in MMCC terminal
(This fixes bug with picomite editor in colour mode.)
Increased allowable size of new file intro text to 50 lines

8 Sep 2022
Changed command file requirements. If using drag&drop, the file extension must be 'mmc'
(More info in the help under 'the first line'. It will get it's own page soon.)
Changed file uploading to use threads. No faster but the Windows don't freeze during uploads.
No longer require device connected when starting file manager but device specifications still need to be correct.
Bug with file manager and cmm2 fixed.


Jim
VK7JH
MMedit   MMBasic Help
 
pwillard
Senior Member

Joined: 07/06/2022
Location: United States
Posts: 275
Posted: 01:07pm 10 Sep 2022
Copy link to clipboard 
Print this post

Thank You.  EDIT works again.
 
andreas

Senior Member

Joined: 07/12/2020
Location: Germany
Posts: 187
Posted: 07:01am 12 Sep 2022
Copy link to clipboard 
Print this post

  TassyJim said  Another update.



works well on my machine - thank you!

-andreas
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 05:48am 15 Sep 2022
Copy link to clipboard 
Print this post

Today's update is for the Linux users. Printing now works.
If you have colour set in the editor, the printout will be in colour.
Likewise, if you are showing physical line numbers, they will be printed.
Word-wrap for long lines is a bit brutal.

The other addition is the option to timestamp incoming lines of text.
It works well with print statements but not much use if you are sending VT escape sequences. The keep-alive sequence sent by the pico after 30 seconds of inactivity is usually not a problem.



  Quote  Changes:

15 Sep 2022
Linux printing working at last

12 Sep 2022
Added Timestamping option to MMCC (in setup menu)
Stopped default user folder from changing when automatically opening this file.
Added menu item to create backups of both inf files. It only backs up files as they were when last saved on exit.


Jim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 12:51am 01 Oct 2022
Copy link to clipboard 
Print this post

This week’s update (posted to the website on 1st October) has a few small changes.
I discovered that goto sub/function would not scroll the target cursor line into view if folding was in use. That has been fixed.

Syntax help (F1) now shows the one-line hint in the status bar. The popup still appears in Windows but the status line text stay there until you move to a different line. This makes entering unfamiliar commands easier.

There is an option in the MMEdit5.inf file to open file selectors with *.* as the search filter instead of *.bas. This would be preferable if your incarnation of Linux is case sensitive with the filter.

In the file manager there is now a button for transferring current program or picomite flash program direct to the editor. Files on SD still need to be transferred to the PC first.

  Quote  Changes:

01 Oct 2022
Syntax help now shows the hint in the status bar in Windows. This was the default for Linux.
The help hint stays visible until the cursor is moved to a different line.
Go to line_sub_function now brings cursor line into view when code folding is in use.
Option to start file selector with *.* instead of *.bas ( Misc preferences, File selector = 1)

28 Sep 2022
Improvements to transferring current program to PC and/or MMEdit
Cosmetic improvements


Jim
VK7JH
MMedit   MMBasic Help
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3590
Posted: 06:50am 03 Oct 2022
Copy link to clipboard 
Print this post

Hi Jim,

Not sure if you are up to this, but here is some experiences on MMEdit5 on LInux.

It is a really usefull tool, I use every day, but some things could use your "touch"...

1/ I do not seem to be able to FIND and REPLACE (these are greyed out). Find works, but cannot replace.

2/ Keyword "C8" is unknown to me....

3/ Feature request ... Is it possible to "color" function names ?
  Let me explain: I am trying to analyze what the chess program does, and it is a nicely formatted and written piece of code. But it has a zillion arrays, and a zillion functions. Now I am looking into minimizing stack usage. It would be so helpfull if I could distinguish between: castle(x,y,z) which is an array, and castle_mask(x,y,z) which is a function.
Or maybe you do already have a tip how to do it with current MMEdit?

Regards,

Volhout

P.S. Cannot duplicate this, but I had a single instance where MMEdit (after editing the chess program) saved a version to disk length 0. I was happy I had a recent copy. Changing filenames now at every save (just to be sure), but have not seen this happen since.
PicomiteVGA PETSCII ROBOTS
 
     Page 11 of 19    
Print this page
© JAQ Software 2024