Tekkx Posted November 15, 2015 Share Posted November 15, 2015 (edited) Oh man, Daran hab ich über haupt nicht gedacht. Ich danke dir.:thumbup: Ich danke auch :) ... und ich mache mir jetzt eine Startup-Checkliste, auf der nicht nur die Flugzeug-Instrumente sondern auch SÄMTLICHE Geräte und Hilfsprogramme meines "Sim-Pits" stehen. Und NOCH Eine extra für solche Sachen wie z.B. Export.lua :book: Neulich hat bei mir HELIOS nicht mehr funktioniert. Nach langer Suche und Neu-Konfig fand ich heraus, es war einfach nicht mehr in den Code der export.lua eingebunden. Wieso auch immer. Danke für den Tip. Wenn Sachen zu lange zu gut funktionieren, vergesse ich, wie es gemacht wird :D Edited November 15, 2015 by Tekkx Manual for my version of RS485-Hardware, contact: tekkx@dresi.de Please do not PM me with DCS-BIOS-related questions. If the answer might also be useful to someone else, it belongs in a public thread where it can be discovered by everyone using the search function. Thank You. Link to comment Share on other sites More sharing options...
33rd_Elvis Posted November 16, 2015 Share Posted November 16, 2015 Hi Leute, Ich will mir einen UHF Panel für die A-10C Bauen. Und ich will die Channel Anzeige über 7 SegementAnzeigen die mit jeweils einen 74HC595 lösen. Hab mir dazu schon einige Turtorials auf Youtube angeschaut. Wenn ich diesen Code von DCS BIOS nehme: void onUhfFrequencyChange(char* newValue) { /* your code here */ } DcsBios::StringBuffer<7> uhfFrequencyBuffer(0x1180, onUhfFrequencyChange); Was muss ich denn da noch alles ergänzen? Die Lösung mit dem LCD hab ich auf Youtube gesehen und aus probiert. Hat auch Funktioniert. Würde sie aber gern mit SegmentAnzeigen lösen. Mfg Emrah Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
FSFIan Posted November 16, 2015 Author Share Posted November 16, 2015 (edited) Du hast ja an der Stelle in newValue einen String stehen, z.B. "225.000". Damit kannst du machen, was du willst, also auch auf 7-Segment-Anzeigen darstellen. An die einzelnen Zeichen kommst du wie bei allen C-Strings durch Array-Notation dran (z.B. newValue[2] für das dritte Zeichen, die '5'). Der von DCS-BIOS exportierte String hat immer 7 Zeichen. Beim UHF-Repeater musst du natürlich auch bedenken, dass ein Zeichen auch 'A' (als Teil der Frequenz) oder '*' (wenn der UHF-Repeater "bootet") oder " " (Leerzeichen, wenn das Display aus ist) sein kann, d.h. dein Code sollte damit klarkommen und nicht annehmen, dass es immer zwischen '0' und '9' ist. Den Punkt in der Mitte wirst du auch ignorieren wollen und stattdessen für deine 7-Segment-Anzeigen das "decimal point"-Segment beim dritten Zeichen einschalten. Wie genau du jetzt deine 7-Segment-Anzeigen ansteuerst, kann ich dir nicht sagen, das hängt davon ab, welche Library und Schaltung du benutzt (Zuordnung Segmente zu Bits im Shift-Register, Multiplexing ja oder nein, etc). Edited November 16, 2015 by [FSF]Ian DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
33rd_Elvis Posted November 17, 2015 Share Posted November 17, 2015 (edited) Hi Ian, den TACAN Panel hab ich jetzt zurück gestellt wegen mangelder Kentnisse. Jetzt bin ich aber auf ein neues Problem gestoßen. Ich habe einen Encoder an das Arduino uno angeschlossen laut Schema von DCS BIOS. DCS BIOS Sketch geladen, und den Code für einen TACAN CHANNEL SELEKTOR "DcsBios::RotaryEncoder tacan1("TACAN_1", "DEC", "INC", 4, 7);" ein gefügt. Leider musste ich festellen das es im Spiel nicht Funktioniert. Was mache ich Falsch? Habe die Encoder: http://www.ebay.de/itm/3-Stuck-Drehregler-Drehgeber-Rotary-Encoder-Modul-KY-040-fur-Arduino-uvm-/181780492214?hash=item2a52f62fb6:g:kB0AAOSwT6pVpN12 edit: Hier mal der ganze Sketch: #include <DcsBios.h> #include <Servo.h> #include <Encoder.h> /**** Make your changes after this line ****/ DcsBios::RotaryEncoder tacan1("TACAN_1", "DEC", "INC", 4, 7); /**** In most cases, you do not have to change anything below this line ****/ /* Instantiate a ProtocolParser object to parse the DCS-BIOS export stream */ DcsBios::ProtocolParser parser; void setup() { Serial.begin(500000); } /* Your main loop needs to pass data from the DCS-BIOS export stream to the parser object you instantiated above. It also needs to call DcsBios::PollingInput::pollInputs() to detect changes in the state of connected controls and pass them on to DCS. */ void loop() { // feed incoming data to the parser while (Serial.available()) { parser.processChar(Serial.read()); } // poll inputs DcsBios::PollingInput::pollInputs(); } /* You need to define void sendDcsBiosMessage(const char* msg, const char* arg) so that the string msg, followed by a space, the string arg and a newline gets sent to the DCS-BIOS import stream. In this example we send it to the serial port, so you need to run socat to read the data from the serial port and send it over UDP to DCS-BIOS. If you are using an Ethernet Shield, you would probably want to send a UDP packet from this subroutine. */ void sendDcsBiosMessage(const char* msg, const char* arg) { Serial.write(msg); Serial.write(' '); Serial.write(arg); Serial.write('\n'); } /* This subroutine gets called every time a message is received from the export stream (you need to define it even if it does nothing). Use this to handle outputs which are not covered by the DcsBios Arduino library (e.g. displays). */ void onDcsBiosWrite(unsigned int address, unsigned int value) { } Mfg Emrah Edited November 17, 2015 by 33rd_Elvis Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
FSFIan Posted November 17, 2015 Author Share Posted November 17, 2015 (edited) Habe die Encoder: http://www.ebay.de/itm/3-Stuck-Drehregler-Drehgeber-Rotary-Encoder-Modul-KY-040-fur-Arduino-uvm-/181780492214?hash=item2a52f62fb6:g:kB0AAOSwT6pVpN12 Das Encoder-Modul, was du da verlinkt hast, hat als Ausgang "clock" und "direction"-Signale. Wusste gar nicht, dass sowas existiert, ist aber nicht weiter überraschend im Zeitalter von güstigen Arduino-Breakout-Boards für alles mögliche. Die RotaryEncoder-Klasse in DCS-BIOS geht davon aus, dass da ein Encoder ohne weitere Elektronik dranhängt, z.B. diese hier. Normalerweise ist so ein Encoder eine rein mechanische Komponente. In dem im letzten Absatz verlinkten Beispiel sind die zwei Pins an der einen Seite für den integrierten Schalter. Von den drei Pins an der anderen Seite wird abwechselnd der linke oder der rechte mit dem mittleren verbunden, und das passiert je nach Drehrichtung in einer anderen Reihenfolge. Wenn man einen Schritt in die eine Richtung geht, dann machen die zwei äußeren Pins das hier ("1" = verbunden, "0" = nicht verbunden): 11 -> 10 -> 00 -> 01 -> 11 in die andere Richtung ist es natürlich genau andersherun: 11 -> 01 -> 00 -> 10 -> 11 Das wird auch als "2-bit Gray Code" bezeichnet (bei einem Gray Code ändert sich zwischen zwei aufeinanderfolgenden Zuständen immer genau ein Bit). Manchmal liest man auch von einem "quadrature encoder", damit ist das gleiche gemeint. Daran kann ein Mikrocontroller dann erkennen, in welche Richtung du den Encoder drehst. Auf dem Modul, was du gekauft hast, sitzt wohl schon Elektronik drauf, die das in "Richtung" und "Takt" übersetzt. Damit rechnet DCS-BIOS nicht. Du hast jetzt mehrere Möglichkeiten: Bestelle dir "normale" rotary encoder Schreibe eine modifizierte RotaryEncoder-Klasse für DCS-BIOS, die die Signale deines Encoder-Moduls richtig interpretiert Löte den Encoder von deinem Modul runter (in der Annahme, dass sich der Rest der Schaltung zwischen Encoder und Platine versteckt und nicht im Encoder selbst eingebaut ist) Edited November 17, 2015 by [FSF]Ian DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
33rd_Elvis Posted November 18, 2015 Share Posted November 18, 2015 Hier wäre der Encoder im Detail. Für mich sieht er wie ein normaler Encoder aus, bis auf die 10K Widerstände. Da ist noch ein Code mit auf geführt auf der Seite. Kann man diesen Code zur DCS Libery Hinzufügen? Der Link hier Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
FSFIan Posted November 19, 2015 Author Share Posted November 19, 2015 Ich hab mir das nochmal angeschaut. Vergiss alles, was ich in meinem letzten Post gesagt habe, dein Encoder funktioniert wie jeder andere auch. Ich war nur durch die Bezeichnungen "clock" und "direction" verwirrt. Die Bezeichnungen ergeben durchaus Sinn, wenn man mal drüber nachdenkt... Dein Code kompiliert nicht. Wenn ich die Zeile "#include <Encoder.h>" entferne, funktioniert es bei mir mit der aktuellen Release-Version (DCS-BIOS v0.4.1, DCS-BIOS Arduino Library v0.1.3). DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
33rd_Elvis Posted November 19, 2015 Share Posted November 19, 2015 oooooooohhhhhhhhhhh Hi Ian, komischerweise kann ich nur Signale empfangen aber nicht Senden. Hab den MasterCaution Sketch geladen. Die LED blinkt aber ich kann sie mit dem Taster nicht Auschalten. Das Ding macht mich fertig. Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
33rd_Elvis Posted November 20, 2015 Share Posted November 20, 2015 (edited) Wenn Ich diesen Sketch hochlade: [code] #include <DcsBios.h> #include <Servo.h> /**** Make your changes after this line ****/ DcsBios::Switch2Pos ahcpTgp("AHCP_TGP", 4); /**** In most cases, you do not have to change anything below this line ****/ /* Instantiate a ProtocolParser object to parse the DCS-BIOS export stream */ DcsBios::ProtocolParser parser; void setup() { Serial.begin(500000); } /* Your main loop needs to pass data from the DCS-BIOS export stream to the parser object you instantiated above. It also needs to call DcsBios::PollingInput::pollInputs() to detect changes in the state of connected controls and pass them on to DCS. */ void loop() { // feed incoming data to the parser while (Serial.available()) { parser.processChar(Serial.read()); } // poll inputs DcsBios::PollingInput::pollInputs(); } /* You need to define void sendDcsBiosMessage(const char* msg, const char* arg) so that the string msg, followed by a space, the string arg and a newline gets sent to the DCS-BIOS import stream. In this example we send it to the serial port, so you need to run socat to read the data from the serial port and send it over UDP to DCS-BIOS. If you are using an Ethernet Shield, you would probably want to send a UDP packet from this subroutine. */ void sendDcsBiosMessage(const char* msg, const char* arg) { Serial.write(msg); Serial.write(' '); Serial.write(arg); Serial.write('\n'); } /* This subroutine gets called every time a message is received from the export stream (you need to define it even if it does nothing). Use this to handle outputs which are not covered by the DcsBios Arduino library (e.g. displays). */ void onDcsBiosWrite(unsigned int address, unsigned int value) { } [/code] kriege ich eine Fehlermeldung : C:\Users\Emrah\AppData\Local\Temp\arduino_cd6cfde051187c9cdeae0cef4effe39e\TemplateSketch.ino:5:42: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings] DcsBios::Switch2Pos ahcpTgp("AHCP_TGP", 4); Trotz dieser Fehlermeldung steht Hochladen abgeschlossen. Der connect-serial-port Funktioniert einwand frei. Das Board kriegt auch alle daten von DCS man sieht es an der roten Led. Mit anderen Sketch´s w.z.B. MasterCaution Sketch blinkt meine Led die ich angeschlossen habe kann es aber nicht mit dem Taster aus Schalten. Mfg Emrah Edited November 20, 2015 by 33rd_Elvis Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
FSFIan Posted November 20, 2015 Author Share Posted November 20, 2015 Die Meldung ist eine Compilerwarnung, es sollte aber trotzdem funktionieren. Kann es sein, dass deine Firewall/Antivirus DCS.exe daran hindert, auf UDP-Port 7777 nach eingehenden Paketen zu lauschen? Funktioniert die interactive control reference documentation? Du kannst mal das connect-to-serial-port.cmd aus diesem Post hier versuchen, das nimmt TCP statt UDP. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
33rd_Elvis Posted November 20, 2015 Share Posted November 20, 2015 (edited) Ich schildere jetzt mal wie das alles bei mir installiert ist: Hab mir auf Github den DCS BIOS v0.4.1 runtergeladen, dann den Inhalt Scripts in den Pfad (C:\Users\Emrah\Saved Games\DCS.openbeta) verschoben. Anschließen den aktuellen DCS BIOS Libery geladen und in Arduino hinzugefügt. In meiner Firewall noch den Port TCP 7778 und UDP 7778 frei geschalten. Den MasterCaution Sketch auf das Arduino UNO Bord Hochgeladen, DCS gestartet und danach im Game den connect-serial-port ausgeführt. Natürlich den COM Port noch eingestellt. Danach sieht man das der Datenstrom Fließt. Wenn ich z.B. den Turbinengenerator Ausschalte blingt meine Caution LED die ich am Board angeschlossen habe. Betätige mein Taster tut sich nicht die LED blinkt weiter aber am Board beobachte ich das wenn ich den Taster betätige da eine kleine LED kurz auf leuchtet. Da geht ich davon aus das das UNO Board das Signal erkennt aber nicht an DCS weiter leitet. REM Specify the number of the COM port your Arduino is connected to: set COMPORT=5 set /A TTYNUM=%COMPORT%-1 mode COM%COMPORT% BAUD=500000 PARITY=N DATA=8 STOP=1 TO=off DTR=on socat\socat -v TCP-CONNECT:localhost:7778 /dev/ttyS%TTYNUM% pause Hab ich auch probiert ging auch nicht. :cry: Edited November 20, 2015 by 33rd_Elvis Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
FSFIan Posted November 20, 2015 Author Share Posted November 20, 2015 So langsam gehen mir die Ideen aus. Irgendwelche Fehlermeldungen in der dcs.log? Die Kommunikation mit dem Arduino funktioniert ja offensichtlich. Wenn du den Taster drückst, müsstest du auch im socat-Fenster was sehen. Du sagst, das Skript mit TCP-Verbindung "ging auch nicht". Hat das denn genau so reagiert wie das andere (DCS -> Arduino geht, Arduino -> DCS nicht) oder ging da gar nichts? Hast du es testweise mal ganz ohne Firewall versucht? DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
33rd_Elvis Posted November 20, 2015 Share Posted November 20, 2015 Ich sehe hier keine Fehlermeldung was ich da zu ordnen kann: === Log opened UTC 2015-11-20 22:16:52 00000.000 INFO VFS: Using 'Saved Games': "C:\Users\Emrah\Saved Games" 00000.002 INFO DCS: DCS/1.5.1.47025 (x86_64; Windows/6.1.7601) 00000.002 INFO DCS: CPU cores: 4, System RAM: 16282 MB 00000.010 INFO EDCORE: (dDispatcher)enterToState_:0 00000.017 INFO Dispatcher: 2015/11/20 23:16 V1508170900 00000.032 INFO INPUT: Device created Keyboard 00000.035 INFO INPUT: Device created Joystick - HOTAS Warthog {8950AA30-77F7-11e4-8001-444553540000} 00000.035 INFO INPUT: Joystick created[Joystick - HOTAS Warthog {8950AA30-77F7-11e4-8001-444553540000}], ForceFeedBack: no 00000.038 INFO INPUT: Device created Throttle - HOTAS Warthog {8952F420-77F7-11e4-8002-444553540000} 00000.038 INFO INPUT: Joystick created[Throttle - HOTAS Warthog {8952F420-77F7-11e4-8002-444553540000}], ForceFeedBack: no 00000.063 INFO INPUT: Device created Saitek Pro Flight Rudder Pedals {8952F420-77F7-11e4-8007-444553540000} 00000.063 INFO INPUT: Joystick created[saitek Pro Flight Rudder Pedals {8952F420-77F7-11e4-8007-444553540000}], ForceFeedBack: no 00000.344 INFO SOUND: loaded 1069 sdefs from "sounds\sdef" 00000.424 INFO SOUND: XAudio2: Using device ID:'{0.0.0.00000000}.{7b7e28fb-bd68-4f03-8cc0-5b9b393755a8}' Name:'Lautsprecher (Realtek High Definition Audio)', channels: 2 00000.424 INFO SOUND: XAudio2: channel layout: Headphones/Stereo 00000.462 INFO SOUND: Using SSE FTZ/DAZ mode. 00000.814 ERROR VFS: Can't mount './CoreMods/WWII Units/Liveries' to '/textures//liveries/'. 00000.824 ERROR VFS: Can't mount './CoreMods/aircraft/Hawk/Textures/Avionics' to '/textures/'. 00000.832 INFO SOUND: loaded 10 sdefs from ".\coremods\aircraft\mig-21bis\sounds\sdef" 00000.866 INFO SOUND: loaded 59 sdefs from ".\mods\tech\combinedarms\sounds\sdef" 00000.886 INFO SOUND: loaded 50 sdefs from ".\mods\aircraft\f-86\sounds\sdef" 00000.913 INFO SOUND: loaded 60 sdefs from ".\mods\aircraft\fw-190d9\sounds\sdef" 00000.921 INFO SOUND: loaded 7 sdefs from ".\mods\aircraft\hawk\sounds\sdef" 00000.923 ERROR VFS: Can't mount './Mods/aircraft/Hawk/Liveries' to '/textures//liveries/'. 00000.925 INFO SOUND: loaded 4 sdefs from ".\mods\aircraft\ka-50\sounds\sdef" 00000.954 INFO SOUND: loaded 70 sdefs from ".\mods\aircraft\mig-21bis\sounds\sdef" 00000.992 INFO SOUND: loaded 85 sdefs from ".\mods\aircraft\mi-8mtv2\sounds\sdef" 00001.004 INFO SOUND: loaded 21 sdefs from ".\mods\aircraft\uh-1h\sounds\sdef" 00017.038 INFO DXRENDERER: Creating Resource "Unicode" of type 5 00017.042 INFO DX11BACKEND: TRUNK renderer init: showShaderError coreCount=1 00017.055 INFO DX11BACKEND: Driver Concurrent Creates - 1 00017.055 INFO DX11BACKEND: Driver Command Lists - 0 00017.055 INFO DX11BACKEND: DX11ShaderBinaries::loadShaders 00018.048 INFO DX11BACKEND: DX11ShaderBinaries::loadShaders finished 00018.163 ERROR VFS: Can't mount './Bazar/World/textures/L-39_C' to '/textures/'. 00018.215 INFO RENDERER: Loading metashader cache from C:\Users\Emrah\Saved Games\DCS.openbeta\metashaders/ 00018.216 INFO RENDERER: Metashader cache: 0 (0) cached shaders out of date 00019.134 ERROR DX11BACKEND: rendertarget "rtDynamicCloudMap" not found 00019.136 INFO EDTERRAINGRAPHICS3: edtg::CreateSurfaceRenderItem() 00019.263 INFO DCS: srRes = 422860543, srGoodValue = 422860543 skip 00019.284 ERROR EDOBJECTS: Destruction shape not found AVIASHTAB_CRASH 00019.286 INFO TERRAIN: lSystem::lSystem 00019.316 INFO EDCORE: (dDispatcher)enterToState_:1 00019.490 ERROR VFS: add_location {"My Missions", "C:\Users\Emrah\Saved Games\DCS.openbeta\Missions\"}: path already added as "My Missions" 00019.817 ERROR VFS: Can't mount './CoreMods/WWII Units/Liveries' to '/textures//liveries/'. 00019.818 ERROR VFS: add_location {"WWII Units", "./CoreMods/WWII Units/Missions/"}: path already added as "WWII Units" 00019.820 ERROR VFS: Can't mount './CoreMods/aircraft/Hawk/Textures/Avionics' to '/textures/'. 00019.826 ERROR VFS: add_location {"Combined Arms", "./Mods/tech/CombinedArms/Missions/de/"}: path already added as "Combined Arms" 00019.826 ERROR VFS: add_location {"A-10C", "./Mods/aircraft/A-10C/Missions/de/"}: path already added as "A-10C" 00019.826 ERROR VFS: add_location {"F-86F", "./Mods/aircraft/F-86/Missions/EN/"}: path already added as "F-86F" 00019.827 ERROR VFS: add_location {"Fw 190 D-9", "./Mods/aircraft/FW-190D9/Missions/de/"}: path already added as "Fw 190 D-9" 00019.827 ERROR VFS: add_location {"Flaming Cliffs", "./Mods/aircraft/Flaming Cliffs/Missions/de/"}: path already added as "Flaming Cliffs" 00019.828 ERROR VFS: Can't mount './Mods/aircraft/Hawk/Liveries' to '/textures//liveries/'. 00019.828 ERROR VFS: add_location {"Hawk", "./Mods/aircraft/Hawk/Missions/EN/"}: path already added as "Hawk" 00019.828 ERROR VFS: add_location {"Ka-50", "./Mods/aircraft/Ka-50/Missions/de/"}: path already added as "Ka-50" 00019.829 ERROR VFS: add_location {"MIG-21bis", "./Mods/aircraft/MIG-21bis/Missions/EN/"}: path already added as "MIG-21bis" 00019.829 ERROR VFS: add_location {"Mi-8MTV2", "./Mods/aircraft/Mi-8MTV2/Missions/EN/"}: path already added as "Mi-8MTV2" 00019.829 ERROR VFS: add_location {"P-51D", "./Mods/aircraft/P-51D/Missions/de/"}: path already added as "P-51D" 00019.830 ERROR VFS: add_location {"Su-25T", "./Mods/aircraft/Su-25T/Missions/de/"}: path already added as "Su-25T" 00019.830 ERROR VFS: add_location {"TF-51D", "./Mods/aircraft/TF-51D/Missions/EN/"}: path already added as "TF-51D" 00019.831 ERROR VFS: add_location {"UH-1H", "./Mods/aircraft/Uh-1H/Missions/de/"}: path already added as "UH-1H" 00019.959 ERROR DXGUI_EDGE_RENDER: Cannot load texture '' 00022.492 INFO DXGUI: Cannot load font [C:\Program Files\Eagle Dynamics\DCS World OpenBeta\dxgui\skins\fonts\]! 00024.201 ERROR DX11BACKEND: texture "dxgui/skins/skinme/images/setimage/button.png" not found 00024.428 INFO EDCORE: (dDispatcher)enterToState_:2 00024.525 INFO EDCORE: (dDispatcher)enterToState_:3 00024.851 INFO NET: Login success. 00029.075 INFO Dispatcher: loading mission file: "C:\Users\Emrah\AppData\Local\Temp\DCS.openbeta\tempMission.miz" 00029.421 INFO EDCORE: (dDispatcher)enterToState_:4 00029.443 INFO TERRAIN: lSystem::Init .\Bazar\Terrain\terrain.cfg.lua 00029.443 INFO EDTERRAINGRAPHICS3: edtg::Init() 00029.443 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_land.lua 00029.444 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_landheight.lua 00029.444 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_lights.lua 00029.445 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_map.lua 00029.446 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_mfd.lua 00029.446 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_shelf.lua 00029.447 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_landmask.lua 00029.447 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_grassheight.lua 00029.448 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_cascadshadows.lua 00029.448 INFO EDTERRAINGRAPHICS3: lma: .///Bazar/Graphics/lma/edge_radar.lua 00029.449 INFO EDTERRAIN: CreateTerraDispatch 00029.449 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 create 00029.449 INFO EDTERRAIN: SetTerraDispatch 00029.477 ERROR EDOBJECTS: SMOKE-POD already declared in shapes.txt SMOKE-POD already declared in shapes.txt UB-16-57UMP already declared in shapes.txt C-101_DESTR already declared in shapes.txt 00029.477 INFO WEAPONSBASE: srRes = 959731252, srGoodValue = 959731252 skip 00029.677 INFO wInfo: multiple adapters 00029.913 WARNING LOG: 1 duplicate message(s) skipped. 00029.913 INFO TERRAIN: lSystem::Load() 00029.915 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Init(file=.\Bazar\Terrain\terrain.cfg.lua, season=summer, quality=high, lang=de) 00029.918 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Init(landfile3) 00029.957 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Init(roads3) 00030.007 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Init(vfstextures) 00030.250 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Init(superficial3) 00030.331 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Init(map3) 00030.764 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Init(smallshit) 00030.767 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Init(scene3) 00030.768 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Init(districts) 00030.837 INFO EDOBJECTS: shape trees_1_blk not found in shapetables 00030.837 INFO EDOBJECTS: shape trees_3_blk not found in shapetables 00030.837 INFO EDOBJECTS: shape trees_5_blk not found in shapetables 00030.837 INFO EDOBJECTS: shape trees_6_blk not found in shapetables 00030.837 INFO EDOBJECTS: shape trees_7_blk not found in shapetables 00030.837 INFO EDOBJECTS: shape trees_8_blk not found in shapetables 00030.837 INFO EDOBJECTS: shape trees_9_blk not found in shapetables 00030.837 INFO EDOBJECTS: shape trees_2_blk not found in shapetables 00030.837 INFO EDOBJECTS: shape trees_4_blk not found in shapetables 00030.846 INFO EDTERRAINGRAPHICS3: edtg::InitTerrain() 00030.846 INFO TERRAIN: lSystem::InitSurface() 00030.862 INFO TERRAIN: lSystem::InitScenes() 00030.964 INFO DX11BACKEND: Reloading textures ... 00030.964 INFO DX11BACKEND: reloading texture "DummyWhiteTexture" 00030.970 INFO DX11BACKEND: reloading texture "/textures/posteffects/lensdirt.dds" 00030.974 INFO DX11BACKEND: reloading texture "/textures/posteffects/lensghost.dds" 00030.976 INFO DX11BACKEND: reloading texture "/textures/posteffects/lenssun.dds" 00030.978 INFO DX11BACKEND: reloading texture "/textures/posteffects/focus.png" 00031.076 INFO EDTERRAINGRAPHICS3: edtg::CreateSurfaceRenderItem() 00037.438 WARNING LOG: 12 duplicate message(s) skipped. 00037.438 INFO DCS: Dispatcher: initial random seed = 7849935 00037.438 INFO DCS: Dispatcher: apply random seed = 7849935 00037.440 INFO WORLDGENERAL: loaded from mission Scripts/World/GPS_GNSS.lua 00037.440 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Init(navigation) 00038.254 WARNING WRADIO: Can't create NDB "BS NDB_BELOSARAYSKAYA" beacon on the water! 00039.610 ERROR DX11BACKEND: texture "wic/normal_huge.png" not found 00039.612 INFO WORLDGENERAL: loaded from mission Config/View/SnapViewsDefault.lua 00039.613 INFO WORLDGENERAL: loaded from mission Config/View/View.lua 00039.614 INFO WORLDGENERAL: loaded from mission Config/View/Server.lua 00040.014 INFO Config: netview started 00043.441 WARNING NGMODEL: Model 'trees_1_blk' has invalid bounding box. 00043.443 WARNING NGMODEL: Model 'trees_3_blk' has invalid bounding box. 00043.451 WARNING NGMODEL: Model 'trees_5_blk' has invalid bounding box. 00043.452 WARNING NGMODEL: Model 'trees_6_blk' has invalid bounding box. 00043.456 WARNING NGMODEL: Model 'trees_7_blk' has invalid bounding box. 00043.477 WARNING NGMODEL: Model 'trees_8_blk' has invalid bounding box. 00043.478 WARNING NGMODEL: Model 'trees_9_blk' has invalid bounding box. 00043.614 WARNING NGMODEL: Model 'trees_2_blk' has invalid bounding box. 00043.616 WARNING NGMODEL: Model 'trees_4_blk' has invalid bounding box. 00043.697 INFO DCS: ComplexTask::open_state(). Precached tasks data loading. 00043.698 INFO DCS: ComplexTask::load_task_data(). "Follow_Line" task data loaded. 00043.699 INFO DCS: ComplexTask::load_task_data(). "Follow_Vector" task data loaded. 00043.699 INFO DCS: ComplexTask::load_task_data(). "Follow_Vector_Old" task data loaded. 00043.700 INFO DCS: ComplexTask::load_task_data(). "Approach" task data loaded. 00043.700 INFO DCS: ComplexTask::load_task_data(). "Cannon_Ground_Attack" task data loaded. 00043.701 INFO DCS: ComplexTask::load_task_data(). "Rocket_Attack" task data loaded. 00043.702 INFO DCS: ComplexTask::load_task_data(). "Level_Bombing" task data loaded. 00043.703 INFO DCS: ComplexTask::load_task_data(). "Dive_Bombing" task data loaded. 00043.705 INFO DCS: ComplexTask::load_task_data(). "Missile_Ground_Target_Attack" task data loaded. 00043.706 INFO DCS: ComplexTask::load_task_data(). "Missile_Ground_Target_Level_Attack" task data loaded. 00045.508 ERROR FLIGHT: Heliport "43" parameters are not consistent. Heliport was not created. 00045.508 ERROR FLIGHT: Heliport "44" parameters are not consistent. Heliport was not created. 00046.502 ERROR Lua::Config: Call error Sounder_create:Can't find sounder . 00046.602 WARNING LOG: 2 duplicate message(s) skipped. 00046.602 ERROR wInfo: can't open Objects[FARP] table 00046.602 ERROR DCS: unknown static shape_name, category , type: FARP 00046.602 ERROR wInfo: can't open Objects[FARP] table 00046.602 ERROR DCS: unknown static shape_name, category , type: FARP 00052.142 INFO DXRENDERER: Creating Resource "Unicode" of type 5 00052.148 ERROR Lua::Config: Call error Sounder_create:Can't find sounder . 00053.216 WARNING COCKPITBASE: Cockpit: MapObjectsBuffer . Specific element 24 not implemented, map may be incorrect 00054.656 WARNING LOG: 1 duplicate message(s) skipped. 00054.656 ERROR COCKPITBASE: Cockpit: Clickable - Wrong connector name PNT-BTN-RWR-UNK 00054.953 INFO COCKPITBASE: lua state still active MFCD_LEFT, 2 (status undefined) 00054.953 INFO COCKPITBASE: lua state still active MFCD_RIGHT, 3 (status undefined) 00054.954 INFO COCKPITBASE: lua state still active CDU, 9 (status undefined) 00054.958 INFO COCKPITBASE: lua state still active LITENING_INTERFACE, 11 (status undefined) 00054.958 INFO COCKPITBASE: lua state still active IFFCC, 12 (status undefined) 00054.958 INFO COCKPITBASE: lua state still active DSMS_INTERFACE, 13 (status undefined) 00054.958 INFO COCKPITBASE: lua state still active DATA_TRANSFER_SYSTEM, 14 (status undefined) 00054.959 INFO COCKPITBASE: lua state still active NAVIGATION_COMPUTER, 21 (status undefined) 00055.011 INFO COCKPITBASE: lua state still active PULSE_TIMER, 25 (status undefined) 00055.011 INFO COCKPITBASE: lua state still active TAD, 26 (status undefined) 00055.012 INFO COCKPITBASE: lua state still active SADL, 32 (status undefined) 00055.014 INFO COCKPITBASE: lua state still active CPT_MECH, 39 (status undefined) 00055.014 INFO COCKPITBASE: lua state still active OXYGEN_SYSTEM, 40 (status undefined) 00055.014 INFO COCKPITBASE: lua state still active ENVIRONMENT_SYSTEM, 41 (status undefined) 00055.015 INFO COCKPITBASE: lua state still active TACAN, 51 (status undefined) 00055.015 INFO COCKPITBASE: lua state still active STALL, 52 (status undefined) 00055.015 INFO COCKPITBASE: lua state still active ILS, 53 (status undefined) 00055.015 INFO COCKPITBASE: lua state still active UHF_RADIO, 54 00055.015 INFO COCKPITBASE: lua state still active VHF_AM_RADIO, 55 00055.015 INFO COCKPITBASE: lua state still active VHF_FM_RADIO, 56 00055.016 INFO COCKPITBASE: lua state still active INTERCOM, 58 (status undefined) 00055.016 INFO COCKPITBASE: lua state still active MACROS, 70 (status undefined) 00055.020 INFO DCS: dbox failed Initialize -7 00055.020 INFO WORLDGENERAL: loaded from mission Scripts/World/birds.lua 00055.768 INFO EDTERRAINGRAPHICS3: Force loading pipeline 'lockon'. Radius 150000.000000. Pos=-353136.843750,4998.842773,594886.687500! 00055.803 ERROR DX11BACKEND: texture "Land_L2_-25_29.png" not found 00055.817 ERROR DX11BACKEND: texture "Land_L2_-25_30.png" not found 00055.826 ERROR DX11BACKEND: texture "Land_L2_-25_31.png" not found 00055.901 ERROR DX11BACKEND: texture "Land_L2_-25_32.png" not found 00055.908 ERROR DX11BACKEND: texture "Land_L2_-25_33.png" not found 00057.618 ERROR EDTERRAINGRAPHICS3: Material: edgemat FxMaterial_Runway31 terrain/shaders31/Runway31.fx|FOG_ENABLE|LIGHT_TEXTURE airfield_asphalt_06.png airfield_asphalt_06_nm.png black.png black.png 0 00057.618 ERROR EDTERRAINGRAPHICS3: dont bind geometry edgelgeom 000000004E42AED8 00057.618 ERROR EDTERRAINGRAPHICS3: no T stream 00057.636 ERROR EDTERRAINGRAPHICS3: Material: edgemat FxMaterial_Runway31 terrain/shaders31/Runway31.fx|FOG_ENABLE|LIGHT_TEXTURE airfield_asphalt_06.png airfield_asphalt_06_nm.png black.png black.png 0 00057.636 ERROR EDTERRAINGRAPHICS3: dont bind geometry edgelgeom 000000004E42A6C8 00057.636 ERROR EDTERRAINGRAPHICS3: no T stream 00058.465 ERROR EDTERRAINGRAPHICS3: Material: Surface 16 00058.465 ERROR EDTERRAINGRAPHICS3: build material for Surface(Town) string edgemat FxMaterial_Surface31 terrain/shaders31/Surface31.fx|LIGHT_TEXTURE|CAUCASUS_NOISE|HEIGHT_AND_COLOR LOD= X= Z= ADDBOUNDPIX= colorTexture= autoTexture= landNoiseTex=Noise_1.bmp mountainNoiseTex=Noise_mount.bmp detailNoiseTex=noise_small.bmp reason: "param addBoundPix not found" 00058.816 INFO EDTERRAINGRAPHICS3: force loading finished! 00058.816 INFO EDTERRAINGRAPHICS3: Force loading pipeline 'map'. Radius 30000.000000. Pos=-353136.843750,4998.842773,594886.687500! 00058.932 INFO EDTERRAINGRAPHICS3: force loading finished! 00059.354 INFO EDTERRAINGRAPHICS3: edtg::SH::initRenderItems() 00059.377 INFO EDTERRAINGRAPHICS3: edtg::CreateSurfaceRenderItem() 00062.083 ERROR Trigger: can't execute trigger, err:"[string "?"]:1: bad argument #1 to 'loadstring' (string expected, got function)" 00069.818 WARNING LOG: 1 duplicate message(s) skipped. 00069.818 ERROR SOUND: invalid source_params(MeteoDispatcher/main:rain): gain 00069.818 ERROR SOUND: invalid source_params(MeteoDispatcher/rainDropsCpt:raindropsin): gain 00069.818 ERROR SOUND: invalid source_params(MeteoDispatcher/main:raindrops): gain 00631.302 INFO EDTERRAINGRAPHICS3: edtg::DeleteSurfaceRenderItem() 00631.415 WARNING LOG: 12 duplicate message(s) skipped. 00631.415 INFO Config: netview stopped 00631.542 INFO EDCORE: (dDispatcher)enterToState_:3 00631.557 INFO TERRAIN: lSystem::Load() 00631.557 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Exit(vfstextures) 00631.557 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Init(file=.\Bazar\Terrain\terrain.cfg.lua, season=summer, quality=high, lang=english) 00631.560 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Init(vfstextures) 00631.712 INFO DX11BACKEND: Reloading textures ... 00632.135 INFO DX11BACKEND: reloading texture "DummyWhiteILSTexture" 00632.142 INFO TERRAIN: lSystem::InitSurface() 00632.201 INFO TERRAIN: lSystem::InitScenes() 00652.058 INFO EDCORE: (dDispatcher)enterToState_:5 00652.319 INFO SOUND: detaching sdef path ".\mods\aircraft\uh-1h\sounds\sdef\" 00652.319 INFO SOUND: detaching sdef path ".\mods\aircraft\tf-51d\sounds\sdef\" 00652.319 INFO SOUND: detaching sdef path ".\mods\aircraft\p-51d\sounds\sdef\" 00652.319 INFO SOUND: detaching sdef path ".\mods\aircraft\mi-8mtv2\sounds\sdef\" 00652.319 INFO SOUND: detaching sdef path ".\mods\aircraft\mig-21bis\sounds\sdef\" 00652.319 INFO SOUND: detaching sdef path ".\mods\aircraft\ka-50\sounds\sdef\" 00652.319 INFO SOUND: detaching sdef path ".\mods\aircraft\hawk\sounds\sdef\" 00652.319 INFO SOUND: detaching sdef path ".\mods\aircraft\flaming cliffs\sounds\sdef\" 00652.319 INFO SOUND: detaching sdef path ".\mods\aircraft\fw-190d9\sounds\sdef\" 00652.319 INFO SOUND: detaching sdef path ".\mods\aircraft\f-86\sounds\sdef\" 00652.319 INFO SOUND: detaching sdef path ".\mods\aircraft\a-10c\sounds\sdef\" 00652.319 INFO SOUND: detaching sdef path ".\mods\tech\combinedarms\sounds\sdef\" 00652.319 INFO SOUND: detaching sdef path ".\coremods\aircraft\mig-21bis\sounds\sdef\" 00652.319 INFO SOUND: detaching sdef path "sounds\sdef\" 00652.354 INFO TERRAIN: lSystem::Exit() 00652.354 INFO TERRAIN: lSystem::CleanScenes() 00652.354 INFO EDTERRAINGRAPHICS3: edtg::Exit() 00652.383 INFO EDTERRAIN: DeleteTerraDispatch 00652.405 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 Exit(vfstextures) 00652.434 INFO EDTERRAIN: TerraDispatch 000000003747FCB0 destroy 00652.803 INFO EDTERRAINGRAPHICS3: edtg::DeleteSurfaceRenderItem() 00652.967 WARNING LOG: 1 duplicate message(s) skipped. 00652.967 INFO EDTERRAINGRAPHICS3: edtg::Exit() === Log closed. Beim connect-serial-port was ich auf TCP um geschrieben habe war die selbe Reaktion. Output "ja" Imput "nein". Nach jeder Betätigung des Tasters steht im socat: geht dann immer so weiter bloß das sich halt da und wo Datum und Uhrzeit sich ändern. DCS kann Daten an Arduino Senden, dass seh ich am blinkenden LED. Das Sende vom Tastersignal geht anscheinend auch wenn ich mir das socat Fenster anschau. Aber im Spiel passiert da nichts. Pinbelegungen passen alle. Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
FSFIan Posted November 21, 2015 Author Share Posted November 21, 2015 Der Arduino-Sketch tut was er soll und die Kommunikation über den seriellen Port tut auch. DCS-BIOS läuft auch ohne Fehlermeldungen. Die einzige plausible Erklärung, die ich noch habe, ist eine seltsam konfigurierte Firewall, die das Paket zwischen socat und DCS abfängt, ohne socat am Senden oder DCS am öffnen des Ports zu hindern. Welches Firewall / Antivirus-Produkt benutzt du und hast du das mal testweise abgeschaltet? DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
33rd_Elvis Posted November 21, 2015 Share Posted November 21, 2015 Du hast Recht Ian DCS BIOS hat richtig Funktioniert. Ich habe den verursacher des problems gefunden. Auf mein System war Netgear Genie drauf, ist auch so was wie ein Netzwerkprogramm. Hab es deinstalliert, jetzt läuft die Comunikation zwschen DCS BIOS und Arduino. Noch mal vielen Danke für dein Einsatz.:thumbup::thumbup::thumbup: Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
33rd_Elvis Posted November 22, 2015 Share Posted November 22, 2015 Man löst ein Problem, dann kommt schon das nächst. Hab mir ein Arduino Mega 2560 gekauft und ein Multipanel gebaut. Alles verkabelt und zusammen gelötet. Noch den Sketch zusammen gestellt und auf das Board hochgeladen. Ich Spiel gesteste und es Funktioniert nicht ein Encoder oder Schalter. Eine abgemagerte Form vom Sketch auf das UNO Board geladen und es geht aber auf dem Mega nicht obwohl alles im Arduino Programm alles richtig ein gestellt ist. Hier der Sketch für das Mega Board. #include <DcsBios.h> #include <Servo.h> #include <Wire.h> #include <LCD.h> #include <LiquidCrystal_I2C.h> #define I2C_ADDR 0x27 // <<----- Add your address here. Find it from I2C Scanner #define BACKLIGHT_PIN 3 #define En_pin 2 #define Rw_pin 1 #define Rs_pin 0 #define D4_pin 4 #define D5_pin 5 #define D6_pin 6 #define D7_pin 7 int n = 1; /**** Note that you can only add outputs (LEDs, etc) to the Arduino running this sketch. Inputs will not work. ****/ LiquidCrystal_I2C lcd(0x27,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin); /**** Make your changes after this line ****/ void onTacanChannelChange(char* newValue) { lcd.setCursor(7, 0); lcd.print(newValue); } DcsBios::StringBuffer<4> tacanChannelBuffer(0x1162, onTacanChannelChange); void onUhfFrequencyChange(char* newValue) { lcd.setCursor(7, 1); lcd.print(newValue); } DcsBios::StringBuffer<7> uhfFrequencyBuffer(0x1180, onUhfFrequencyChange); DcsBios::RotaryEncoder vhffmFreq1("VHFFM_FREQ1", "DEC", "INC", 32, 33); DcsBios::RotaryEncoder vhffmFreq2("VHFFM_FREQ2", "DEC", "INC", 35, 36); DcsBios::RotaryEncoder vhffmFreq3("VHFFM_FREQ3", "DEC", "INC", 38, 39); DcsBios::RotaryEncoder vhffmFreq4("VHFFM_FREQ4", "DEC", "INC", 41, 42); DcsBios::RotaryEncoder hsiCrsKnob("HSI_CRS_KNOB", "-3200", "+3200", A4, A5); DcsBios::RotaryEncoder hsiHdgKnob("HSI_HDG_KNOB", "-3200", "+3200", A1, A2); DcsBios::RotaryEncoder ilsMhz("ILS_MHZ", "DEC", "INC", 9, 10); DcsBios::RotaryEncoder ilsKhz("ILS_KHZ", "DEC", "INC", 12, 13); DcsBios::Switch2Pos ilsPwr("ILS_PWR", 15); DcsBios::RotaryEncoder tacan1("TACAN_1", "DEC", "INC", 2, 3); DcsBios::RotaryEncoder tacan10("TACAN_10", "DEC", "INC", 5, 6); DcsBios::Switch2Pos tacanTestBtn("TACAN_TEST_BTN", 4); DcsBios::Potentiometer tacanVol("TACAN_VOL", A0); DcsBios::Switch2Pos tacanXy("TACAN_XY", 7); DcsBios::Switch2Pos eppAcGenPwrL("EPP_AC_GEN_PWR_L", 20); DcsBios::Switch2Pos eppAcGenPwrR("EPP_AC_GEN_PWR_R", 21); DcsBios::Switch2Pos eppApuGenPwr("EPP_APU_GEN_PWR", 22); DcsBios::Switch2Pos eppBatteryPwr("EPP_BATTERY_PWR", 16); DcsBios::Switch2Pos fscpBoostMainL("FSCP_BOOST_MAIN_L", 23); DcsBios::Switch2Pos fscpBoostMainR("FSCP_BOOST_MAIN_R", 24); DcsBios::Switch2Pos fscpBoostWingL("FSCP_BOOST_WING_L", 25); DcsBios::Switch2Pos fscpBoostWingR("FSCP_BOOST_WING_R", 26); DcsBios::Switch2Pos fscpExtTanksFus("FSCP_EXT_TANKS_FUS", 27); DcsBios::Switch2Pos fscpExtTanksWing("FSCP_EXT_TANKS_WING", 28); /**** In most cases, you do not have to change anything below this line ****/ /* Instantiate a ProtocolParser object to parse the DCS-BIOS export stream */ DcsBios::ProtocolParser parser; void setup() { Serial.begin(500000); Wire.begin(8); Wire.onReceive(onI2CReceive);{0x27; lcd.begin(16,2); // <<----- My LCD was 16x2 lcd.home(); lcd.print("TACAN"); lcd.setCursor(0, 1); lcd.print("UHF"); lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE); lcd.setBacklight(HIGH); } } void onI2CReceive(int num_bytes) { while (Wire.available()) { Serial.write(Wire.read()); } } /* Your main loop needs to pass data from the DCS-BIOS export stream to the parser object you instantiated above. */ void loop() { // feed incoming data to the parser while (Serial.available()) { parser.processChar(Serial.read()); } // don't bother polling inputs // because we don't support them in this sketch // anyway (see sendDcsBiosMessage()). } /* You need to define void sendDcsBiosMessage(const char* msg, const char* arg) so that the string msg, followed by a space, the string arg and a newline gets sent to the DCS-BIOS import stream. In this example we send it to the serial port, so you need to run socat to read the data from the serial port and send it over UDP to DCS-BIOS. If you are using an Ethernet Shield, you would probably want to send a UDP packet from this subroutine. */ void sendDcsBiosMessage(const char* msg, const char* arg) { // we refuse to send anything, because any transmission // attempt could be interrupted by a message from the // I2C bus, which would corrupt both messages. // This means the Arduino running this sketch can // only be used for outputs, not inputs. } /* This subroutine gets called every time a message is received from the export stream (you need to define it even if it does nothing). Use this to handle outputs which are not covered by the DcsBios Arduino library (e.g. displays). */ void onDcsBiosWrite(unsigned int address, unsigned int value) { } Was läuft denn da schon wieder schief. :(:( Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
FSFIan Posted November 22, 2015 Author Share Posted November 22, 2015 /**** Note that you can only add outputs (LEDs, etc) to the Arduino running this sketch. Inputs will not work. ****/ An den I2C-Master kannst du keine Eingabegeräte anschließen. Wenn die auf dem Uno mit dem gleichen Sketch funktioniert haben, würde mich das sehr wundern. Das I2C-Beispiel hab ich damals relativ schnell zusammengefrickelt, weil die Frage, wie man denn nun mehrere Boards gleichzeitig verwenden kann, so oft kam. I2C ist allerdings nur für kurze Distanzen gedacht, deshalb arbeite ich an dem Code auch nicht mehr weiter, sondern bin dabei, Kommunikation über einen RS-485-Bus zu implementieren. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
33rd_Elvis Posted November 29, 2015 Share Posted November 29, 2015 hi leute, Ian wie müsste denn der Code ausschauen wenn ich die 7 Segement Anzeigen ohne einen Shiftregister betreiben würde? Also die 7 Segement Anzeige direkt über die Digitalpins. z.B. beim VHF Panel: Output Type: string Address: 0x119a Max. Length: 2 Description: possible values: " 3" " 4" " 5" " 6" " 7" " 8" " 9" "10" "11" "12" "13" "14" "15" void onVhffmFreq1Change(char* newValue) { /* your code here */ } DcsBios::StringBuffer<2> vhffmFreq1StrBuffer(0x119a, onVhffmFreq1Change); Mfg Emrah Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
33rd_Elvis Posted December 6, 2015 Share Posted December 6, 2015 Nach Tage langen suchen im Netz hab ich ein Sketch gefunden: #include <DcsBios.h> #include <Servo.h> #include <LedControl.h> /* SET BAUD RATE IN CONNECT-SERIAL-PORT.CMD TO 115000 (OR WHATEVER YOU SET IN: void setup() Serial.begin(YOUR BAUD RATE HERE)) */ LedControl lc=LedControl(12,11,10,1); /* we always wait a bit between updates of the display */ unsigned long delaytime=250; /**** Make your changes after this line ****/ //String inString = ""; void onVhfamFreq1Change(char* newValue) { for(int i=0;i<2;i++) { lc.setChar(0,i,newValue,false); } } DcsBios::StringBuffer<2> vhfamFreq1StrBuffer(0x1190, onVhfamFreq1Change); void onVhfamFreq4Change(char* newValue) { for(int i=0;i<2;i++) { lc.setChar(0,i+4,newValue,false); } } DcsBios::StringBuffer<2> vhfamFreq4StrBuffer(0x1192, onVhfamFreq4Change); /**** In most cases, you do not have to change anything below this line ****/ /* Instantiate a ProtocolParser object to parse the DCS-BIOS export stream */ DcsBios::ProtocolParser parser; void setup() { Serial.begin(115000); /* The MAX72XX is in power-saving mode on startup, we have to do a wakeup call */ lc.shutdown(0,false); /* Set the brightness to a medium values */ lc.setIntensity(0,1); /* and clear the display */ lc.clearDisplay(0); } /* Your main loop needs to pass data from the DCS-BIOS export stream to the parser object you instantiated above. It also needs to call DcsBios::PollingInput::pollInputs() to detect changes in the state of connected controls and pass them on to DCS. */ void loop() { // feed incoming data to the parser while (Serial.available()) { parser.processChar(Serial.read()); } // poll inputs DcsBios::PollingInput::pollInputs(); } /* You need to define void sendDcsBiosMessage(const char* msg, const char* arg) so that the string msg, followed by a space, the string arg and a newline gets sent to the DCS-BIOS import stream. In this example we send it to the serial port, so you need to run socat to read the data from the serial port and send it over UDP to DCS-BIOS. If you are using an Ethernet Shield, you would probably want to send a UDP packet from this subroutine. */ void sendDcsBiosMessage(const char* msg, const char* arg) { Serial.write(msg); Serial.write(' '); Serial.write(arg); Serial.write('\n'); } /* This subroutine gets called every time a message is received from the export stream (you need to define it even if it does nothing). Use this to handle outputs which are not covered by the DcsBios Arduino library (e.g. displays). */ void onDcsBiosWrite(unsigned int address, unsigned int value) { if (address == 0x118e) { unsigned int vhfamFreq2Value = (value & 0x00f0) >> 4; lc.setChar(0,2,vhfamFreq2Value,true); } if (address == 0x118e) { unsigned int vhfamFreq3Value = (value & 0x0f00) >> 8; lc.setChar(0,3,vhfamFreq3Value,false); } } Ich würde gerne verstehen was das " for(int i=0;i<2;i++) { lc.setChar(0,i,newValue,false);" heißen soll? Hab es gesteste und es Funktionert auch BLOß die Ziffern werden auf meinem LED Display Spiegelverkehrt angezeigt. MFG Emrah Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
FSFIan Posted December 6, 2015 Author Share Posted December 6, 2015 Ich würde gerne verstehen was das " for(int i=0;i<2;i++) { lc.setChar(0,i,newValue,false);" heißen soll? Hab es gesteste und es Funktionert auch BLOß die Ziffern werden auf meinem LED Display Spiegelverkehrt angezeigt. Wenn dein Display das ganze spiegelverkehrt anzeigt, ist es vielleicht einfach anders verdrahtet, als die LedControl-Library es erwartet. (Meinst du eigentlich spiegelverkehrt, also "ES" statt "32", oder rückwärts, also "23" statt "32"?) Hier ist mal eine Liste von Konzepten, die man braucht, um den Code zu verstehen: C++-Kontrollstrukturen (for-Schleife) Arrays, Repräsentation von Strings als nullterminierte Character-Arrays was lc.setChar() macht, steht in der Dokumentation der LedControl-Arduino-Library Deine Frage hat eigentlich nichts mit DCS-BIOS an sich zu tun, es läuft eher auf "kannst du mir C++ erklären" heraus. Dazu existieren bereits viele kostenlose Ressourcen, die besser sind, als alles, was ich je schreiben könnte. Eine Google-Suche nach "Einführung in C++" bringt schon einige Treffer. Manche Unis stellen ihre Vorlesungsfolien online, es gibt Bücher, die sich auf den Arduino spezialisieren, etc. Wenn du eine Frage hast, die spezifisch genug ist, dass ich die Antwort dazu in ein paar Minuten aufschreiben kann, dann helfe ich dir gerne, aber wenn die Frage so allgemein ist, dass ich ein halbes C++-Tutorial als Antwort schreiben müsste, fehlt mir einfach die Zeit dazu. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
33rd_Elvis Posted December 7, 2015 Share Posted December 7, 2015 (edited) Spiegelkehrt in dem Sinne z.b. VHF AM 124.075 statt wie es da steht von links nach recht ist die Frequens von rechts nach links also 5704.21 und der Punkt sitzt auch verkehrt. Jetzt ist meine Frage ob man den Sketch so Umschreiben kann das es wieder passt oder ob ich die Platine zerlegen muss und so um Löten das es irgend wie wieder geht? edit: ich vermute das es an der Platine liegt und nicht am Sketch. Mfg Emrah Edited December 7, 2015 by 33rd_Elvis Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
FSFIan Posted December 7, 2015 Author Share Posted December 7, 2015 Der Sketch nimmt an, dass die Ziffern von links nach rechts durchnummeriert sind. Deine Platine nummeriert die aber von rechts nach links (d.h. "digit 0" ist ganz rechts). Da musst du nicht an der Platine rumlöten, du musst nur den Sketch so anpassen, dass er die richtige Ziffer an die richtige Stelle schreibt. Anhand der LedControl-Dokumentation (der Abschnitt über "setChar()") kannst du nachvollziehen, warum der folgende Befehl das zweite Zeichen aus dem String "newValue" an die vierte Stelle von rechts auf deiner Anzeige setzen würde: lc.setChar(0,3,newValue[1],false); Dann sollte auch klar sein, wie du den Code anpassen musst (und wie du den Dezimalpunkt an die richtige Stelle setzt). DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
33rd_Elvis Posted December 8, 2015 Share Posted December 8, 2015 So den Code habe ich jetzt verändert: #include <DcsBios.h> #include <Servo.h> #include <LedControl.h> /* SET BAUD RATE IN CONNECT-SERIAL-PORT.CMD TO 115000 (OR WHATEVER YOU SET IN: void setup() Serial.begin(YOUR BAUD RATE HERE)) */ LedControl lc=LedControl(12,11,10,1); /* we always wait a bit between updates of the display */ unsigned long delaytime=250; /**** Make your changes after this line ****/ //String inString = ""; void onVhfamFreq1Change(char* newValue) { for(int i=0;i<2;i++) { lc.setChar(0,4,newValue[1],false); } } DcsBios::StringBuffer<2> vhfamFreq1StrBuffer(0x1190, onVhfamFreq1Change); void onVhfamFreq4Change(char* newValue) { for(int i=0;i<2;i++) { lc.setChar(0,0,newValue[1],false); } } DcsBios::StringBuffer<2> vhfamFreq4StrBuffer(0x1192, onVhfamFreq4Change); /**** In most cases, you do not have to change anything below this line ****/ /* Instantiate a ProtocolParser object to parse the DCS-BIOS export stream */ DcsBios:[img=http://forums.eagle.ru/images/smilies/tongue.gif]rotocolParser parser; void setup() { Serial.begin(115000); /* The MAX72XX is in power-saving mode on startup, we have to do a wakeup call */ lc.shutdown(0,false); /* Set the brightness to a medium values */ lc.setIntensity(0,1); /* and clear the display */ lc.clearDisplay(0); } /* Your main loop needs to pass data from the DCS-BIOS export stream to the parser object you instantiated above. It also needs to call DcsBios:[img=http://forums.eagle.ru/images/smilies/tongue.gif]ollingInput::pollInputs() to detect changes in the state of connected controls and pass them on to DCS. */ void loop() { // feed incoming data to the parser while (Serial.available()) { parser.processChar(Serial.read()); } // poll inputs DcsBios:[img=http://forums.eagle.ru/images/smilies/tongue.gif]ollingInput::pollInputs(); } /* You need to define void sendDcsBiosMessage(const char* msg, const char* arg) so that the string msg, followed by a space, the string arg and a newline gets sent to the DCS-BIOS import stream. In this example we send it to the serial port, so you need to run socat to read the data from the serial port and send it over UDP to DCS-BIOS. If you are using an Ethernet Shield, you would probably want to send a UDP packet from this subroutine. */ void sendDcsBiosMessage(const char* msg, const char* arg) { Serial.write(msg); Serial.write(' '); Serial.write(arg); Serial.write('\n'); } /* This subroutine gets called every time a message is received from the export stream (you need to define it even if it does nothing). Use this to handle outputs which are not covered by the DcsBios Arduino library (e.g. displays). */ void onDcsBiosWrite(unsigned int address, unsigned int value) { if (address == 0x118e) { unsigned int vhfamFreq2Value = (value & 0x00f0) >> 4; lc.setChar(0,3,vhfamFreq2Value,true); } if (address == 0x118e) { unsigned int vhfamFreq3Value = (value & 0x0f00) >> 8; lc.setChar(0,2,vhfamFreq3Value,false); } }Nun ist ein neues Problem auf getaucht. Die Reinfolge der Ziffern Pássen jetzt ABER sieht wie folgt aus " 22.7 0 " die sollte aber " 122.770 "sein. Habs auch mit dem Code: if (address == 0x118e) { unsigned int vhfamFreq1IntValue = (value & 0x000f) >> 0; /* your code here */ } versucht ,weil ich davon aus ging das man da die fehlende Ziffer ergänzen konnte. Leider vergebens. Bitte um Rat. Mfg Emrah Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
FSFIan Posted December 9, 2015 Author Share Posted December 9, 2015 Du schreibst die fehlenden Zahlen nie auf das Display. Guck dir nochmal an, was eine for-Schleife macht. Wenn du die for-Schleifen weiter behalten willst, dann musst du auch die Laufvariable i für die Position verwenden und die Schleife so anpassen, dass der Zähler über die richtigen Werte läuft. Alternativ kannst du die Schleifen entfernen und für jede Stelle einen eigenen lc.setChar()-Aufruf einfügen. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
33rd_Elvis Posted December 9, 2015 Share Posted December 9, 2015 (edited) Wie ich die Ziffern positioniere weiß ich mittlerweile :-) es geht mir um die Zahlen von diesen Codes: void onVhfamFreq1Change(char* newValue) { for(int i=0;i<2;i++) { lc.setChar(0,i,newValue,false); } } DcsBios::StringBuffer<2> vhfamFreq1StrBuffer(0x1190, onVhfamFreq1Change); void onVhfamFreq4Change(char* newValue) { for(int i=0;i<2;i++) { lc.setChar(0,i+4,newValue,false); } } DcsBios::StringBuffer<2> vhfamFreq4StrBuffer(0x1192, onVhfamFreq4Change);Denn Diese beiden Zahlenkombinationon kommen verdreht raus " 21 statt 12 " und " 57 statt 75 ". Dann bin ich mal in die LedControll.cpp gegangen und habe mir diese Zeilen mal angeschaut: void LedControl::setChar(int addr, int digit, char value, boolean dp) { int offset; byte index,v; if(addr<0 || addr>=maxDevices) return; if(digit<0 || digit>7) return; offset=addr*8; index=(byte)value; if(index >127) { //no defined beyond index 127, so we use the space char index=32; } v=pgm_read_byte_near(charTable + index); if(dp) v|=B10000000; status[offset+digit]=v; spiTransfer(addr, digit+1,v); }Die rot Markierte Stelle habe ich mal verstauscht und das Led Display blieb dunkel. Ich bin jetzt nicht der Arduino Programmierprofi. Kannst du mir nicht kurz und knapp sagen was ich verändern muss? edit;LedControl::LedControl(int dataPin, int clkPin, int csPin, int numDevices) { SPI_MOSI=dataPin; SPI_CLK=clkPin; SPI_CS=csPin; if(numDevices<=0 || numDevices>8 ) numDevices=8; maxDevices=numDevices; pinMode(SPI_MOSI,OUTPUT); pinMode(SPI_CLK,OUTPUT); pinMode(SPI_CS,OUTPUT); digitalWrite(SPI_CS,HIGH); SPI_MOSI=dataPin; for(int i=0;i<64;i++) status=0x00; for(int i=0;i<maxDevices;i++) { spiTransfer(i,OP_DISPLAYTEST,0); //scanlimit is set to max on startup setScanLimit(i,7); //decode is done in source spiTransfer(i,OP_DECODEMODE,0); clearDisplay(i); //we go into shutdown-mode on startup shutdown(i,true); }Hier hab ich auch schon rumprobiert. Wenn ich hier was verändere bleit das Display auch dunkel. Edited December 9, 2015 by 33rd_Elvis Aircrafts: F-16C | TF-51 | M2000C | F/A-18C | AV-8B | Viggen | KA-50 | A-10C | UH-1 | Mi-8 | Maps: Caucasus | Persian Gulf | NTTR | Normandy | Syria System: AMD Ryzen 3700X | 32GB Ram | AMD Radeon RX 5700 XT | Win10 64Bit | 1TB 970 EVO M.2 SSD Equipment: TrackIR 5_Trackclip Pro |TM Warthog HOTAS | Oculus Rift S Link to comment Share on other sites More sharing options...
Recommended Posts