Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:22 02 May 2025 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 : Gui Gauge

Author Message
BishopXXL
Newbie

Joined: 13/01/2019
Location: Germany
Posts: 33
Posted: 01:16pm 17 Apr 2025
Copy link to clipboard 
Print this post

Hello community,

I've been working on this version until now.

"PicoMite MMBasic RP2350A Edition V6.00.01"


OPTION SYSTEM SPI GP18,GP19,GP16
OPTION SYSTEM I2C GP20,GP21
AUTORUN ON OPTION
OPTION FLASH SIZE 4194304
OPTION COLOR CODE ON
OPTION CPUSPEED 150000'KHz
OPTION DISPLAY 44, 144
OPTION LCD PANEL ILI9488, LANDSCAPE,GP15,GP14,GP13,GP7,INVERT
OPTION GUI CONTROLS 64
OPTION TOUCH GP12,GP11
GUI CALIBRATE 0, 3960, 3910, -1264, -861
OPTION SDCARD GP22
RTC AUTO ENABLE OPTION


I am very satisfied so far.
After updating to version

"PicoMite MMBasic RP2350A Edition V6.00.02RC15"

I have a small error in my "GUI Gauge."
Has anything changed in the syntax?

"GUI Gauge 13,240,160,100,RGB(Cyan),RGB(Blue),0,100,0,"%",RGB(Green),RGB(White)"

Or is the GUI no longer a relevant component?
I'm grateful for any advice!

Cheers, Thomas




 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10000
Posted: 01:51pm 17 Apr 2025
Copy link to clipboard 
Print this post

Works fine on a Waveshare ILI4488W display and standard ILI9488 under RC15

 
BishopXXL
Newbie

Joined: 13/01/2019
Location: Germany
Posts: 33
Posted: 02:14pm 17 Apr 2025
Copy link to clipboard 
Print this post

Hi Peter,

Thank you for your quick reply.
I have a "Cheap Chinese Red 4-inch TFT" from Amazon.

That could be the problem.
If you're using a 3.5-inch TFT, I'd get one of those.

What surprises me is that the identical source code runs on
V6.00.01 and not on V6.00.02RC15.

The error is often between chair and keyboard  

I'll try something out.

And if it doesn't work, I'll go back to V6.00.01.
or buy a Waveshare....

THX!!!
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4815
Posted: 03:35pm 17 Apr 2025
Copy link to clipboard 
Print this post

Peter, Bishop,

This is serious problem. This has nothing to do with how the display is connected to the pico, nothing with high and low levels. Data in RAM (or in flash) is corrupted.

Bishop, we need your full program (assuming you did not type this GUI line from the commandline). Did you do clear/nuke the flash before you programmed and configured RC15 ? Do you have anything in a flash slot, or the library of the pico ? Note that tokens have changed, and your code could therefore be corrupted when in flash or library.

You could try to restart the pico, and type the same line from the commandline, and see if you have the same result.

The screen size should not have any impact on this. It looks like coordinates of segments of the circle are corrupted, or wrongly calculated. And why ? Did you use the temporary function OPTION TRIG FAST ?

Since the display is not a vector display, individual pixels are send to the display. This type of error does not come from the display, it is math error, or memory corruption.

Regards,

Volhout
Edited 2025-04-18 01:38 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10000
Posted: 03:51pm 17 Apr 2025
Copy link to clipboard 
Print this post

I've managed to reproduce but only on the RP2350. There is no change in any of the relevant code but there was a change to the Pico sdk. I need to investigate further in the meantime I would avoid this command. The implementation of GUI gauge is somewhat clunky so it could be a floating point overflow issue which could explain the difference between the RP2350 (H/W FP) and the RP2040. Other massively complex programs with FP calculations do not exhibit any differences and MMBasic commands are protected against overflow/divide by zero etc. so I'm not concerned about a generic issue.
The MMbasic ARC command is a much better implementation so I may just recode GUI GAUGE but that is quite a big task
Edited 2025-04-18 01:54 by matherp
 
BishopXXL
Newbie

Joined: 13/01/2019
Location: Germany
Posts: 33
Posted: 05:02pm 17 Apr 2025
Copy link to clipboard 
Print this post

Hi Peter,Volhout

I can post a short section – the entire source code is about 2,000 lines.
Since Peter already has a guess, I'm full of hope.
I don't necessarily need the latest firmware,
but it would be nice if I could work on the latest firmware.

I think I've completed half of my project.

Thanks for taking care of the problem.

