Jump to content

Balthazar

Members
  • Posts

    30
  • Joined

  • Last visited

Recent Profile Visitors

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

  1. Using my ipad with it with duet display app. It works but unfortunately the touchscreen function for the buttons no!
  2. I didn't figure out how the 10K, 1K and 100 worked. A friend explained me that the 100 has 3 digits and the others one and he helped me with the translation of the DCS-Bios data to digits. I also added some other functions and the results are the followings. RF = Remaining Fuel FF = Fuel Flow LG = Landing Gear UP/DN AB = Air Brakes CLO/OPN The code i finally did #define DCSBIOS_IRQ_SERIAL #include <DcsBios.h> #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,20,4); int l = 0; //Remaing fuel counter// void onFueltotalizer1kChange(unsigned int newValue) { unsigned int lEngFuelFlowValue = (newValue & 0xffff) >> 0; unsigned int valueL = map(lEngFuelFlowValue, 0, 65535, 0, 11); l = valueL; lcd.setCursor(4,0); lcd.print(valueL); } DcsBios::IntegerBuffer fueltotalizer1kBuffer(0x44e2, 0xffff, 0, onFueltotalizer1kChange); void onFueltotalizer100Change(unsigned int newValue) { unsigned int lEngFuelFlowValue = (newValue & 0xffff) >> 0; unsigned int valueL = map(lEngFuelFlowValue, 0, 65535, 0, 99); unsigned int firstDigit; unsigned int secondDigit; firstDigit = valueL/10; secondDigit = valueL%10; lcd.setCursor(5,0); lcd.print(firstDigit); lcd.setCursor(6,0); lcd.print(secondDigit); lcd.setCursor(7,0); lcd.print("0"); } DcsBios::IntegerBuffer fueltotalizer100Buffer(0x44e4, 0xffff, 0, onFueltotalizer100Change); void onFueltotalizer10kChange(unsigned int newValue) { unsigned int lEngFuelFlowValue = (newValue & 0xffff) >> 0; unsigned int valueL = map(lEngFuelFlowValue, 0, 65535, 0, 11); lcd.setCursor(3,0); lcd.print(valueL); } DcsBios::IntegerBuffer fueltotalizer10kBuffer(0x44e0, 0xffff, 0, onFueltotalizer10kChange); //Fuel flow counter// void onFuelflowcounter10kChange(unsigned int newValue) { unsigned int lEngFuelFlowValue = (newValue & 0xffff) >> 0; unsigned int valueL = map(lEngFuelFlowValue, 0, 65535, 0, 11); lcd.setCursor(3,1); lcd.print(valueL); } DcsBios::IntegerBuffer fuelflowcounter10kBuffer(0x44d6, 0xffff, 0, onFuelflowcounter10kChange); void onFuelflowcounter1kChange(unsigned int newValue) { unsigned int lEngFuelFlowValue = (newValue & 0xffff) >> 0; unsigned int valueL = map(lEngFuelFlowValue, 0, 65535, 0, 11); l = valueL; lcd.setCursor(4,1); lcd.print(valueL); } DcsBios::IntegerBuffer fuelflowcounter1kBuffer(0x44d8, 0xffff, 0, onFuelflowcounter1kChange); void onFuelflowcounter100Change(unsigned int newValue) { unsigned int lEngFuelFlowValue = (newValue & 0xffff) >> 0; unsigned int valueL = map(lEngFuelFlowValue, 0, 65535, 0, 99); unsigned int firstDigit; unsigned int secondDigit; firstDigit = valueL/10; secondDigit = valueL%10; lcd.setCursor(5,1); lcd.print(firstDigit); lcd.setCursor(6,1); lcd.print(secondDigit); lcd.setCursor(7,1); lcd.print("0"); } DcsBios::IntegerBuffer fuelflowcounter100Buffer(0x44da, 0xffff, 0, onFuelflowcounter100Change); //Gear down// void onGearHandleChange(unsigned int newValue) { lcd.setCursor(13,0); if (newValue == 0){ lcd.print("DN"); } else { lcd.print("UP"); } } //Air Brakes// void onSpeedbrakeIndicatorChange(unsigned int newValue) { lcd.setCursor(13,1); if (newValue == 0){ lcd.print("CLO"); } else { lcd.print("OPN"); } } DcsBios::IntegerBuffer speedbrakeIndicatorBuffer(0x44c6, 0xffff, 0, onSpeedbrakeIndicatorChange); DcsBios::IntegerBuffer gearHandleBuffer(0x441c, 0x4000, 14, onGearHandleChange); void setup() { DcsBios::setup(); lcd.init(); lcd.init(); lcd.backlight(); lcd.setCursor(0,0); lcd.print("RF:"); lcd.setCursor(0,1); lcd.print("FF:"); lcd.setCursor(10,0); lcd.print("LG:"); lcd.setCursor(10,1); lcd.print("AB:"); } void loop() { DcsBios::loop(); }
  3. Guys finally i made it. As soon as i will finalize all that i want to do i will upload it in case anyone else is interested. Thanks for your insights!
  4. Hi first of all thank you both for taking the time to help me. I appreciate it. @No1sonuk You are perfectly right the code was not compiling because at the beginning i used wrong reference value and when i changed it i forgot to change the one you catch here. Thanks. Now is compiling. @Vinc_Vega Indeed i had only the 100th digits and i would put also the rest as soon as i could manage to compile. Now the code is like below but i do not read correct fuel flow! It seems that i miss something. #define DCSBIOS_IRQ_SERIAL #include <DcsBios.h> #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,20,4); int Fueltotalizer1k = 0; int Fueltotalizer100 = 0; int Fueltotalizer10k = 0; void screen() { lcd.setCursor(0,0); lcd.print("Fuel: "); lcd.setCursor(6,0); lcd.print(Fueltotalizer10k); lcd.setCursor(7,0); lcd.print(Fueltotalizer1k); lcd.setCursor(8,0); lcd.print(Fueltotalizer100); lcd.setCursor(9,0); lcd.print("00"); } void onFueltotalizer1kChange(unsigned int newValue) { Fueltotalizer1k = newValue; screen(); } DcsBios::IntegerBuffer fueltotalizer1kBuffer(0x44e2, 0xffff, 0, onFueltotalizer1kChange); void onFueltotalizer100Change(unsigned int newValue) { Fueltotalizer100 = newValue; screen(); } DcsBios::IntegerBuffer fueltotalizer100Buffer(0x44e4, 0xffff, 0, onFueltotalizer100Change); void onFueltotalizer10kChange(unsigned int newValue) { Fueltotalizer10k = newValue; screen(); } DcsBios::IntegerBuffer fueltotalizer10kBuffer(0x44e0, 0xffff, 0, onFueltotalizer10kChange); void setup() { DcsBios::setup(); lcd.init(); lcd.init(); lcd.backlight(); } void loop() { DcsBios::loop(); }
  5. Hi and thanks for the reply. 1. Arduino Uno, LCD 16x2 with I2C exp, DCS-Bios hub 0.10.0 2. Yes and LCD works fine 3. With pleasure but not sure you will understand what i am doing there since as newbie i do not know a think #define DCSBIOS_IRQ_SERIAL #include <DcsBios.h> #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,20,4); int Fueltotalizer1k = 0; int Fueltotalizer100 = 0; int Fueltotalizer10k = 0; void screen() { lcd.setCursor(0,0); lcd.print(" "); lcd.setCursor(0,0); lcd.print(Fueltotalizer100); } /* paste code snippets from the reference documentation here */ void onFueltotalizer1kChange(unsigned int newValue) { Fueltotalizer1k = newValue; screen(); } DcsBios::IntegerBuffer fueltotalizer1kBuffer(0x44e2, 0xffff, 0, onFueltotalizer1kChange); void onFuelflowcounter100Change(unsigned int newValue) { Fueltotalizer100 = newValue; screen(); } DcsBios::IntegerBuffer fueltotalizer10kBuffer(0x44e4, 0xffff, 0, onFueltotalizer100Change); void onFueltotalizer10kChange(unsigned int newValue) { Fueltotalizer10k = newValue; screen(); } DcsBios::IntegerBuffer fueltotalizer10kBuffer(0x44e0, 0xffff, 0, onFueltotalizer10kChange); void setup() { DcsBios::setup(); lcd.init(); lcd.init(); lcd.backlight(); } void loop() { DcsBios::loop(); } Thanks for your patience.
  6. Hi all, Trying to bring fuel flow indicator of f16 in an LCD 16/2 with I2C expansion. I am new to arduino coding. I tried to create the code but cannot figure it out. Anybody who has a code for it or can help create one? Tried combining some things from internet but no luck. Thanks
  7. Greece for me too! Great geography with mountainous areas, islands, flat places. It has almost all types of grounds. Also great for carrier operations!
  8. Squadron: Pegasus Virtual Squadron Timezone: Zulu +3 18:00z - 19:00z best for us Aircraft: F16, F18, JF17, F14, SU27 Maps: Caucasus, Gulf, Syria
  9. Dear DCS and flight simulators friends, We are thrilled to announce that a new Hellenic virtual squadron has been formed and is ready to fly in the virtual DCS world! Pegasus Virtual Squadron formed in 28/2/2021 and today 10/04/2021 opens the gates to the public. Pegasus created from a group of friends with common characteristic the love for the aviation and flight simulators. Today our squadron counts 18 members all Greeks. We fly with variety of aircrafts and helicopters and we are going to create swarms for each type of module which our members can fly. We have an organized training department and we use an LMS for our trainings. We operate from Greece and we have internal and external PvPs / PvEs every Wednesday, Friday and Sunday at 9pm UTC +3. For more info please visit our official web site www.pegasus-v-sqn.gr. We will meet up to the virtual skies!!! The Staff of Pegasus BCFMV
  10. The update rate. Sorry English is not my native language. Corrected in my initial question
  11. Hi all, Is anybody knows if the HSD data update rate we have now is accurate? It seems to has quite big delay comparing other aircrafts and it makes it almost unusable for acm. I understand that we will have some delay but sometimes it seems quite big.
  12. Have exactly the same issue exporting MFDs to iPad using it as a second monitor. Especially with pods it is unplayable for me with external monitors. Tested with F18 and JF 17.
  13. @TheBigTatanka Thanks a lot. I am not at least intentionally. I checked my throttle assignments. In coolie switch which i use for the comms (2 positions) the other two had assigned by default IFF in and out. Maybe it is doing what you say. I will try it in the next PvP. Thanks again mate!!!!
  14. Hi all, I have an issue and i am wondering if anybody else has it. When i play PvP suddenly i lose in my radar the info which should come from the datalink. In SA page they are all visible but in radar in a point stops to pass the info the DL. I stop to see the red triangles for hostiles or the green contacts for friendlies. In fact in my SA i see everything normal but my radar sees just contacts and this only if they are of course into my antennas elevation specs. It like in SA page i have DL but in radar not at all even if we have an awacs or team members. I have this issue quite long time now and i did many things including re-installation of dcs and erasing everything in saved games data. Nothing worked. I raised the issue to bugs bur unfortunately even if i attached a link with track file ED doesn’ t reply. Any other idea will be appreciated! Thanks
×
×
  • Create New...