Hi Guys
I have not been working on this project for some time but now I have a little time and would like to sort out the degree symbol. As you can see it in the previous post that is giving me 4 lines instead of the degree symbol. I am using the Default 8 (legacy font) how would I be able to sort this out?
ST7789 display
-
- Posts: 125
- http://meble-kuchenne.info.pl
- Joined: Mon Mar 08, 2021 11:25 am
- Location: Cape Town South Africa
- Has thanked: 40 times
- Been thanked: 11 times
-
- Matrix Staff
- Posts: 1767
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 449 times
- Been thanked: 609 times
Re: ST7789 display
Hello,
I'm looking for you now and the default font should be printing out the degree character for any of the following ASCII character values 128, 167, 248.
Can you check what value you're sending for the degree symbol. If you know which character in the string it is then you can do something like PrintNumber( string[charidx] ) to know for sure what the decimal ASCII value is.
I'm looking for you now and the default font should be printing out the degree character for any of the following ASCII character values 128, 167, 248.
Can you check what value you're sending for the degree symbol. If you know which character in the string it is then you can do something like PrintNumber( string[charidx] ) to know for sure what the decimal ASCII value is.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Matrix Staff
- Posts: 1767
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 449 times
- Been thanked: 609 times
Re: ST7789 display
Hello,
Alt 167 should give you the decimal number 167 but I found that actually this is not guarenteed. It's worth seeing what number the compiled C prints out using the code I suggested as that might give me a pointer to investigate further.
Alt 167 should give you the decimal number 167 but I found that actually this is not guarenteed. It's worth seeing what number the compiled C prints out using the code I suggested as that might give me a pointer to investigate further.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 125
- Joined: Mon Mar 08, 2021 11:25 am
- Location: Cape Town South Africa
- Has thanked: 40 times
- Been thanked: 11 times
Re: ST7789 display
Hi Ben
Im not sure what you need me to do PrintNumber( string[charidx] ) I've tried the print number but all that dose is print the 167 and not the character
Im not sure what you need me to do PrintNumber( string[charidx] ) I've tried the print number but all that dose is print the 167 and not the character
-
- Matrix Staff
- Posts: 1767
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 449 times
- Been thanked: 609 times
Re: ST7789 display
Ok so it is confirmed it's 167 being used. Hmm let me look again.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Matrix Staff
- Posts: 1767
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 449 times
- Been thanked: 609 times
Re: ST7789 display
What happens is very strange.
If you type alt 167 then the number ends up as 186 when you print it out using PrintNumber
alt 248 ends up as 176
Anyway I've now supported both of these numbers too, maybe something to do with ASCII to utf8 conversion?
This is now working in simulation
Please can you have a go and let us know how you get on. Latest versiion is now on the update system.
If you type alt 167 then the number ends up as 186 when you print it out using PrintNumber
alt 248 ends up as 176
Anyway I've now supported both of these numbers too, maybe something to do with ASCII to utf8 conversion?
This is now working in simulation
Please can you have a go and let us know how you get on. Latest versiion is now on the update system.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 82
- Joined: Thu Dec 17, 2020 3:16 pm
- Has thanked: 20 times
- Been thanked: 12 times
Re: ST7789 display
Can I tag onto this thread as my issue is similar. When I want to increase the font size to improve distant reading, I only see a FontEnlarger icon (ST7789 display). That makes the resulting number larger but extremely blocky, see attached. Surely there must be an intelligent way to increase the font size without the blockyness. How do I do that? I tried different fonts (from fontnumber 0 to 31) but there doesn't seem a difference between the choices.
Jan
Jan
- Attachments
-
- blockfont.PNG (3.82 KiB) Viewed 1468 times
-
- Valued Contributor
- Posts: 1008
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 106 times
- Been thanked: 522 times
Re: ST7789 display
It is a trade off between memory and resolution....
An alternative might be to use bitmaps (just for the digits maybe) - I have some code that handles 1, 4, or 8 bit (256 colour) bitmaps that you might be able to use?
Martin
An alternative might be to use bitmaps (just for the digits maybe) - I have some code that handles 1, 4, or 8 bit (256 colour) bitmaps that you might be able to use?
Martin