Once again, Chapeau! to everyone who is working so intensively on the mmbasic project and everything that goes with it.

Thomas



' -------------------------------------------------------------------
' ----------------[    Melder Flash                 ]----------------
' -------------------------------------------------------------------
Sub Melder_Flash
CLS
Box 10, 10, MM.HRes-20, 40, 3 , RGB(Cyan) ,RGB(Blue)
Text 16,20,"DLD 1/9 ",,3,1,RGB(Cyan),RGB(Blue)
Box 10, 46, MM.HRes-20, 200, 3 , RGB(Cyan) ,RGB(Blue)

Font 3,2
GUI Gauge 13,240,160,100,RGB(Cyan),RGB(Blue),0,100,0,"%",RGB(Green),RGB(White)

Open Pfad_dld_FW$ + Firmware_DLD$ For input As #5
Print "Start... Flash"
File_Size = MM.Info(Filesize Pfad_dld_FW$ + Firmware_DLD$)

Do
 RX_In_cnt = 0
 Inc FZ
 B1=Asc(Input$(1,#5))
 B2=Asc(Input$(1,#5))
 W=B2*256
 W=W+B1
 For J = 1 To W
   Inc zz
   B3=Asc(Input$(1,#5))
   Print #1, Chr$(B3);
   CtrlVal(#13)=Int(zz*101/File_Size)
 Next J
 Do
 Loop Until RX_In_cnt = 7
 If RX_In(4) = &H12 Then
   Print "#";
 Else
   Print "Flash Error#";
 End If
Loop Until Eof(#5) ..................................



Edited 2025-04-18 03:06 by BishopXXL
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10000
Posted: 06:49pm 17 Apr 2025
Copy link to clipboard 
Print this post

This is very strange. It looks like a bug in the sdk sinf and cosf functions on the RP2350 in the latest sdk (these are the single precision versions). The sin and cos functions work fine
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4815
Posted: 07:17pm 17 Apr 2025
Copy link to clipboard 
Print this post

Drop single precision
Speed comparison shows it makes max 1% faster...

Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4815
Posted: 07:53pm 17 Apr 2025
Copy link to clipboard 
Print this post

@Peter,

Now I am stupid of coarse...
But I tried above GUI GAUGE on a Game*Mite that I modified with a 2350A.
Running RC15 (yes, just to duplicate the issue, curious).
And it is exactly the same on the ILI9341

Gui Gauge was not detailed out in the 6.00.01 user manual. Is it supported at all ?
I found something in the CMM2 manuals... Now I know how it works.. Sorry for the confusion.

Volhout
Edited 2025-04-18 06:09 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4815
Posted: 08:26pm 17 Apr 2025
Copy link to clipboard 
Print this post

@Peter,

Something strange in the Game*Mite file manager (2350).



This line is part of that file manager. When the line is in this format, the filemanager runs fine. But.

When I save this file to A:/ and load it back in the line changes (there is a space between Out and $(i%)). And needless to say, it does not run.



I can force it back by adding a LET before the out$(i%)=f$, but after saving, and loading it changes back. To my knowledge OUT is not a reserved keyword. So why is it doing this ?

Volhout
Edited 2025-04-18 06:27 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10000
Posted: 09:25pm 17 Apr 2025
Copy link to clipboard 
Print this post

  Quote  To my knowledge OUT is not a reserved keyword. So why is it doing this ?


PIO?
Edited 2025-04-18 07:25 by matherp
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 549
Posted: 01:16am 18 Apr 2025
Copy link to clipboard 
Print this post

  Quote   a bug in the sdk sinf and cosf functions on the RP2350 in the latest sdk


That's a worry - please let us know what develops.

Re the extra space - I found a similar weird problem a while ago with something adding  a space into a text string,  sounds the same.
[wasn't anything with MMBasic or mites etc.]
A text file sent via Teraterm would get an extra space in the
middle of a command, only for that specific text string (it was something
like " .. FORMAT ..."), which then was visible when it was listed by the software.
Caused some rude words to be uttered it did !!! Some transmit/receive systems will put and recognize strings in a data stream
in order to change speed etc so I assumed it was that, didn't get any further detail though as that text was a temporary trial and superseded anyway.
Edited 2025-04-18 11:19 by zeitfest
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 549
Posted: 02:54pm 19 Apr 2025
Copy link to clipboard 
Print this post

ongoing investigation of the sin/cos error
Edited 2025-04-20 00:55 by zeitfest
 
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025