![]() |
Forum Index : Microcontroller and PC projects : Armmite F4 GUI GAUGE Not OK on Font 6
Author | Message | ||||
Chopperp![]() Guru ![]() Joined: 03/01/2018 Location: AustraliaPosts: 1097 |
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 KingdomPosts: 10315 |
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: AustraliaPosts: 1097 |
Ah, thanks. Font 4,2 works. Edited 2021-03-19 18:52 by Chopperp ChopperP |
||||
Chopperp![]() Guru ![]() Joined: 03/01/2018 Location: AustraliaPosts: 1097 |
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: NetherlandsPosts: 5091 |
5.07.b5 behaves the same PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
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: AustraliaPosts: 1114 |
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: AustraliaPosts: 1097 |
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 KingdomPosts: 10315 |
Geoff has fixed this and I've included the fix in the ArmmiteF4 5.07.00b9 release |
||||
Chopperp![]() Guru ![]() Joined: 03/01/2018 Location: AustraliaPosts: 1097 |
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: AustraliaPosts: 1097 |
Updated & confirmed fixed. Thanks again Geoff & Peter ChopperP |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |