Jump to content

amido

Members
  • Posts

    133
  • Joined

  • Last visited

1 Follower

About amido

  • Birthday 01/30/1974

Personal Information

  • Flight Simulators
    falcon BMS
    DCS world
  • Location
    Porto Viro
  • Interests
    cockpit build

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. amido

    DCS 2.9

    io spero un ATC come quello di BMS, o almeno che si avvicini
  2. amido

    mfd coguar

    ti ho mandato pm
  3. amido

    mfd coguar

    ciao, vendi anche separatamente?
  4. ciao a tutti, io ho un x56 e vorrei prendere lo stick winwing. com'è? con il mio faccio una fatica bestiale a fare aar. vorrei sapere se ha laschi nei micro movimenti o se è preciso. grazie
  5. ok, thanks a lot, always a lot of help. I'll try and see if there are no problems. again thank you very much
  6. is it possible to make a single sketch for the commands of both 18 and 16?
  7. this is what i use with arduino leonardo #include <Joystick.h> void setup() { // Initialize Button Pins pinMode(0, INPUT_PULLUP); pinMode(1, INPUT_PULLUP); pinMode(2, INPUT_PULLUP); pinMode(3, INPUT_PULLUP); pinMode(4, INPUT_PULLUP); pinMode(5, INPUT_PULLUP); pinMode(6, INPUT_PULLUP); pinMode(7, INPUT_PULLUP); pinMode(8, INPUT_PULLUP); pinMode(9, INPUT_PULLUP); pinMode(10, INPUT_PULLUP); // Initialize Joystick Library Joystick.begin(); } // Costante che mappa il pin fisico sul pulsante del joystick. const int pinToButtonMap = 0; // Ultimo stato del pulsante int lastButtonState[10] = {0,0,0,0}; void loop() { // Read pin values for (int index = 0; index < 6; index++) { int currentButtonState = !digitalRead(index + pinToButtonMap); if (currentButtonState != lastButtonState[index]) { Joystick.setButton(index, currentButtonState); lastButtonState[index] = currentButtonState; } } delay(50); }
  8. hello, I use this to export the ifei via lua file. IFEI_init.lua
  9. it should be one of these or all three, I attach the image. I think it's the former but I'm not sure /*------------------------------------ Visualizzazione del numero dello scratchpad --------- ------------------------------------*/ void onUfcScratchpadNumberDisplayChange(char* newValue) { /* il tuo codice qui */ ScPad[2] = newValue; // Copia i numeri nell'array dello scratchpad nella terza posizione dell'array DisplayScrn(); // Chiama la funzione Display Screen } DcsBios::StringBuffer<8> ufcScratchpadNumberDisplayBuffer(0x7446, onUfcScratchpadNumberDisplayChange); /*----------------------------------- scratchpad visualizzazione della prima stringa --------- ---------------------------------*/ void onUfcScratchpadString1DisplayChange(char* newValue) { /* qui il tuo codice */ ScPad[0] = newValue; // Copia 1st chr nell'array dello scratchpad alla 1a posizione nell'array DisplayScrn(); // Chiama la funzione Display Screen } DcsBios::StringBuffer<2> ufcScratchpadString1DisplayBuffer(0x744e, onUfcScratchpadString1DisplayChange); /*----------------------------------- scratchpad visualizzazione seconda stringa --------- ---------------------------------*/ void onUfcScratchpadString2DisplayChange(char* newValue) { /* qui il tuo codice */ ScPad[1] = newValue; // Copia il secondo chr nell'array dello scratchpad alla seconda posizione nell'array DisplayScrn(); // Chiama la funzione Display Screen } DcsBios::StringBuffer<2> ufcScratchpadString2DisplayBuffer(0x7450, onUfcScratchpadString2DisplayChange);
  10. as you can see all but one work. Can anyone help me fix the arduino sketch?
  11. hello everyone, after a month of testing I managed to fix the UFC screens, but the only one I can't get to work is the screen where the radio frequency is indicated (central top) I am attaching the sketch to understand what is wrong #include <Adafruit_SSD1306.h> #include <splash.h> #define MUX_Address 0x70 // TCA9548A Encoders address #define DCSBIOS_IRQ_SERIAL #include "Wire.h" #include <U8glib.h> #include "DcsBios.h" Adafruit_SSD1306 oled(6); char* OpQue[5]; // Create Option Quing Global Array char* Dval[5]; // Create Option Display Global Array char* ScPad[3]; // Create Scratchpad Display Global Array char tmp_string[8]; // Temp string to convert numeric values to string before print to OLED display U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_FAST); // Fast I2C / TWI // Initialize I2C buses using TCA9548A I2C Multiplexer void tcaselect(uint8_t i2c_bus) { if (i2c_bus > return; Wire.beginTransmission(MUX_Address); Wire.write(1 << i2c_bus); Wire.endTransmission(); } /* paste code snippets from the reference documentation here */ /*------------------------------------ scratchpad number display --------------------------------------------*/ void onUfcScratchpadNumberDisplayChange(char* newValue) { /* your code here */ ScPad[2] = newValue; // Copy numbers into the scratchpad array at 3rd position in array DisplayScrn(); // Call the Display Screen function } DcsBios::StringBuffer<8> ufcScratchpadNumberDisplayBuffer(0x7446, onUfcScratchpadNumberDisplayChange); /*----------------------------------- scratchpad 1st string display -----------------------------------------*/ void onUfcScratchpadString1DisplayChange(char* newValue) { /* your code here */ ScPad[0] = newValue; // Copy 1st chr into the scratchpad array at 1st position in array DisplayScrn(); // Call the Display Screen function } DcsBios::StringBuffer<2> ufcScratchpadString1DisplayBuffer(0x744e, onUfcScratchpadString1DisplayChange); /*----------------------------------- scratchpad 2nd string display -----------------------------------------*/ void onUfcScratchpadString2DisplayChange(char* newValue) { /* your code here */ ScPad[1] = newValue; // Copy 2nd chr into scratchpad array at 2nd position in array DisplayScrn(); // Call the Display Screen function } DcsBios::StringBuffer<2> ufcScratchpadString2DisplayBuffer(0x7450, onUfcScratchpadString2DisplayChange); /*---------------------------- Option Screen Displays ------------------------------*/ void onUfcOptionDisplay1Change(char* newValue) { /* your code here */ Dval[0] = newValue; // Copy the option screen 1 data into screen array DisplayScrn(); // Call the Display Screen function. Only needed a single // DisplayScrn() call as not all option screens will display // something when changed but option screen 1 ALWAYS changes } DcsBios::StringBuffer<4> ufcOptionDisplay1Buffer(0x7432, onUfcOptionDisplay1Change); /*---------------------------------------------------------------------------------*/ void onUfcOptionDisplay2Change(char* newValue) { /* your code here */ Dval[1] = newValue; // Copy the option screen 2 data into screen array } DcsBios::StringBuffer<4> ufcOptionDisplay2Buffer(0x7436, onUfcOptionDisplay2Change); /*--------------------------------------------------------------------------------*/ void onUfcOptionDisplay3Change(char* newValue) { /* your code here */ Dval[2] = newValue; // Copy the option screen 3 data into screen array } DcsBios::StringBuffer<4> ufcOptionDisplay3Buffer(0x743a, onUfcOptionDisplay3Change); /*-------------------------------------------------------------------------------*/ void onUfcOptionDisplay4Change(char* newValue) { /* your code here */ Dval[3] = newValue; // Copy the option screen 4 data into screen array } DcsBios::StringBuffer<4> ufcOptionDisplay4Buffer(0x743e, onUfcOptionDisplay4Change); /*-------------------------------------------------------------------------------*/ void onUfcOptionDisplay5Change(char* newValue) { /* your code here */ Dval[4] = newValue; // Copy the option screen 5 data into screen array } DcsBios::StringBuffer<4> ufcOptionDisplay5Buffer(0x7442, onUfcOptionDisplay5Change); /*--------------------------- Option Queing 1 -----------------------------------*/ void onUfcOptionCueing1Change(char* newValue) { /* your code here */ OpQue[0] = newValue; // Copy option 1 select value to option que array DisplayScrn(); // Call the Display Screen function } DcsBios::StringBuffer<1> ufcOptionCueing1Buffer(0x7428, onUfcOptionCueing1Change); /*--------------------------- Option Queing 2 -----------------------------------*/ void onUfcOptionCueing2Change(char* newValue) { /* your code here */ OpQue[1] = newValue; // Copy option 2 select value to option que array DisplayScrn(); // Call the Display Screen function } DcsBios::StringBuffer<1> ufcOptionCueing2Buffer(0x742a, onUfcOptionCueing2Change); /*--------------------------- Option Queing 3 -----------------------------------*/ void onUfcOptionCueing3Change(char* newValue) { /* your code here */ OpQue[2] = newValue; // Copy option 3 select value to option que array DisplayScrn(); // Call the Display Screen function } DcsBios::StringBuffer<1> ufcOptionCueing3Buffer(0x742c, onUfcOptionCueing3Change); /*--------------------------- Option Queing 4 -----------------------------------*/ void onUfcOptionCueing4Change(char* newValue) { /* your code here */ OpQue[3] = newValue; // Copy option 4 select value to option que array DisplayScrn(); // Call the Display Screen function } DcsBios::StringBuffer<1> ufcOptionCueing4Buffer(0x742e, onUfcOptionCueing4Change); /*--------------------------- Option Queing 5 -----------------------------------*/ void onUfcOptionCueing5Change(char* newValue) { /* your code here */ OpQue[4] = newValue; // Copy option 5 select value to option que array DisplayScrn(); // Call the Display Screen function } DcsBios::StringBuffer<1> ufcOptionCueing5Buffer(0x7430, onUfcOptionCueing5Change); /*------------------------------------------------------------------------------- The option queing changes are the " : " chr on the displays. The DisplayScrn() function needs to be called for each queing change as you are updating a Oled with data from 2 sources. You need to write the option queing value & the Display value together, if you just write the option queing value then that is all that will show on the Oled. ------------------------------ Setup Displays etc -----------------------------*/ void setup() { // Setup Starts DisplayInit(); // Initialize the displays function for the first time DcsBios::setup(); // Setup DCS specific functions } // Setup ends /*--------------------- Initialize the Displays Function ---------------------------------*/ void DisplayInit(){ // start of function for (int i = 0; i < 8; i++) { // Start of for loop to option & scratchpad screens // 0 is scratchpad 1-5 are option screens 6 and 7 is comm1 and comm2 tcaselect(i); // selects the multiplexer output for a screen starting // at 0 indexing to next screen each time through loop do { } while( u8g.nextPage() ); } // end of for loop } // end of function /* -------------------------- Main Program Loop From Here --------------------------------*/ void loop() { // Start Main Program Loop DcsBios::loop(); // run DCS Bios } // End Main Program Loop /*---------------------------------------------------------------------------------------------*/ void DisplayScrn(void) { // start of main display function for (int i = 0; i < 5; i++) { // Start of for loop to display option screens tcaselect(i+1); // Select each connected Option display on the I2C buses // " 0 " is scratchpad display hence " i+1 " to index onto the // correct bus for each Option Display screen u8g.firstPage(); do { u8g.setFont(u8g_font_helvB18); // standard nice size font for displays u8g.drawStr( 0,25,OpQue[i]); // Option selection value displayed u8g.drawStr( 15,25,Dval[i]); // Option choices displayed } while( u8g.nextPage() ); } // End of for loop to display option screens } // end of main display function u8g.begin();// Initialize displays u8g.setFont(u8g_font_helvB18); // standard nice size font for displays
  12. ok, I'm almost there, I just have to figure out how to insert the central display of the comms.
  13. thanks lesthegrngo I will try by modifying your code, I hope to succeed
×
×
  • Create New...