Sky´s F/A-18C Simpit - Page 2 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 03-01-2020, 08:19 AM   #11
SkyJunky
Member
 
SkyJunky's Avatar
 
Join Date: Sep 2018
Location: Müritz / Germany
Posts: 207
Default

Quote:
Originally Posted by longuich View Post
That’s just beautiful.

BTW, I’m getting encoding errors with the fonts file. Is it a windows encoded file ?


Sent from my iPhone using Tapatalk
I‘m using Windows. Encodet is the font by a converter.
The font is handmade, converted and then inserted into the U8g2 library. There are 3 different fonts for the UFC. The scratch display already needs 2 different fonts.

Quote:
Originally Posted by crash test pilot View Post
Ähh... Wow. How does your ADI work?
I make a video showing and explaining everything. But it still takes a little while, I have to finish the project first. It is not yet certain that the construction will stay that way.

Sky
__________________
Sky´s Simpit

Last edited by SkyJunky; 03-01-2020 at 08:25 AM.
SkyJunky is offline   Reply With Quote
Old 03-01-2020, 12:10 PM   #12
longuich
Junior Member
 
Join Date: May 2019
Location: The Neverlands
Posts: 91
Default

After a couple private messages I solved the encoding error and we solved the compilation errors.

To use the fonts your best bet is to use a script editor such as textwrangler to open the u8g2_fonts.c file. Copy the last 4 fonts (the ones that have dcs in the name) and paste those into a new utf8 text file which you then save as hornet_fonts.h (or whichever name you prefer).

Then in your sketch, where you plan to use the fonts, paste this on one of the first couple lines:
Code:
#include "hornet_fonts.h"
I have that right after
Code:
#include "U8g2lib.h"
Now your sketch should compile just fine.
As an example I've attached a picture of what the code below does:
Code:
      tcaselect(2);
      OLED_3.setFont(u8g2_DcsFont_tf);
      OLED_3.clearBuffer(); // clear the internal memory
      OLED_3.drawStr(01, 32, ":ATTH");
      OLED_3.sendBuffer(); // transfer internal memory to the display

      tcaselect(3);
      OLED_4.setFont(u8g2_DcsFontHornet4_tf);
      OLED_4.clearBuffer(); // clear the internal memory
      OLED_4.drawStr(01, 32, " RALT");
      OLED_4.sendBuffer(); // transfer internal memory to the display
           
      tcaselect(5);
      OLED_6.setFont(u8g2_DcsFontHornet3_tf);
      OLED_6.clearBuffer(); // clear the internal memory
      OLED_6.drawStr(01, 38, " BALT");
      OLED_6.sendBuffer(); // transfer internal memory to the display



my 2cts. thanks again to Sky!
cheers
longuich is offline   Reply With Quote
Old 03-02-2020, 04:35 PM   #13
LidMIx
Junior Member
 
Join Date: Aug 2019
Posts: 3
Default

AMAZING!!!
LidMIx is offline   Reply With Quote
Old 03-15-2020, 10:25 PM   #14
SkyJunky
Member
 
SkyJunky's Avatar
 
Join Date: Sep 2018
Location: Müritz / Germany
Posts: 207
Default

Hey everyone,

I attach a new version of the UFC font for the Hornet. I fixed a couple of problems. Now everything should work again. If there is still a mistake, please tell me so that I can fix it.

You need Hornet2 and Hornet4 for the scratch display and Hornet3 for the option displays.


Greetings Sky
Attached Files
File Type: zip UFC Font.zip (8.04 MB, 42 views)
__________________
Sky´s Simpit
SkyJunky is offline   Reply With Quote
Old 03-16-2020, 10:09 AM   #15
Bugz
Junior Member
 
Join Date: Sep 2019
Posts: 4
Default

What if the difference between the 2 files inside?
Bugz is offline   Reply With Quote
Old 03-16-2020, 10:15 AM   #16
longuich
Junior Member
 
Join Date: May 2019
Location: The Neverlands
Posts: 91
Default

Quote:
Originally Posted by Bugz View Post
What if the difference between the 2 files inside?

You just need the 4 last fonts in the big file.

The changes are mainly this:



changed to this




Sent from my iPhone using Tapatalk
longuich is offline   Reply With Quote
Old 03-16-2020, 11:11 AM   #17
SkyJunky
Member
 
SkyJunky's Avatar
 
Join Date: Sep 2018
Location: Müritz / Germany
Posts: 207
Default

You need both files to use the UFC font. The UFC fonts are in the fonts.c and the fonts are called in the other file. You can also insert the required lines from this files into your files.

Sky
__________________
Sky´s Simpit
SkyJunky is offline   Reply With Quote
Old 03-16-2020, 09:35 PM   #18
Bugz
Junior Member
 
Join Date: Sep 2019
Posts: 4
Default

Thx skyjunky and longuich. It works on my test oled display ssd1306 i2c.
I have a question about the oled display on your picture Longuich: is it a 2.23 oled display ssd1305? Are you using I2C or SPI ?
Bugz is offline   Reply With Quote
Old 03-16-2020, 09:52 PM   #19
longuich
Junior Member
 
Join Date: May 2019
Location: The Neverlands
Posts: 91
Default

Hey bugz,

It is a 2.23 sd1305 i found on amazon.
I prefer i2c for its simplicity and all my other displays are. But this is an SPI version. It’s supposed to be able to do i2c as well but I don’t really fancy desoldering tweezer size resistors.

Cheers!


Sent from my iPhone using Tapatalk
longuich is offline   Reply With Quote
Old 03-16-2020, 10:08 PM   #20
Bugz
Junior Member
 
Join Date: Sep 2019
Posts: 4
Default

So You keep it as SPI . Im not sure about define line for the display with u8g2 library. Which one did you choose?

Last edited by Bugz; 03-17-2020 at 07:34 AM.
Bugz is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 11:10 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.