Jump to content

nikolas0618

Members
  • Posts

    10
  • Joined

  • Last visited

About nikolas0618

  • Birthday 01/01/1981

Personal Information

  • Flight Simulators
    dcs
  • Location
    Россия
  • Interests
    dcs
  • Occupation
    radio
  • Website
    https://vk.com/id206325661

Recent Profile Visitors

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

Single Status Update

See all updates by nikolas0618

  1. ILS

    /*
      Tell DCS-BIOS to use a serial connection and use interrupt-driven
      communication. The main program will be interrupted to prioritize
      processing incoming data.
      
      This should work on any Arduino that has an ATMega328 controller
      (Uno, Pro Mini, many others).
     */
    #define DCSBIOS_IRQ_SERIAL
    #include "DcsBios.h"
    #include "TM1637TinyDisplay6.h"
    #include "DcsBios.h"
    #include <LedControl.h>

    //FIRST - 6 DIGIT 7 SEGMENT DISPLAY-Ils
    // Module connection pins (Digital Pins)
    #define CLK 2
    #define DIO 3
    TM1637TinyDisplay6 Ils(CLK, DIO); // 6-Digit Display Class Ils

    DcsBios::PotentiometerEWMA<5, 128, 5> ilsVol("ILS_VOL", A0);
    DcsBios::Switch2Pos ilsPwr("ILS_PWR", 4);
    DcsBios::RotaryEncoder ilsMhz("ILS_MHZ", "DEC", "INC", 6, 7);
    DcsBios::RotaryEncoder ilsKhz("ILS_KHZ", "DEC", "INC", 11, 12);
    DcsBios::Switch3Pos a102HmcsPw("A102_HMCS_PW", 8, 9);
    //ILS
    void onIlsMhzChange(char* newValue) {
    Ils.showString(newValue, 3, 0);
    }
    DcsBios::StringBuffer<3> ilsMhzStrBuffer(0x116e, onIlsMhzChange);
    void onIlsKhzChange(char* newValue) {
      
    Ils.showString(newValue, 2, 4);
    }
    DcsBios::StringBuffer<2> ilsKhzStrBuffer(0x1172, onIlsKhzChange);


    // Canal Ils
    void onIlsFrequencySChange(char* newValue) {

      
    Ils.showString (newValue, 0, 6);
    }
    DcsBios::StringBuffer<6> ilsFrequencySBuffer(0x12d8, onIlsFrequencySChange);


    void onIlsPwrChange(unsigned int newValue) {
    if (newValue > 0){
    Ils.setBrightness(15, true);
    }
    else {Ils.setBrightness(15, false);
    }
    }
    DcsBios::IntegerBuffer ilsPwrBuffer(0x1168, 0x0010, 4, onIlsPwrChange);


    void setup()
    {
    DcsBios::setup();
    Ils.clear();
    }
    void loop()
    {
    DcsBios::loop();
    }

×
×
  • Create New...