Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : MMEdit V5.2

   Page 6 of 6    
Posted: 12:10pm
21 Apr 2024
Copy link to clipboard
TassyJim
Guru


  toml_12953 said  
Where is MMCC.inf? I searched all over for it and can't find it.


The easiest way to find it is Help/About
There you will find the data folder location.

Jim
 
Posted: 05:57pm
21 Apr 2024
Copy link to clipboard
Pluto
Guru

Working on a program with a main loop and several SUBs.
I had an error in one of the SUBs and the program halted with an error message.
The reported address was however strange; It showed the errorline in the sub, but the line number was for the main loop.

MMEdit and MMCC V5.2.7 for Win 10. Syntax: PicoMite

I was able to find the errorline about 200 lines down in the program, but It would have been much easier with the correct linenumber in the first place.

The actual error came from a SUB that was called from an other SUB.
Do I need to change some settings or is this normal?

Pluto
 
Posted: 06:42pm
21 Apr 2024
Copy link to clipboard
stanleyella
Guru


I had to break this multi line code into bits and use an extra var. How many lines of conditions allowed before insufficient memory error and reports prog size nearly twice real size?
'has lander hit landscape, check pixels around it, any lit crashed
   o=pixel(lander_x,lander_y)+pixel(lander_x,lander_y+10)+pixel(lander_x,lander_y+20)+pixel(lander_x,lander_y+30)+pixel(lander_x,lander_y+40)+pixel(lander_x+29,lander_y)
   o=o+pixel(lander_x+29,lander_y+10)+pixel(lander_x+29,lander_y+20)+pixel(lander_x+29,lander_y+30)+pixel(lander_x+29,lander_y+40)+pixel(lander_x+7,lander_y)
   o=o+pixel(lander_x+14,lander_y)+pixel(lander_x+21,lander_y)+pixel(lander_x+7,lander_y+39)+pixel(lander_x+14,lander_y+39)+pixel(lander_x+21,lander_y+39)
   if o>0 then explode:end
 
Posted: 08:26pm
21 Apr 2024
Copy link to clipboard
Volhout
Guru

