Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:07 02 Aug 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 : Armmite F4 GUI GAUGE Not OK on Font 6

Author Message
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 08:35am 19 Mar 2021
Copy link to clipboard 
Print this post

Hi

I found that on Font #6 on the standard display panel, the Units$ value was not being printed. OK on Font 5 & below.

Test code below to show the differences between fonts 5 & 6.


 'mm.ver 5.0601

 option explicit
 const DBlue = rgb(0,0,128)    'define LCD colour.
 colour rgb(green), DBlue
 backlight 50                 'set backlight brightness  
 box 0, 0, MM.HRes - 1, MM.VRes - 1, 1, dblue, DBlue 'Outside box
do
   font 5,1
   gui gauge #1, mm.hres/2, mm.vres/2, mm.vres/2.2, rgb(yellow), dblue, 0, 1500, 0, "RPM", rgb(green),1000,rgb(yellow),1200, rgb(red), 1500
   ctrlval(1) = 100
   pause 1000
   gui delete #1
   font 6,1
   gui gauge #1, mm.hres/2, mm.vres/2, mm.vres/2.2, rgb(yellow), dblue, 0, 1500, 0, "RPM", rgb(green),1000,rgb(yellow),1200, rgb(red), 1500
   ctrlval(1) = 100
   pause 2000
   gui delete #1
 loop


Hopefully I am missing something

Brian
ChopperP
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 08:40am 19 Mar 2021
Copy link to clipboard 
Print this post

  Quote  Hopefully I am missing something

Yes: all the characters except 0-9, decimal point, space, + and -, degree and colon. Same as the MM+ and CMM2
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 08:48am 19 Mar 2021
Copy link to clipboard 
Print this post

Ah, thanks.

Font 4,2 works.
Edited 2021-03-19 18:52 by Chopperp
ChopperP
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 12:30pm 19 Mar 2021
Copy link to clipboard 
Print this post

OK, probably doing something else wrong.

In the code below, the Digital display colours follow the gauge colours when the values are increasing as expected.

However, when the values are decreasing, it takes two goes with different values (second one lower) in the same alarm region before the text colours change to match the gauge.

Gauge Parameters
Min = 0
Max = 1500
0 - 999 = Green
Yellow => 1000
Red => 1200

  'mm.ver 5.0601

 option explicit
 const DBlue = rgb(0,0,128)    'define LCD colour.
 colour rgb(green), DBlue
 backlight 50                 'set backlight brightness  
 box 0, 0, MM.HRes - 1, MM.VRes - 1, 1, dblue, DBlue 'Outside box
   font 4,2
   gui gauge #1, mm.hres/2, mm.vres/2, mm.vres/2.2, rgb(white), dblue, 0, 1500, 0, "RPM", rgb(green),1000,rgb(yellow),1200, rgb(red), 1500
 do  
   ctrlval(1) = 300    'text green   = OK
   pause 2000
   ctrlval(1) = 1050   'text yellow  = OK
   pause 2000
   ctrlval(1) = 1350   'text red     = OK
   pause 2000
   ctrlval(1) = 1150   'text still red = Not OK
   pause 2000
   ctrlval(1) = 1150   'text still red = Not OK
   pause 2000
   ctrlval(1) = 1050   'text yellow    = OK
   pause 2000
   ctrlval(1) = 500    'text still yellow = Not OK
   pause 2000
 loop


Brian
ChopperP
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5091
Posted: 01:34pm 19 Mar 2021
Copy link to clipboard 
Print this post

5.07.b5 behaves the same
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 02:04pm 19 Mar 2021
Copy link to clipboard 
Print this post

Can anyone check this on a MM+?

AFAIK the GUI code is identical to the latest MM+ release and not something I've had any involvement with or have any knowledge of
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1114
Posted: 04:27am 20 Mar 2021
Copy link to clipboard 
Print this post

On an Explore 100 running 5.05.03, works as shown in example above, ie. the first change down does not reflect a colour change. One for Geoff?
Doug.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 11:37am 20 Mar 2021
Copy link to clipboard 
Print this post

Thanks Peter & Doug

It looks like there won't be a quick fix.

Did a very rough temporary solution/work-around as a proof of concept which will work for me for the time being.

Just overriding the normal digits (using font #6) & inserting the units (RPM) using font #5 with the colours selected by a SELECT CASE routine according to the value of CTRLVAL(1).  

 'mm.ver 5.0601

 option explicit
 const DBlue = rgb(0,0,128)    'define LCD colour.
 dim Text_Colour
 colour rgb(green), DBlue
 backlight 50                 'set backlight brightness  
 box 0, 0, MM.HRes - 1, MM.VRes - 1, 1, dblue, DBlue 'Outside box
   font 6,1
   gui gauge #1, mm.hres/2, mm.vres/2, mm.vres/2.1, rgb(white), dblue, 0, 1500, 0, "RPM", rgb(green),1000,rgb(yellow),1200, rgb(red), 1500
 do  
   ctrlval(1) = 300    'text green   = OK
   Digits_Print
   pause 1000
   ctrlval(1) = 1050   'text yellow  = OK
   Digits_Print
   pause 1000
   ctrlval(1) = 1350   'text red     = OK
   Digits_Print
   pause 1000
   ctrlval(1) = 1150   'text still red = Not OK
   Digits_Print
   pause 1000
   ctrlval(1) = 1050   'text yellow    = OK
   Digits_Print
   pause 1000
   ctrlval(1) = 500    'text still yellow = Not OK
   Digits_Print
   pause 1000
 loop
 
 sub Digits_Print
   select case ctrlval(1)
     case < 1000
       Text_Colour = rgb(green)
     case < 1200
       Text_Colour = rgb(Yellow)
     case else
       Text_Colour = rgb(red)
   end select  
       text mm.hres/2 , mm.vres/2, Str$(ctrlval(1)), "CB", 6, 1, Text_Colour
       text mm.hres/2 , 170, "RPM", "CB", 5, 1, Text_Colour    
 end sub


Brian
ChopperP
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 08:37am 21 Mar 2021
Copy link to clipboard 
Print this post

Geoff has fixed this and I've included the fix in the ArmmiteF4 5.07.00b9 release
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 10:25am 21 Mar 2021
Copy link to clipboard 
Print this post

That was quick. Thanks.
I wasn't sure what the procedure was for problems like this. Obviously Geoff was notified.
ChopperP
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 07:35am 22 Mar 2021
Copy link to clipboard 
Print this post

Updated & confirmed fixed.

Thanks again Geoff & Peter
ChopperP
 
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