PicoCalc GUI Gauge Command

Has anyone else tried the GUI Gauge Command? I am using @guu’s PicoMite build for the Pico 2. The gauges are not drawing correctly at all. This program runs perfectly fine on the Pico 2 hooked up to an SSD1963 LCD on a breadboard. I am thinking I found a bug. If anyone wants to try and recreate the problem, run this program, it does not do anything other than draw a frame and a gauge.

'picocalc-template.bas
Colour BLK,WHT
Const BLK=RGB(BLACK)
Const GRN=RGB(GREEN)
Const RED=RGB(RED)
Const WHT=RGB(WHITE)
Const YLW=RGB(YELLOW)

GUI DELETE ALL
Font 1
CLS WHT

GUI GAUGE #1,85,130,60,BLK,BLK,0,120,1,“F”,YLW,60,GRN,90,RED
CtrlVal(#1) = 75

Is that GUI GAUGE command documented in the PicoMite documentation anywhere? I couldn’t find it in the manual at all. How did you even know it existed? :slight_smile:

The manual only lists the GUI keyword here:

The weird thing is, it works and shows the same thing as in your picture. But I don’t know where it’s documented or what version of MMBasic it’s supposed to work in. It’s in the code in GUI.c, and that gets built into the Pico2 version of PicoMite. It doesn’t get built into WebMite though.

I’m guessing the rendering errors might have to do with the way the display on the PicoCalc is handled. It might have to do with the 320x480 vs. 320x320 kludges, or maybe something else related to the display.

I have to be honest, I have not looked at the manual recently. I have been using MMBasic for a long time, I own both a Maximite and a Maximite 2. The gauge command is present in the 5.08 user manual, but not in the 6.0. I wonder if the GUI controls are being depreciated.

The WebMite version lacks several GUI commands, I suspect that is to make room for the Web commands under the assumption that output would be to a browser rather than a screen.

Ah! I’m glad I just wasn’t finding it… I guess it was no longer there to be found. :open_mouth:

I’ve been hacking around with the code again, and I built a version of WebMite that has the (currently existing) GUI stuff built in. So far I haven’t seen anything horrible happen, so it might be stable. I kind of assumed it was removed due to space constraints too, but maybe it actually does fit and they removed it for some other non-critical reason. Your gauge example is still broken in the same way on it, but the other GUI stuff might work. I need to play around with this stuff more, but I’ll probably post a build soon so others can play with it too.

Yes, at least some of the other GUI controls do work, I have tried bargauge, frame, caption and a couple of others, they all seem to work fine. The problem seems to be limited to gauge. For the time being, I’ll just switch to bargauge for my dht22 and bme280 sensor code. It not as pretty but it gets the job done. I appreciate you having a look at this for me.