[Pluto,

This has no relation with MMedit, it is the picomite.
Tip; when this happens press F4, the built in editor shows where the error occurred. Only the line number shown in the error message is wrong.

Volhout
 
Posted: 09:13pm
21 Apr 2024
Copy link to clipboard
palcal
Guru


@ toml_12953,   if you cant find APPDATA at the top click 'VIEW' and check the box 'HIDDEN ITEMS'
 
Posted: 09:21pm
21 Apr 2024
Copy link to clipboard
TassyJim
Guru


  stanleyella said  I had to break this multi line code into bits and use an extra var. How many lines of conditions allowed before insufficient memory error and reports prog size nearly twice real size?


Not a MMEdit problem.
MMEdit doesn't care how long or how complex it is.
 
Posted: 09:54pm
21 Apr 2024
Copy link to clipboard
stanleyella
Guru


  TassyJim said  
  stanleyella said  I had to break this multi line code into bits and use an extra var. How many lines of conditions allowed before insufficient memory error and reports prog size nearly twice real size?


Not a MMEdit problem.
MMEdit doesn't care how long or how complex it is.

oh. thanks.
 
Posted: 05:11am
23 Apr 2024
Copy link to clipboard
TassyJim
Guru


The attached ZIP contains a Windows 64bit exe and a Linux exe with bracket/brace highlighting.

I am unable to tell if it makes typing slow.

MMedit5beta.zip

It should correctly match (), [], {} and <>.
The choice was all or nothing.

It knows about comments and strings.

I don't think it has stuffed up anything but needs more testing.

Jim
 
Posted: 02:01pm
23 Apr 2024
Copy link to clipboard
Volhout
Guru

Hi Jim,

In the linux version it only highlights brackets red when the cursor is at the line to be editted. Not in the rest of the document.

But it only highlights brackets red when the cursor is directly after a bracket. Not when before a bracket, not when somewhere in the text on that line. Only when directly after the bracket.

Red brackets are highlighted when the number of brackets in the line is correct. When incorrect they are black (their normal color). Is that on purpose ? Feels reverse. But I can work with that.

Regards,

Volhout
Edited 2024-04-24 00:04 by Volhout
 
Posted: 09:30pm
23 Apr 2024
Copy link to clipboard
TassyJim
Guru


Thanks for testing.
I have already added testing the character after the cursor as well as the one before.
I can only highlight one pair at a time so if the character before the cursor is a bracket, it gets tested, if not, the character after the cursor is tested. This is the same behavior as Notepad++.
I intend to test the full line as you leave it and complain if there is a miss-match.
I just need to reduce the amount of testing that currently happens.

Jim
 
Posted: 08:14am
24 Apr 2024
Copy link to clipboard
TassyJim
Guru


Try this version.
while entering, the code tests the character before the cursor and then the character after the cursor.
When you leave a line, it tests for any bad matches of () but not the other braces.
A warning is displayed if required. This warning will stay until you fix the bad match and leave the line again.
Format also annotates lines with bad matches.




MMEdit5beta.zip

Jim
 
Posted: 06:00am
25 Apr 2024
Copy link to clipboard
TassyJim
Guru


MMEdit V5.2.8 has been uploaded to my website.

I have tidied up the matching brace/bracket code.

When you enter the opening bracket '(', the matching closing bracket is added and the cursor between the brackets.
This only happens for '(' and not the other pairs '{}', '[]' and '<>'
You can turn this behavior off in Preferences.

When you place the cursor beside a brace of any kind it's match is highlighted. I chose red because I think it stands out the most but you can edit the inf file if you want a different colour.

When you leave a line, the while line is checked for '()' pairs that are not in strings or comments and advises you if there is a miss-match. The other styles of braces are not checked.
This check is also done when 'formatting' the code.
You can turn this behavior off in Preferences.

Jim
 
Posted: 07:39am
25 Apr 2024
Copy link to clipboard
Volhout
Guru

Wauw,

This is great !!!

Volhout

P.S. I see one issue with MMCC (tested on Linux). When I open it, it's default setting is MAXIMITE, /dev/ttyUSB0, 1200 baud.

I change this to PicoMiteVGA, /dev/ttyACM0, 115200baud.

In the menu I see no way to SAVE this setting. So I immagine, it does this in the background. I close MMCC. When I edit in MMEdit, and send to PicoMite, it opens MMCC with MAXIMITE, /dev/ttyACM0, 1200.

So it only remembers the port, not the baudrate, not the device.
And this is dangerous. Setting /dev/ttyACM0 to 1200 baud forces the PicoMiteVGA into bootloader mode. I was allert enough to pull the USB plug immediately, and still have a working PicoMite...
Edited 2024-04-25 17:46 by Volhout
 
Posted: 08:01am
25 Apr 2024
Copy link to clipboard
TassyJim
Guru


To set a default device.
Start with showing full menus (first item in setup)
set the type, port and speed.
Give it a name
Save settings.

You can now go back to short menus if desired.




I usually have MMCC open and connected before I send uploads to it but that shouldn't matter.

Jim
 
Posted: 12:07pm
25 Apr 2024
Copy link to clipboard
Volhout
Guru

Hi Jim,

I have done such, and have stored only 1 device, the PicoVGA.
Then I return to the short menu's.

When I close MMCC and re-open, it uses /dev/ttyACM0 and 115200 baud. But it is still uses Maximite. (Not PicoVGA). And this is already existing from earlier versions. I change Maximite to PicoMite manually every time, otherwise the file manager will not work correctly.

Another thing (this will be Linux doing).

When I open MMCC is has a 81 x 40 terminal window. With full menu's, you cannot reach (outside the window) the SAVE button. When I use the mouse to enlarge the window (pull edges), it snaps back to the original size.

When I maximize the window, I can see all buttons, but they do not work (you can press them, but no reaction).

When I enlarge the terminal window to 100 x 40, I can see all buttons in the full menu, and also all buttons work. This is the view I am using.

It is an inconvenience, but now I know how to solve it, it is fine.

Volhout
Edited 2024-04-25 22:09 by Volhout
 
Posted: 09:46pm
25 Apr 2024
Copy link to clipboard
TassyJim
Guru


In MMCC
The Setup menu has the option to set terminal size.
If you change it to 100x40 that will save you changing it every time.
You could also choose a larger font size and that will also make the window larger.

You will still have the problem when programs automatically change the terminal size but then choosing "default terminal size will restore it to your setting.

I will try and work out why your system isn't saving the device type. It works here in my virtual machine.
Can you send me a copy of your MMCC.inf file? It should help me sort it out.

Jim
 
Posted: 06:42am
26 Apr 2024
Copy link to clipboard
Volhout
Guru

Hi JIm,

As soon as I start MMCC by clicking the icon, it "touches" the MMCC.inf file.
This file is in the zip MMCC_before.zip

When I change the Maximite to PicoVGA it "touches" the MMCC.inf file again.
This file is in the zip MMCC_after.zip

I hope this helps.

Volhout

P.S. "touch" means it is updated (write to file), I can see that at the time stamp. But what has changed I have not investigated.
MMCC_after.zip

MMCC_before.zip
 
Posted: 07:56am
26 Apr 2024
Copy link to clipboard
TassyJim
Guru


Thanks for the file.
It all looks OK and you should be seeing the picoVGA when you restart.
There were a few 'mistakes' introduced when the short menus were added.

I have made a few changes which will help when presets are not set.

The Linux version lists ttyACM before ttyUSB now so the default will be ttyACM0
This suits most new users.
The default speed will be 115200 to keep away from 1200 accidents.
The default new system device will be picomite. There is no difference between picomite and picoVGA as far as MMCC is concerned.

Now, when you restart the last used setting will (hopefully) reappear.

I will update the main download tomorrow.

Thanks for helping the program better.

Jim
 
Posted: 07:58am
27 Apr 2024
Copy link to clipboard
TassyJim
Guru


As promised, I have updated the MMCC.exe in the downloads on my website. NO version change.
The W64bit and Linux MMCC exes are also in the attached to save downloading the full program.

Jim

MMEdit5beta.zip
 
   Page 6 of 6    


To reply to this topic, you need to log in.

© JAQ Software 2024