Jump to content

Regnad517

Members
  • Posts

    48
  • Joined

  • Last visited

Posts posted by Regnad517

  1. So along with some others, I have a hell of a time seeing the radio fonts with a 4K TV so I slapped this together.

     

    Capture.png

     

    DOWNLOAD HERE

    http://s000.tinyupload.com/index.php?file_id=06314137407832799126

     

     

    This is for DCS World 2.5 and above.

    Currently it simply changes the font size for radio communications and allows you to change font color for tower conversation.

    I will be adding the ability to expand the top right menu to accommodate bigger fonts.

     

    Oops, had white and black reversed. New file is ready.

  2. So I have noticed a bit of a lag as flight goes on so I am curious about putting Ikarus on a LAN machine and running it from its own dedicated computer. I am curious though as to how to export the RWR and MFCD viewports I will need for the A10C?

  3. Yeah as I said at end of my earlier post, I see the functions were missing. I really haven't seen an "easy" way to put the functions back without knowing the ID and settings in advance but have been able to just copy settings and get it all working. Thanks

  4. Could you give me your Ikarus file?

     

    Sure thing. And here is exactly what I've done and can reproduce it everytime, have tried multiple times.

     

    I start with the A10C profile that prebuilt, I remove the panels and gauges I am not using, then set proper x and y cords for my setup. Then lets say for instance, I decide I want to add back the Whiskey Compass, when I do all gauges work except the whiskey compass. It happens with all gauges as well, not just whiskey compass, so if I delete the AOA and re-add it, then AOA stops working. The example I am uploading here, all work but the Whiskey Compass.

     

    Would love to know what I am doing wrong, thanks for looking.

     

     

    So I just fixed it, I opened the Ikarus file in Notepad+ and noticed it didnt put back the Functions for Compass so I copied the functions from the original, changed the Device ID and all is good in the universe again. Tested with AOA as well and same issue.

     

    Thanks

    A-10C.zip

  5. I'm missing something and I'm not sure what.

     

    For instance, I modified the A10C.ikarus profile for placement on my screen, removed alot of buttons, lamps, etc... Ran it and all works great, actually very impressed.

     

    But then I decided to put back the whiskey compass. I added a record and entered it exactly as it was but it doesnt get game play feedback. So I tested further, I deleted and readded the AOA and now it is dead. I cannot locate anywhere any binding info. Am I missing something?

  6. Does all resizing have to be done in scale? For instance I am wanting to lower the height of the UHF on front panel but keep width.

     

    Was using Helios but am having too many issues when I went to a 4K projector with resolution settings. Gonna give Ikarus a try.

     

    Thanks

  7. Haha, so due to some bad lag and hit or miss responsiveness, we scrapped the master/slave setup and decided to mount a USB hub in each console and then assigned the com ports accordingly. Took 17 com ports but seems to be much better than our master/slave setup. Having some 4K resolution issues at the moment so we are going to alter setup and run Helios from a separate machine. Will have some new pics and updates in the next weeks.

  8. Well I finally got around to fixing this as well. Hated the idea of having to modify the A10.lua so I dug in and finally figured it out. Here is the new code I am using for this

     

     

    /* Mega and Uno pinout is the same
    *  GRND = GRND
    *  VCC = 5V
    *  D10 = Digital input pin - this code uses pin 3
    *  CLK = Digital input pin - this code uses pin 2
    */
    #define DCSBIOS_DEFAULT_SERIAL
    
    #include <Wire.h> 
    #include "SevenSegmentTM1637.h"
    
    SevenSegmentTM1637 am(2,3); // CLK pin first, D10 pin second
    
    #include "DcsBios.h"
    
    
    // DCS-Bios Code
    void onIlsMhzChange(char* newValue) {
       am.setCursor(0,0);
       am.print(newValue[0]);
       am.setCursor(0,1);
       am.print(newValue[1]);
       am.setCursor(0,2);
       am.print(newValue[2]);
    }
    DcsBios::StringBuffer<3> ilsMhzStrBuffer(0x116e, onIlsMhzChange);
    
    void onIlsKhzChange(char* newValue) {
    
       am.setCursor(0,3);
       am.print(newValue[1]);
       am.setCursor(0,4);
       am.print(newValue[0]);
    }
    DcsBios::StringBuffer<2> ilsKhzStrBuffer(0x1172, onIlsKhzChange);
    
    // End DCS-Bios Code
    
    void setup()
     {
       DcsBios::setup();
       am.init();
       am.clear();
     }
    
    void loop()
     {
       DcsBios::loop();
     }

     

    Much cleaner and I don't have to modify the values in .lua

  9. I will be adding code for each panel we used as well as I build this thread. Might help someone else and will at least be a backup for me:doh:

     

    I was told today actually that a few of the faceplates were actually purchased from pcflights.com so thought I would mention that.

  10. OK, long time coming but can finally start to document some of this. Big thanks to Ian, Hans, and others that have helped me tremendously with some of the coding. You guys kept me going!! This community is indeed special and appreciated by me.

     

    So, backstory. A friend of mine has gone through multiple setups and never was quite satisfied. The most recent was a 9 screen touchpanel setup fully run with helios. It was close but still wasn't right. Then we read here about DCS-Bios and it changed our world. Next thing we are purchasing a CNC Machine, bunch of arduinos, already had a 3d printer, etc... with the goal to build everything ourselves from scratch. My buddy is the engineer and I'm the computer nerd so we work well together.

     

     

    We decided to split the cockpit into 3 sections basically, left, center, and right running a master Mega for each

     

    So we are 90% done with the right panel. Some quick pics

     

    IMG_2439.jpg IMG_1586.jpg

     

    IMG_2434.jpg IMG_2435.jpg

     

    IMG_2436.jpg

     

    As you can see they are coming out beautifully. Right now they are just placed in there for pics. When I say from scratch, he even made his own PCB boards with the CNC machine. Front plates are white plastic painted black and then CNC engraved. Each individual section is run from a slave arduino such as ILS, Tacan, Caution Panel, etc...

     

    Here are some individuals

     

    IMG_2408.jpg IMG_2351.jpg

     

    IMG_2441.jpg IMG_2344.jpg

     

    IMG_2349.jpg IMG_2346.jpg

  11. Yeah Sure.

     

    First off I had to modify the library for the 4Digit 7Seg library file to be 6 Coloms rather than 4. Unfortunately since the 6 Digit display writes right to left there is still some confusion on cursor placement. I wrote a quick little display 1,2,3,4,5,6 to see which cursor placement each went in

     

    Here is the code I had to change in the library

    (Line 40)

    #define TM1637_MAX_COLOM    6                 // number of coloms (digits)
    

    Since there are only 4 values for the Mhz i did simple if, else statements

     

    For the Khz, I went into the A10c.lua file found in your Saved Games directory of the user profile and changed the Khz values to be reversed

     

    defineSetCommandTumb("ILS_KHZ", 53, 3003, 249, 0.1, {0.0, 0.9}, {"01", "51", "03", "53", "05", "55", "07", "57", "09", "59"}, false, "ILS Panel", "ILS Frequency KHz")

     

    Here is the final code that works perfectly

     

    /* Mega and Uno pinout is the same
    *  GRND = GRND
    *  VCC = 5V
    *  D10 = Digital input pin - this code uses pin 3
    *  CLK = Digital input pin - this code uses pin 2
    */
    #define DCSBIOS_DEFAULT_SERIAL
    #include "TM1637_6D.h"
    #include <Wire.h> 
    #include "SevenSegmentTM1637.h"
    #define CLK 2 //pins definitions for TM1637 and can be changed to other ports
    #define DIO 3
    SevenSegmentTM1637 am(2,3); // CLK pin first, D10 pin second
    TM1637_6D tm1637_6D(CLK,DIO);
    #include "DcsBios.h"
    
    // DCS-Bios Mhz Call
    void onIlsMhzChange(unsigned int newValue) {
    // Convert int values to char values reversed
     if (newValue==0){
       am.setCursor(0,0);
       am.print(801);
     }
       else
     if (newValue==1){
       am.setCursor(0,0);
       am.print(901);
     }  
       else
     if (newValue==2){
       am.setCursor(0,0);
       am.print("011");
     }  
       else
     if (newValue==3){
       am.setCursor(0,0);
       am.print(111);
     }  
    }
    DcsBios::IntegerBuffer ilsMhzBuffer(0x1168, 0x0060, 5, onIlsMhzChange);
    
    // DCS-Bios Khz call with modified A10C.lua
    void onIlsKhzChange(char* newValue) {
       am.setCursor(0,3);
       am.print(newValue);
    }
    DcsBios::StringBuffer<2> ilsKhzStrBuffer(0x1172, onIlsKhzChange);
    
    // End DCS-Bios Code
    
    void setup()
     {
       DcsBios::setup();
       am.init();
       am.clear();
     }
    
    void loop()
     {
       DcsBios::loop();
     }
    

     

    Ive also since added the 6 digit library to the code to add a decimal point between the Mhz and the Khz

     

    I have no doubt that someone could have wrote code much better than mine, but pretty proud I got it working on my own :thumbup:

  12. OK - 3 posts in a row - I GOT IT WORKING

     

    Not the prettiest way in the world but what I did was modified the 4 digit 1637 library to hold 6 coloms. Then I simply edited the DCS Bios A10C.lua for the ILS values so they write reversed (108 = 801, 109 = 901, etc...)

     

    All is working perfectly!

  13. So I am back at this - IAN, can you look at this and tell me if there is a workaround. I do know this code will not compile but it hopefully gives you an idea of what I am trying to Accomplish

     

    void onIlsMhzChange(unsigned int newValue) 
    {
    
    if (newValue==0)
     {
       void onIlsKhzChange(char* newValue) 
       {
           if (newValue==1)
           {
             int8_t ListDisp[6] = {8,0,1,5,9,0};
             int8_t ListDispPoint[6] = {POINT_OFF,POINT_OFF,POINT_OFF,POINT_ON,POINT_OFF,POINT_OFF};
             String millisstring;
             tm1637_6D.display(ListDisp, ListDispPoint);
           }
       }
       DcsBios::StringBuffer<2> ilsKhzStrBuffer(0x1172, onIlsKhzChange);
     }  
    
    }
    DcsBios::IntegerBuffer ilsMhzBuffer(0x1168, 0x0060, 5, onIlsMhzChange);
    

     

     

    The idea is first I check for the char for the Mhz, if its 0 than the char should be 108. Great I got that fine, but then I need it to also check for the Khz while passing the 108 value. I understand there will be a crap ton of if else statements, but am willing to do that for this 6digit to work.

  14. Ian has helped me many many times already. I think I will be satisfied with this, at least it is working. Not as pretty as Ian would do it, but its working lol

     

    Thanks

     

    I spoke too soon - I can get Khz working on its own, and I can get Mhz working on its own, but cannot figure out how to get them both working together on this particular LED since it doesn't write normally or with place holders and I cannot nest a void statement within an if statement. Grrrrr Gonna sleep on it

  15. I think this is my last obstacle as far as programming.

     

    I got this very nice 6 digit 7 segment tm1637

    https://www.amazon.com/RobotDyn-6-Digit-7-segment-Display-76x19mm/dp/B071GN8ZGT?th=1

     

    I have only been able to find 1 library for it

    https://github.com/TinyTronics/TM1637_6D

     

    That library only supports int variables. Im trying to use this as the ILS but want the Char variable options in advanced for matching game numbers.

     

    I tried modifying the 4 digit 7 seg library I have and made progress, but the 6 digit writes data right to left so 108 shows up as 801, etc... and cannot set a cursor start point due to the right to left.

     

    Any ideas?

     

    Thanks again.

  16. Just curious if anyone has got a 14 seg working with dcs bios?

     

    Best I have so far is random (Im sure they are not random but they are not proper) characters. I'm trying to use a 14 segment for my Tacan so the X looks better but am having trouble incorporating it in dcs bios.

  17. So just an update.

     

    I still couldnt get it working but I was using Unos rather than Nanos, so I hooked it up with Nanos and it works great. Either I have a PIN mislabeled or a wire wrong with Unos but no matter, was planning on using Nanos anyway so all is good.

     

    Gonna start a My Cockpit thread soon with code examples that have helped me get through this, along with all of the "issues" I ran into in case I forget how to fix or for others experiencing the same issues.

     

    You guys have been life savers here, thanks for the community.

  18. So have redone it all but getting a compile error on the uno

     

    /*

    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 <Wire.h>

    #include "SevenSegmentTM1637.h"

     

    SevenSegmentTM1637 am(3,4); // D10 pin first, CLK pin second

     

    // DCS-Bios Code

    void onVhfamFreq1Change(char* newValue)

    {

    am.setCursor(0,0);

    am.print(newValue);

    }

    DcsBios::StringBuffer<2> vhfamFreq1StrBuffer(0x1190, onVhfamFreq1Change);

     

    void onVhfamFreq2Change(unsigned int newValue)

    {

    am.setCursor(0,3);

    am.print(newValue);

    }

    DcsBios::IntegerBuffer vhfamFreq2Buffer(0x118e, 0x00f0, 4, onVhfamFreq2Change);

    // End DCS-Bios Code

     

    void setup() {

    DcsBios::setup();

    }

     

    void loop() {

    DcsBios::loop();

    }

     

    Compile error message

     

    HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':

     

    (.text+0x0): multiple definition of `__vector_18'

     

    sketch\RS485SlaveTest.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

     

    HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':

     

    (.text+0x0): multiple definition of `__vector_19'

     

    sketch\RS485SlaveTest.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

     

    collect2.exe: error: ld returned 1 exit status

     

    exit status 1

    Error compiling for board Arduino/Genuino Uno.

     

    As far as my searches go it appears I have a library conflict?

     

    Doing some test builds it appears the #include "SevenSegmentTM1637.h" library conflicts with something when being used as a slave

    Tried it with i2c LCD library as well and even more errors. I'm missing something I think. And if I comment out the #define DCSBIOS_RS485_SLAVE 1 line it builds fine. Grrrrrr

     

    Thanks in advance

×
×
  • Create New...