Jump to content

TulsA-10

Members
  • Posts

    395
  • Joined

  • Last visited

Everything posted by TulsA-10

  1. Thank you for the feedback. I had a feeling you'd say that. Not a big deal, I'll just use screens via serial for now. My favorite characters are the sad faces.. they frown and confirm your screen isn't going to work.. haha
  2. Did you ever sort this issue with the cdu via rs485? I'm having the exact issue.
  3. Hey guys. I have used my cdu display via serial perfectly and now trying to run via rs485. I have everything wired up correctly as described and buttons work no problem but the display will show correct screen and font for about 5 seconds then it starts to display wrong characters in random places. I can switch to a different cdu page and it'll do the same things again. I've tried this without any buttons connected. Like I said, it works via serial, no weird characters or glitching fonts. Mega master and mega slave. TX/RX pins on the slave mega are on 1 and 0. 18 and 19 will not tx or rx data. This is the slave sketch #define DCSBIOS_RS485_SLAVE 1 #define TXENABLE_PIN 2 #include "DcsBios.h" #include <Adafruit_GFX.h> #include <UTFTGLUE.h> DcsBios::Switch2Pos cduLsk3l("CDU_LSK_3L", A0); DcsBios::Switch2Pos cduLsk5l("CDU_LSK_5L", A1); DcsBios::Switch2Pos cduLsk7l("CDU_LSK_7L", A2); DcsBios::Switch2Pos cduLsk9l("CDU_LSK_9L", A3); DcsBios::Switch2Pos cduLsk3r("CDU_LSK_3R", A4); DcsBios::Switch2Pos cduLsk5r("CDU_LSK_5R", A5); DcsBios::Switch2Pos cduLsk7r("CDU_LSK_7R", A6); DcsBios::Switch2Pos cduLsk9r("CDU_LSK_9R", A7); DcsBios::Switch2Pos cduSys("CDU_SYS", A8); DcsBios::Switch2Pos cduNav("CDU_NAV", A9); DcsBios::Switch2Pos cduWp("CDU_WP", A10); DcsBios::Switch2Pos cduOset("CDU_OSET", A11); DcsBios::Switch2Pos cduFpm("CDU_FPM", A12); DcsBios::Switch2Pos cduPrev("CDU_PREV", A13); DcsBios::Switch2Pos cdu0("CDU_0", A14); DcsBios::Switch2Pos cdu1("CDU_1", A15); DcsBios::Switch2Pos cdu2("CDU_2", 3); DcsBios::Switch2Pos cdu3("CDU_3", 4); DcsBios::Switch2Pos cdu4("CDU_4", 5); DcsBios::Switch2Pos cdu5("CDU_5", 6); DcsBios::Switch2Pos cdu6("CDU_6", 7); DcsBios::Switch2Pos cdu7("CDU_7", 8); DcsBios::Switch2Pos cdu8("CDU_8", 9); DcsBios::Switch2Pos cdu9("CDU_9", 10); DcsBios::Switch3Pos cduPg("CDU_PG", 11, 12); UTFTGLUE myGLCD(0x9486,A2,A1,A3,A4,A0); void printChar(int row, int col, unsigned char c) { int16_t x = 13 + col * 19; int16_t y = row * 32 + 6; myGLCD.drawChar(x, y, c, 0x07E0, 0x0, 3); } /* paste code snippets from the reference documentation here */ void onCduLine0Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(0, i, newValue); } } DcsBios::StringBuffer<24> cduLine0Buffer(0x11c0, onCduLine0Change); void onCduLine1Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(1, i, newValue); } } DcsBios::StringBuffer<24> cduLine1Buffer(0x11d8, onCduLine1Change); void onCduLine2Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(2, i, newValue); } } DcsBios::StringBuffer<24> cduLine2Buffer(0x11f0, onCduLine2Change); void onCduLine3Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(3, i, newValue); } } DcsBios::StringBuffer<24> cduLine3Buffer(0x1208, onCduLine3Change); void onCduLine4Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(4, i, newValue); } } DcsBios::StringBuffer<24> cduLine4Buffer(0x1220, onCduLine4Change); void onCduLine5Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(5, i, newValue); } } DcsBios::StringBuffer<24> cduLine5Buffer(0x1238, onCduLine5Change); void onCduLine6Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(6, i, newValue); } } DcsBios::StringBuffer<24> cduLine6Buffer(0x1250, onCduLine6Change); void onCduLine7Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(7, i, newValue); } } DcsBios::StringBuffer<24> cduLine7Buffer(0x1268, onCduLine7Change); void onCduLine8Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(8, i, newValue); } } DcsBios::StringBuffer<24> cduLine8Buffer(0x1280, onCduLine8Change); void onCduLine9Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(9, i, newValue); } } DcsBios::StringBuffer<24> cduLine9Buffer(0x1298, onCduLine9Change); void setup() { DcsBios::setup(); // Setup the LCD myGLCD.InitLCD(); myGLCD.clrScr(); myGLCD.setTextSize(3); myGLCD.setColor(0, 0, 0); // seems to have no effect myGLCD.drawRect(0, 0, 0, 255); myGLCD.invertDisplay(1); } void loop() { DcsBios::loop(); } My font file. glcdfont.c // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. // Modified for DCS A-10C CDU 2016-03-14 #ifndef FONT5X7_H #define FONT5X7_H #ifdef __AVR__ #include <avr/io.h> #include <avr/pgmspace.h> #elif defined(ESP8266) #include <pgmspace.h> #else #define PROGMEM #endif // Standard ASCII 5x7 font static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, 0x18, 0x3C, 0x18, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x18, 0x24, 0x18, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x26, 0x29, 0x79, 0x29, 0x26, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x66, 0x89, 0x95, 0x6A, 0x60, 0x60, 0x60, 0x60, 0x60, 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x08, 0x04, 0x7E, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x20, 0x10, 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x30, 0x38, 0x3E, 0x38, 0x30, 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x23, 0x13, 0x08, 0x64, 0x62, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x80, 0x70, 0x30, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x60, 0x60, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x72, 0x49, 0x49, 0x49, 0x46, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x27, 0x45, 0x45, 0x45, 0x39, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x41, 0x21, 0x11, 0x09, 0x07, 0x36, 0x49, 0x49, 0x49, 0x36, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x41, 0x22, 0x14, 0x08, 0x02, 0x01, 0x51, 0x09, 0x06, //? 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x3E, 0x41, 0x41, 0x51, 0x73, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, 0x7F, 0x08, 0x14, 0x22, 0x41, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x26, 0x49, 0x49, 0x49, 0x32, 0x03, 0x01, 0x7F, 0x01, 0x03, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x63, 0x14, 0x08, 0x14, 0x63, 0x03, 0x04, 0x78, 0x04, 0x03, 0x61, 0x51, 0x49, 0x45, 0x43, //Z 0x00, 0x7F, 0x41, 0x41, 0x41, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x04, 0x02, 0x01, 0x02, 0x04, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x03, 0x07, 0x08, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x7F, 0x28, 0x44, 0x44, 0x38, 0x38, 0x44, 0x44, 0x44, 0x28, 0x38, 0x44, 0x44, 0x28, 0x7F, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x38, 0x44, 0x44, 0x44, 0x38, 0xFC, 0x18, 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x18, 0xFC, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x48, 0x54, 0x54, 0x54, 0x24, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x44, 0x28, 0x10, 0x28, 0x44, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x41, 0x36, 0x08, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x1E, 0xA1, 0xA1, 0x61, 0x12, 0x3A, 0x40, 0x40, 0x20, 0x7A, 0x38, 0x54, 0x54, 0x55, 0x59, 0x21, 0x55, 0x55, 0x79, 0x41, 0x22, 0x54, 0x54, 0x78, 0x42, // a-umlaut 0x21, 0x55, 0x54, 0x78, 0x40, 0x20, 0x54, 0x55, 0x79, 0x40, 0x0C, 0x1E, 0x52, 0x72, 0x12, 0x39, 0x55, 0x55, 0x55, 0x59, 0x39, 0x54, 0x54, 0x54, 0x59, 0x39, 0x55, 0x54, 0x54, 0x58, 0x00, 0x00, 0x45, 0x7C, 0x41, 0x00, 0x02, 0x45, 0x7D, 0x42, 0x00, 0x01, 0x45, 0x7C, 0x40, 0x7D, 0x12, 0x11, 0x12, 0x7D, // A-umlaut 0xF0, 0x28, 0x25, 0x28, 0xF0, 0x7C, 0x54, 0x55, 0x45, 0x00, 0x20, 0x54, 0x54, 0x7C, 0x54, 0x7C, 0x0A, 0x09, 0x7F, 0x49, 0x32, 0x49, 0x49, 0x49, 0x32, 0x3A, 0x44, 0x44, 0x44, 0x3A, // o-umlaut 0x32, 0x4A, 0x48, 0x48, 0x30, 0x3A, 0x41, 0x41, 0x21, 0x7A, 0x3A, 0x42, 0x40, 0x20, 0x78, 0x00, 0x9D, 0xA0, 0xA0, 0x7D, 0x3D, 0x42, 0x42, 0x42, 0x3D, // O-umlaut 0x3D, 0x40, 0x40, 0x40, 0x3D, 0x3C, 0x24, 0xFF, 0x24, 0x24, 0x48, 0x7E, 0x49, 0x43, 0x66, 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 0xFF, 0x09, 0x29, 0xF6, 0x20, 0xC0, 0x88, 0x7E, 0x09, 0x03, 0x20, 0x54, 0x54, 0x79, 0x41, 0x7F, 0x41, 0x00, 0x41, 0x7F, //0x00, 0x00, 0x44, 0x7D, 0x41, A1 - Data Entry 0x30, 0x48, 0x48, 0x4A, 0x32, 0x38, 0x40, 0x40, 0x22, 0x7A, 0x00, 0x7A, 0x0A, 0x0A, 0x72, 0x7D, 0x0D, 0x19, 0x31, 0x7D, 0x26, 0x29, 0x29, 0x2F, 0x28, 0x26, 0x29, 0x29, 0x29, 0x26, 0x30, 0x48, 0x4D, 0x40, 0x20, 0x1C, 0x22, 0x2A, 0x22, 0x1C, //0x38, 0x08, 0x08, 0x08, 0x08 A9 - bullseye 0x08, 0x08, 0x08, 0x08, 0x38, 0x08, 0x1C, 0x2A, 0x08, 0x08, //0x2F, 0x10, 0xC8, 0xAC, 0xBA, AB - arrow to left 0x2F, 0x10, 0x28, 0x34, 0xFA, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x14, 0x22, 0x7F, 0x22, 0x14, // 0x08, 0x14, 0x2A, 0x14, 0x22, AE - up-down arrow 0x22, 0x14, 0x2A, 0x14, 0x08, 0x55, 0x00, 0x55, 0x00, 0x55, 0x07, 0x05, 0x07, 0x00, 0x00, //B0 - degree 0x48, 0x48, 0x7E, 0x48, 0x48, //B1 - +_ symbol 0x00, 0x00, 0x00, 0xFF, 0x00, 0x10, 0x10, 0x10, 0xFF, 0x00, 0x14, 0x14, 0x14, 0xFF, 0x00, 0x10, 0x10, 0xFF, 0x00, 0xFF, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, // 0x10, 0x10, 0xF0, 0x10, 0xF0,B6 - CDU cursor 0x14, 0x14, 0x14, 0xFC, 0x00, 0x14, 0x14, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x14, 0x14, 0xF4, 0x04, 0xFC, 0x08, 0x08, 0x2A, 0x1C, 0x08, // 0x14, 0x14, 0x17, 0x10, 0x1F, BB - arrow to right 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0x1F, 0x00, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x14, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x1F, 0x10, 0x17, 0x00, 0x00, 0xFC, 0x04, 0xF4, 0x14, 0x14, 0x17, 0x10, 0x17, 0x14, 0x14, 0xF4, 0x04, 0xF4, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xF7, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x17, 0x14, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0xF4, 0x14, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x14, 0x00, 0x00, 0x00, 0xFC, 0x14, 0x00, 0x00, 0xF0, 0x10, 0xF0, 0x10, 0x10, 0xFF, 0x10, 0xFF, 0x14, 0x14, 0x14, 0xFF, 0x14, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x38, 0x44, 0x44, 0x38, 0x44, 0xFC, 0x4A, 0x4A, 0x4A, 0x34, // sharp-s or beta 0x7E, 0x02, 0x02, 0x06, 0x06, 0x02, 0x7E, 0x02, 0x7E, 0x02, 0x63, 0x55, 0x49, 0x41, 0x63, 0x38, 0x44, 0x44, 0x3C, 0x04, 0x40, 0x7E, 0x20, 0x1E, 0x20, 0x06, 0x02, 0x7E, 0x02, 0x02, 0x99, 0xA5, 0xE7, 0xA5, 0x99, 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 0x4C, 0x72, 0x01, 0x72, 0x4C, 0x30, 0x4A, 0x4D, 0x4D, 0x30, 0x30, 0x48, 0x78, 0x48, 0x30, 0xBC, 0x62, 0x5A, 0x46, 0x3D, 0x3E, 0x49, 0x49, 0x49, 0x00, 0x7E, 0x01, 0x01, 0x01, 0x7E, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x44, 0x44, 0x5F, 0x44, 0x44, 0x40, 0x51, 0x4A, 0x44, 0x40, 0x40, 0x44, 0x4A, 0x51, 0x40, 0x00, 0x00, 0xFF, 0x01, 0x03, 0xE0, 0x80, 0xFF, 0x00, 0x00, 0x08, 0x08, 0x6B, 0x6B, 0x08, 0x36, 0x12, 0x36, 0x24, 0x36, 0x06, 0x0F, 0x09, 0x0F, 0x06, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x30, 0x40, 0xFF, 0x01, 0x01, 0x00, 0x1F, 0x01, 0x01, 0x1E, 0x00, 0x19, 0x1D, 0x17, 0x12, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00 // #255 NBSP }; #endif // FONT5X7_H
  4. +++++UPDATE+++++ I got a little closer to getting this working via RS485. I used the following sketch to get the font to display correctly for about 10 seconds but then the cdu display starts to display odd characters and won't stop. #define DCSBIOS_RS485_SLAVE 1 #define TXENABLE_PIN 2 #include "DcsBios.h" #include <Adafruit_GFX.h> #include <UTFTGLUE.h> DcsBios::Switch2Pos cduLsk3l("CDU_LSK_3L", A0); DcsBios::Switch2Pos cduLsk5l("CDU_LSK_5L", A1); DcsBios::Switch2Pos cduLsk7l("CDU_LSK_7L", A2); DcsBios::Switch2Pos cduLsk9l("CDU_LSK_9L", A3); DcsBios::Switch2Pos cduLsk3r("CDU_LSK_3R", A4); DcsBios::Switch2Pos cduLsk5r("CDU_LSK_5R", A5); DcsBios::Switch2Pos cduLsk7r("CDU_LSK_7R", A6); DcsBios::Switch2Pos cduLsk9r("CDU_LSK_9R", A7); DcsBios::Switch2Pos cduSys("CDU_SYS", A8); DcsBios::Switch2Pos cduNav("CDU_NAV", A9); DcsBios::Switch2Pos cduWp("CDU_WP", A10); DcsBios::Switch2Pos cduOset("CDU_OSET", A11); DcsBios::Switch2Pos cduFpm("CDU_FPM", A12); DcsBios::Switch2Pos cduPrev("CDU_PREV", A13); DcsBios::Switch2Pos cdu0("CDU_0", A14); DcsBios::Switch2Pos cdu1("CDU_1", A15); DcsBios::Switch2Pos cdu2("CDU_2", 3); DcsBios::Switch2Pos cdu3("CDU_3", 4); DcsBios::Switch2Pos cdu4("CDU_4", 5); DcsBios::Switch2Pos cdu5("CDU_5", 6); DcsBios::Switch2Pos cdu6("CDU_6", 7); DcsBios::Switch2Pos cdu7("CDU_7", 8); DcsBios::Switch2Pos cdu8("CDU_8", 9); DcsBios::Switch2Pos cdu9("CDU_9", 10); DcsBios::Switch3Pos cduPg("CDU_PG", 11, 12); UTFTGLUE myGLCD(0x9486,A2,A1,A3,A4,A0); void printChar(int row, int col, unsigned char c) { int16_t x = 13 + col * 19; int16_t y = row * 32 + 6; myGLCD.drawChar(x, y, c, 0x07E0, 0x0, 3); } /* paste code snippets from the reference documentation here */ void onCduLine0Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(0, i, newValue); } } DcsBios::StringBuffer<24> cduLine0Buffer(0x11c0, onCduLine0Change); void onCduLine1Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(1, i, newValue); } } DcsBios::StringBuffer<24> cduLine1Buffer(0x11d8, onCduLine1Change); void onCduLine2Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(2, i, newValue); } } DcsBios::StringBuffer<24> cduLine2Buffer(0x11f0, onCduLine2Change); void onCduLine3Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(3, i, newValue); } } DcsBios::StringBuffer<24> cduLine3Buffer(0x1208, onCduLine3Change); void onCduLine4Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(4, i, newValue); } } DcsBios::StringBuffer<24> cduLine4Buffer(0x1220, onCduLine4Change); void onCduLine5Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(5, i, newValue); } } DcsBios::StringBuffer<24> cduLine5Buffer(0x1238, onCduLine5Change); void onCduLine6Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(6, i, newValue); } } DcsBios::StringBuffer<24> cduLine6Buffer(0x1250, onCduLine6Change); void onCduLine7Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(7, i, newValue); } } DcsBios::StringBuffer<24> cduLine7Buffer(0x1268, onCduLine7Change); void onCduLine8Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(8, i, newValue); } } DcsBios::StringBuffer<24> cduLine8Buffer(0x1280, onCduLine8Change); void onCduLine9Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(9, i, newValue); } } DcsBios::StringBuffer<24> cduLine9Buffer(0x1298, onCduLine9Change); void setup() { DcsBios::setup(); // Setup the LCD myGLCD.InitLCD(); myGLCD.clrScr(); myGLCD.setTextSize(3); myGLCD.setColor(0, 0, 0); // seems to have no effect myGLCD.drawRect(0, 0, 0, 255); //change to these settings for A10 font myGLCD.invertDisplay(1); } void loop() { DcsBios::loop(); }
  5. Hello people! I have an issue getting my 3.5 tft to display the correct font over rs485. I have a correctly wired rs485 network using max487 chips as displayed by Hans and many others. All libraries and dcs bios are fully updated. The font has been corrected for the A10 via the glcdfont file under adafruit_GFX_Library. Please also note that the font and cdu work perfectly via serial using the following sketch. /* Tell DCS-BIOS to use a serial connection and use the default Arduino Serial library. This will work on the vast majority of Arduino-compatible boards, but you can get corrupted data if you have too many or too slow outputs (e.g. when you have multiple character displays), because the receive buffer can fill up if the sketch spends too much time updating them. If you can, use the IRQ Serial connection instead. */ #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #include <Adafruit_GFX.h> #include <UTFTGLUE.h> DcsBios::Switch2Pos cduLsk3l("CDU_LSK_3L", A0); DcsBios::Switch2Pos cduLsk5l("CDU_LSK_5L", A1); DcsBios::Switch2Pos cduLsk7l("CDU_LSK_7L", A2); DcsBios::Switch2Pos cduLsk9l("CDU_LSK_9L", A3); DcsBios::Switch2Pos cduLsk3r("CDU_LSK_3R", A4); DcsBios::Switch2Pos cduLsk5r("CDU_LSK_5R", A5); DcsBios::Switch2Pos cduLsk7r("CDU_LSK_7R", A6); DcsBios::Switch2Pos cduLsk9r("CDU_LSK_9R", A7); DcsBios::Switch2Pos cduSys("CDU_SYS", A8); DcsBios::Switch2Pos cduNav("CDU_NAV", A9); DcsBios::Switch2Pos cduWp("CDU_WP", A10); DcsBios::Switch2Pos cduOset("CDU_OSET", A11); DcsBios::Switch2Pos cduFpm("CDU_FPM", A12); DcsBios::Switch2Pos cduPrev("CDU_PREV", A13); DcsBios::Switch2Pos cdu0("CDU_0", A14); DcsBios::Switch2Pos cdu1("CDU_1", A15); DcsBios::Switch2Pos cdu2("CDU_2", 2); DcsBios::Switch2Pos cdu3("CDU_3", 3); DcsBios::Switch2Pos cdu4("CDU_4", 4); DcsBios::Switch2Pos cdu5("CDU_5", 5); DcsBios::Switch2Pos cdu6("CDU_6", 6); DcsBios::Switch2Pos cdu7("CDU_7", 7); DcsBios::Switch2Pos cdu8("CDU_8", 8); DcsBios::Switch2Pos cdu9("CDU_9", 9); DcsBios::Switch3Pos cduPg("CDU_PG", 10, 11); DcsBios::Switch3Pos cduData("CDU_DATA", 12, 13); int i = 0; // just for testing/debugging int j = 0; // just for testing/debugging UTFTGLUE myGLCD(0x9486,A2,A1,A3,A4,A0); // set different brightness // bright1 = 0x01E0; // darkest // bright2 = 0x02E0; // values just for reference // bright3 = 0x03E0; // so you know what my intention is // bright4 = 0x04E0; // bright5 = 0x05E0; // bright6 = 0x06E0; // bright7 = 0x07E0; //brightest int cduBrt = 0x07E0; // start value void onCduBrtChange(unsigned int newValue) { // newValue range 0 (left/down),1 (neutral),2 (right/up) if (newValue == 0){ // DIM/BRT-Rocker left cduBrt = cduBrt - 0x0100; }; if (newValue == 2){ // DIM/BRT-Rocker right cduBrt = cduBrt + 0x0100; }; if (cduBrt > 0x07E0){ cduBrt = 0x07E0; }; if (cduBrt < 0x01E0){ cduBrt = 0x01E0; }; }; DcsBios::IntegerBuffer cduBrtBuffer(0x10fa, 0x0003, 0, onCduBrtChange); // problem: just altered lines are drawn with new brightness void printChar(int row, int col, unsigned char c) { int16_t x = 13 + col * 19; int16_t y = row * 32 + 6; myGLCD.drawChar(x, y, c, cduBrt, 0x0, 3); //0x07E0 } /* paste code snippets from the reference documentation here */ void onCduLine0Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(0, i, newValue); } } DcsBios::StringBuffer<24> cduLine0Buffer(0x11c0, onCduLine0Change); void onCduLine1Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(1, i, newValue); } } DcsBios::StringBuffer<24> cduLine1Buffer(0x11d8, onCduLine1Change); void onCduLine2Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(2, i, newValue); } } DcsBios::StringBuffer<24> cduLine2Buffer(0x11f0, onCduLine2Change); void onCduLine3Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(3, i, newValue); } } DcsBios::StringBuffer<24> cduLine3Buffer(0x1208, onCduLine3Change); void onCduLine4Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(4, i, newValue); } } DcsBios::StringBuffer<24> cduLine4Buffer(0x1220, onCduLine4Change); void onCduLine5Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(5, i, newValue); } } DcsBios::StringBuffer<24> cduLine5Buffer(0x1238, onCduLine5Change); void onCduLine6Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(6, i, newValue); } } DcsBios::StringBuffer<24> cduLine6Buffer(0x1250, onCduLine6Change); void onCduLine7Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(7, i, newValue); } } DcsBios::StringBuffer<24> cduLine7Buffer(0x1268, onCduLine7Change); void onCduLine8Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(8, i, newValue); } } DcsBios::StringBuffer<24> cduLine8Buffer(0x1280, onCduLine8Change); void onCduLine9Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(9, i, newValue); } } DcsBios::StringBuffer<24> cduLine9Buffer(0x1298, onCduLine9Change); void setup() { DcsBios::setup(); // Setup the LCD myGLCD.InitLCD(); myGLCD.clrScr(); myGLCD.setTextSize(3); myGLCD.setColor(0, 0, 0); // seems to have no effect myGLCD.drawRect(0, 0, 0, 255); } void loop() { DcsBios::loop(); myGLCD.invertDisplay(1); } So I then converted the same sketch to RS485 and uploaded it to the cdu mega slave 1. /* The following #define tells DCS-BIOS that this is a RS-485 slave device. It also sets the address of this slave device. The slave address should be between 1 and 126 and must be unique among all devices on the same bus. */ #define DCSBIOS_RS485_SLAVE 1 /* The Arduino pin that is connected to the /RE and DE pins on the RS-485 transceiver. */ #define TXENABLE_PIN 2 #include "DcsBios.h" #include <Adafruit_GFX.h> #include <UTFTGLUE.h> /* paste code snippets from the reference documentation here */ DcsBios::Switch2Pos cduLsk3l("CDU_LSK_3L", A0); DcsBios::Switch2Pos cduLsk5l("CDU_LSK_5L", A1); DcsBios::Switch2Pos cduLsk7l("CDU_LSK_7L", A2); DcsBios::Switch2Pos cduLsk9l("CDU_LSK_9L", A3); DcsBios::Switch2Pos cduLsk3r("CDU_LSK_3R", A4); DcsBios::Switch2Pos cduLsk5r("CDU_LSK_5R", A5); DcsBios::Switch2Pos cduLsk7r("CDU_LSK_7R", A6); DcsBios::Switch2Pos cduLsk9r("CDU_LSK_9R", A7); DcsBios::Switch2Pos cduSys("CDU_SYS", A8); DcsBios::Switch2Pos cduNav("CDU_NAV", A9); DcsBios::Switch2Pos cduWp("CDU_WP", A10); DcsBios::Switch2Pos cduOset("CDU_OSET", A11); DcsBios::Switch2Pos cduFpm("CDU_FPM", A12); DcsBios::Switch2Pos cduPrev("CDU_PREV", A13); DcsBios::Switch2Pos cdu0("CDU_0", A14); DcsBios::Switch2Pos cdu1("CDU_1", A15); DcsBios::Switch2Pos cdu2("CDU_2", 3); DcsBios::Switch2Pos cdu3("CDU_3", 4); DcsBios::Switch2Pos cdu4("CDU_4", 5); DcsBios::Switch2Pos cdu5("CDU_5", 6); DcsBios::Switch2Pos cdu6("CDU_6", 7); DcsBios::Switch2Pos cdu7("CDU_7", 8); DcsBios::Switch2Pos cdu8("CDU_8", 9); DcsBios::Switch2Pos cdu9("CDU_9", 10); DcsBios::Switch3Pos cduPg("CDU_PG", 11, 12); int i = 0; // just for testing/debugging int j = 0; // just for testing/debugging UTFTGLUE myGLCD(0x9486,A2,A1,A3,A4,A0); // set different brightness // bright1 = 0x01E0; // darkest // bright2 = 0x02E0; // values just for reference // bright3 = 0x03E0; // so you know what my intention is // bright4 = 0x04E0; // bright5 = 0x05E0; // bright6 = 0x06E0; // bright7 = 0x07E0; //brightest int cduBrt = 0x07E0; // start value void onCduBrtChange(unsigned int newValue) { // newValue range 0 (left/down),1 (neutral),2 (right/up) if (newValue == 0){ // DIM/BRT-Rocker left cduBrt = cduBrt - 0x0100; }; if (newValue == 2){ // DIM/BRT-Rocker right cduBrt = cduBrt + 0x0100; }; if (cduBrt > 0x07E0){ cduBrt = 0x07E0; }; if (cduBrt < 0x01E0){ cduBrt = 0x01E0; }; }; DcsBios::IntegerBuffer cduBrtBuffer(0x10fa, 0x0003, 0, onCduBrtChange); // problem: just altered lines are drawn with new brightness void printChar(int row, int col, unsigned char c) { int16_t x = 13 + col * 19; int16_t y = row * 32 + 6; myGLCD.drawChar(x, y, c, cduBrt, 0x0, 3); //0x07E0 } /* paste code snippets from the reference documentation here */ void onCduLine0Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(0, i, newValue); } } DcsBios::StringBuffer<24> cduLine0Buffer(0x11c0, onCduLine0Change); void onCduLine1Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(1, i, newValue); } } DcsBios::StringBuffer<24> cduLine1Buffer(0x11d8, onCduLine1Change); void onCduLine2Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(2, i, newValue); } } DcsBios::StringBuffer<24> cduLine2Buffer(0x11f0, onCduLine2Change); void onCduLine3Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(3, i, newValue); } } DcsBios::StringBuffer<24> cduLine3Buffer(0x1208, onCduLine3Change); void onCduLine4Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(4, i, newValue); } } DcsBios::StringBuffer<24> cduLine4Buffer(0x1220, onCduLine4Change); void onCduLine5Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(5, i, newValue); } } DcsBios::StringBuffer<24> cduLine5Buffer(0x1238, onCduLine5Change); void onCduLine6Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(6, i, newValue); } } DcsBios::StringBuffer<24> cduLine6Buffer(0x1250, onCduLine6Change); void onCduLine7Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(7, i, newValue); } } DcsBios::StringBuffer<24> cduLine7Buffer(0x1268, onCduLine7Change); void onCduLine8Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(8, i, newValue); } } DcsBios::StringBuffer<24> cduLine8Buffer(0x1280, onCduLine8Change); void onCduLine9Change(char* newValue) { for(int i = 0; i < 24; i++){ printChar(9, i, newValue); } } DcsBios::StringBuffer<24> cduLine9Buffer(0x1298, onCduLine9Change); void setup() { DcsBios::setup(); // Setup the LCD myGLCD.InitLCD(); myGLCD.clrScr(); myGLCD.setTextSize(3); myGLCD.setColor(0, 0, 0); // seems to have no effect myGLCD.drawRect(0, 0, 0, 255); } void loop() { DcsBios::loop(); myGLCD.invertDisplay(1); } Like I said, the font doesn't display correctly at all, as if I didn't update the library glcdfont.c font. It's as if the RS485 network doesn't even look at the font in the library. Weird problem, thank you for any help. glcdfont.c.txt
  6. I have a 580gtx and run win7 x64. All I had to do was DL this http://www.digitalcombatsimulator.com/en/files/585372/?sphrase_id=505213 and drug these files to my bin folder: See below SweetFX_preset.txt SweetFX_Settings.txt injector.ini dxdi.fx shader.fx log.log d3d9.dll dxgi.dll Next fired up dcs to verify it was working via seeing the split screen. Then exited and disabled the split screen option in the settings txt and good to go. "#define USE_SPLITSCREEN 1 //[0 or 1] Splitscreen : Enables the before-and-after splitscreen comparison mode". Change the 1 to 0
  7. I see.. Glad to see your build is working.. now if we could only get those darn gun pods, and salvo working. :thumbup:
  8. I'll have to try firing them in pairs tonight. I have not applied the 1.2.3 update 1 yet so are they working due to the update? How are you able to get them to fire in pairs? I'm doing it by the book.
  9. That sucks.. Red tape. The world is wrapped in it. I'm suprised sun light gets through. "when businesses compete.. you lose!" :doh: I'm excited about the 25 pit, just wish it was the 25T due to the shkval, the Hud.. yada yada.
  10. I'm glad to see that the russian birds are getting some much needed attention like the U.S counterparts. I wish we could make the 25 the free bird for DCS world and keep the 25T as payware. The 25T is a more updated jet so it seems backwards to me. It just seems updateing the 25T would be the way to go. I'm happy to see at least one of the 25's will be updated. The Su-33 needs to be on par with the F-15
  11. Can we move this thread to DCS World bug reports page? I want to make sure this issue gets reported. Thank you.
  12. I'd make the 25T pit a payware addon. Either way i'm happy to see some work being done on the Russian hardware.
  13. Yeah.. I should of posted this under Su-25t bugs.. but it was late and I was not paying attention obviously. I also noticed that firing the vikhrs in pairs does not work either. I might go back to 1.2.2 for now.. although, I could just pretend I have a busted Su suffering from neglect Haha.
  14. Yeah.. I think the part about F'ing up your trim was what did it for me.. It kept me awake and having a good time.
  15. Exactamundo! I don't bother me.. I think it's damn hilarious :megalol: I love it when people just cut the crap and talk like a real person when doing youtube videos. It should have a "Not for children" warning..Haha! but I doubt this day and age that kids fly study sims.. that requires to much effort.
  16. First off. Thanks guys for the reply. I'm in nny mode and not pny. I was afraid you guys would say "Broken" but I wanted to make sure I'm not doing something wrong.
  17. Sweet! thanks for the videos.. I'll have to finish watching them tomorrow at my shop.. my internet here sucks. Man you have me roll'n with the S and F bombs.. you gotta know when to use them and man you nailed it.. Haha!
  18. I am trying to use the gun pods as per training video and the problem i'm running into is trying to use all 4 gun pods to fire on a target flying straight and level using shkval and auto pilot. I have the fire control system setup just like in the video. I lock the target with the shkval, turn on auto pilot, then activate the laser and wait for the shoot cue.. when I pull the trigger all I get is a single blip out of the pods then the shkval will break lock on the target after I over fly the target. When I say blip.. I mean.. a single shot. Not sure what is wrong but I'm doing everything you see in the video and I can't get the pods to fire until after I break lock. Somtimes the count down timer will stop just above the maximum range bar and stay there and will never give a shoot cue.. even if i'm 20k away. I'm using dcs world 1.2.3 Thanks guys.
  19. Your going to have to have the full install of 1.2.2 to do "Roll Back". I always keep the full install. I always keep two versions incase the 'Update" is crap.
  20. If your system has a Microsoft OS installed.. your system is already doing things behind the scenes especialy your browser that you are unaware of. Your system is always transmitting data. So in reality you live in a false positive everyday. The entire OS is a gui so you only see what they want you to see. Your pc is bugged right from the start, there is backdoor tech in everything. Check out the xbox kinect. Even the new xbox and ps4 coming out will have high def cameras and microphones installed and connected to the web. Your bugging yourself..lol Just do a search for kinect hacks.. you'll see the u.s army has admited hacking the kinect. You can also google up "The internet of things"
  21. I'm sure might of already have seen this post but these settings work pretty well. I ran them last night and liked the out come well enouph. My bush and tree clutter is at 50% and no tree shadows or v-sync.. and everthing runs very smooth. Your gonna get some slow downs here and there. http://forums.eagle.ru/showpost.php?p=1682679&postcount=1
  22. You should be able to pull that off with a usb controller board and use a momentary on-off switch then map Lshif+10 to it. Love these things.. I have all four. http://groovygamegear.com/webstore/index.php?main_page=product_info&cPath=76_81&products_id=234
  23. In basic.. they would put a big "L" on your kevlar at the grenade range if you were a "Looker".. pull, throw, and then stand there and watch..lol. Not pulling out in time is a hard habbit to break.. 1. your old lady will end up pregnant.. and 2. You'll most likely get shot down. :thumbup:
×
×
  • Create New...