Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define DCSBIOS_DEFAULT_SERIAL
- #include "DcsBios.h"
- #include <LCDWIKI_GUI.h> //Core graphics library
- #include <LCDWIKI_KBV.h> //Hardware-specific library
- LCDWIKI_KBV mylcd(ILI9481,A3,A2,A1,A0,A4);
- #define BLACK 0x0000
- #define BLUE 0x001F
- #define RED 0xF800
- #define GREEN 0x07E0
- #define CYAN 0x07FF
- #define MAGENTA 0xF81F
- #define YELLOW 0xFFE0
- #define WHITE 0xFFFF
- void onUhfPresetChange(char* newValue) {
- mylcd.Set_Text_colour(RED);
- mylcd.Set_Text_Back_colour(BLACK);
- mylcd.Set_Text_Size(6);
- mylcd.Print_String(newValue, 294, 110);
- }
- DcsBios::StringBuffer<2> uhfPresetBuffer(0x1188, onUhfPresetChange);
- void setup()
- {
- DcsBios::setup();
- Serial.begin(9600);
- mylcd.Init_LCD();
- Serial.println(mylcd.Read_ID(), HEX);
- mylcd.Fill_Screen(BLACK);
- mylcd.Set_Text_Mode(0);
- mylcd.Set_Text_colour(GREEN);
- mylcd.Set_Text_Back_colour(BLACK);
- mylcd.Set_Text_Size(3);
- mylcd.Set_Rotation(1);
- mylcd.Print_String("ARC", 400, 20);
- mylcd.Print_String("210", 400, 45);
- mylcd.Set_Text_colour(WHITE);
- mylcd.Set_Text_Back_colour(BLACK);
- mylcd.Set_Text_Size(1);
- mylcd.Set_Rotation(3);
- mylcd.Print_String("DIGITAL", 405, 80);
- mylcd.Print_String("COMBAT", 407, 90);
- mylcd.Print_String("SIMULATOR", 398, 100);
- mylcd.Set_Text_Size(7.5);
- mylcd.Set_Text_Back_colour(WHITE);
- mylcd.Print_String("251.025", 105, 250);
- mylcd.Set_Text_Size(3);
- mylcd.Set_Text_colour(RED);
- mylcd.Set_Text_Back_colour(BLACK);
- mylcd.Print_String("VHF-A", 30, 40);
- mylcd.Print_String("VHF-F", 30, 160);
- mylcd.Print_String("UHF", 30, 270);
- mylcd.Set_Draw_color(RED);
- mylcd.Draw_Rectangle(20, 258, 86, 298);
- //mylcd.Draw_Rectangle(20, 115, 460, 155);
- //mylcd.Draw_Rectangle(20, 165, 460, 205);
- //mylcd.Set_Draw_color(RED);
- //mylcd.Fill_Rectangle(435, 70, 455, 100);
- //mylcd.Draw_Rectangle(435, 120, 455, 150);
- //mylcd.Draw_Rectangle(437, 122, 453, 148);
- //mylcd.Draw_Rectangle(435, 170, 455, 200);
- // mylcd.Draw_Rectangle(437, 172, 453, 198);
- mylcd.Set_Draw_color(WHITE);
- mylcd.Draw_Rectangle(265, 80, 350, 160);
- mylcd.Set_Text_colour(GREEN);
- mylcd.Set_Text_Back_colour(BLACK);
- mylcd.Set_Text_Size(2);
- mylcd.Print_String("PRESET", 274, 85);
- //mylcd.Set_Text_colour(RED);
- //mylcd.Set_Text_Back_colour(BLACK);
- //mylcd.Set_Text_Size(6);
- //mylcd.Print_String("3", 294, 110);
- mylcd.Set_Text_colour(GREEN);
- mylcd.Set_Text_Back_colour(BLUE);
- mylcd.Set_Text_Size(2);
- mylcd.Print_String("TACAN: 71X", 265, 180);
- mylcd.Print_String("ILS: 11", 265, 200);
- //mylcd.Draw_Line(10, 170, 370, 230);
- //mylcd.Draw_Circle(100, 100, 50);
- }
- void loop()
- {
- DcsBios::loop();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement