

overpro
Members-
Posts
158 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by overpro
-
Teensy 2.0 ,3.0 and Arduino tutorials for joystick creation?
overpro replied to Stevos758's topic in Home Cockpits
Hi Peter, please check this thread, http://forums.eagle.ru/showthread.php?t=117011 -
an Arduino USB HID controller, composite USB controller
overpro replied to overpro's topic in Home Cockpits
Known issue: Issue#1 ( Fixed ): after several hours, the button ID might drift to a new position, for example, the button 1 press might be changed to button 57 press. I'm still investigating the issue, it might be caused by the RingBuffer manipulation in the USB firmware. update: if Computer sleep (STR) and resume, the button id will drift. update: Submitted a fix on github and updated the compiled .hex file in the main post. Issue#2 (Fixed on 2013-Nov-29 ) With the controller attached, the computer will be blocked at POST, unless unplug it then computer will continue to boot: The fix: The HID report will send to host only if the button status changed or the defined idle time has elapsed. Issue #3 (Fixed on 2013-Nov-28 ) The Row8 ( digital pin 29) key scan code has an issue. It's a bug in arduino sketch. https://github.com/calltherain/ArduinoUSBJoystick/blob/e091929ceb7bc5b7a2c39cb4fb719003b74b1e05/arduino/CVP_JoystickController/CVP_JoystickController.ino Now fixed. -
This is an arduino Mega2560R3 based USB joystick controller, I have successfully made it as a composite USB device , that means one arduino = two usb joystick controller, the reason to do this is DCSW only recognize 128 keys per USB joystick controller. If we have 2 then there will be 256 keys program your Mega2560 download Arduino IDE from arduino.cc and download the arduino sketch from here: https://github.com/calltherain/ArduinoUSBJoystick/tree/master/arduinoopen the .ino file in Arduino IDE and upload it to your mega2560. program the USB firmware The 2nd step is to program the USB firmware, you need to use Atmel Flip: http://www.atmel.com/tools/FLIP.aspx Download and install flip, you need to make your Mega2560 enter DFU mode: with your mega2560 plugged, just simply shortcut the 2 pins momentarily at here: Windows will recognize it as a new device, and you need to manually install the driver by using this file: C:\Program Files (x86)\Atmel\Flip 3.4.7\usb\atmel_usb_dfu.inf After the driver is installed, run Flip and select the chip type: ATmega16u2 then Open the USB port ( ctrl + u, click OPEN ) and load the usb controller firmware, see attached cvpJoystick YYYY-MMM-DD.zip file. ====1HID with 256 buttons is also available==== If you want a single joystick with 256 buttons please use this firmware instead. http://forums.eagle.ru/showpost.php?p=2522938&postcount=142 But note that most of the Flight sims doesn't support such a joystick. FSUIPC is the only one which has been confirmed works good for now. ---------------------------------------------------------------- Click "RUN" button at the lower left corner and it only takes 1 second to program the chip. Unplug and replug your mega2560 and you are good to go. If you want to make it back to a normal Mega2560 then repeat the above step but load the original mega2560 USBSerial firmware from here: https://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/atmegaxxu2/arduino-usbserial Arduino-usbserial-atmega16u2-Mega2560-Rev3.hex Pin config on Mega2560 Pin 22~37 are row pins and 38~53 are column pins, you might need to build a keyboard matrix by your self, Row 0~3( pin 22,23,24,25) is reserved for rotary encoder, you need to wire the common pin of the rotary encoder to mega2560 22~25, and wire the A, B pin on the encoder to 0,1 or 2,3 or 4,5 ..... column pins ( mega2560 38,39 or 40,41 ..... ) Known Issue The firmware might have some issue and if you encounter any problem please provide your comments on github or at this thread. github.com/calltherain/ArduinoUSBJoystick http://forums.eagle.ru/showpost.php?p=1934885&postcount=5 If you want to build the firmware by yourself you need a Linux machine. License The code is released to Public Domain Source Code https://github.com/calltherain/ArduinoUSBJoystick I hope you enjoy it. ps. this firmware is inspired by Darran's project: Arduino UNO Big joystick HID firmware: http://hunt.net.nz/users/darran/weblog/15f92/ with out Darran's code I will never make this work. Thanks Darran. --------------------------------- Firmware compilation instruction --------------------------------- This is a simple instruction to guide you compile the firmware in ubuntu. 1. Make sure you have these packages installed on Ubuntu build-essential avr-libc c-compiler make you can use this command to install these packages: sudo apt-get install avr-libc c-compiler make build-essential 2. download the firmware source code from github cd ~ git clone https://github.com/calltherain/ArduinoUSBJoystick.git 3. download LUFA library cd ~/ArduinoUSBJoystick wget https://lufa-lib.googlecode.com/files/LUFA-130901.zip unzip LUFA-130901.zip -d LUFA 4. by the end of step 3, you should get a folder structure like this: now go to /ArduinoUSBJoystick/firmware/cvpJoystickTest/ and execute make the compiled binary is cvpJoystick.hex, you can use FLIP to flash it into your Mega2560's atmega16u2 chip under it's DFU mode. --------------------------------------------- Flash the original firmware to your Atmega16u2 --------------------------------------------- If you are unable to go to DFU mode it's possible that the firmware within your Atmega16u2 doesn't have a proper bootloader code within bootloader section in the flash. You will need an USB ISP programmer to flash a correct firmware. I attached a working version firmware (atmega16u2.zip) which includes a proper bootloader here just incase you can't find one. connect your USB ISP programmer to the atmega16u2 ISP pins, you might need some Dupont Line to do this. There are many ISP programmer software available out there, I personally use Progisp.exe, downlod atmega16u2.zip and extract it to .hex file, load it into progisp.exe and flash it, all done. cvpJoystick 2013-Nov-29.zip atmega16u2.zip
-
Teensy 2.0 ,3.0 and Arduino tutorials for joystick creation?
overpro replied to Stevos758's topic in Home Cockpits
well, I will post the USB device class driver and arduino code to github first, because it seems that our country's firewall is relatively friendly with github then google. -
Teensy 2.0 ,3.0 and Arduino tutorials for joystick creation?
overpro replied to Stevos758's topic in Home Cockpits
I had a try and it works good, I changed the button number from 40 to 248, the arduino mega 2560r3 pin 22~53 are used as a 16*16 keyboard matrix. DCSW seems only recognize the first 128 buttons, I'm not sure if it's due to the USB HID Descriptor or the limitation in DCSW. And in XPlane, it seems recognized 150~160 buttons. I didn't count it precisely. And I'm working on the arduino code to support rotaryEncoder and On-Off-On toggle switch. Here is a small test on the rotary switch: If anyone has the interesting to have a try I can post the updated Darran's firmware as well as my arduino code to somewhere, maybe Github, I guess? -
it's stepper motor from VIDMotion: http://www.vidmotion.com/product.aspx?sortid=22 VID motion provides driver IC for their stepper motor: http://www.vidmotion.com/product.aspx?sortid=24 VID stepper motor is tailored for gauge.
-
Thanks Deadman, regarding "tubes", is it some sort of light bulb? Sorry my english is not good.
-
Design the PCB and build the driver board and soldering the ICs and wires is a really heavy load work, very tedious.:joystick: In order to build the driver board PCB I even purchased a laser printer. But at least it finally works.
-
Yet Another CMSP character recognition application
overpro replied to overpro's topic in Home Cockpits
Yes, I'm using arduino with an ethernet shield, through UDP. -
Yet Another CMSP character recognition application
overpro replied to overpro's topic in Home Cockpits
Added a video demo in the top floor. -
license: MIT source code: https://github.com/calltherain/DCSW_GetCMSP usage: 1. compile it under vs.net 2012 pro in RELEASE config and execute it. 2. I'm STRONGLY RECOMMEND use icemaker 's Easy Monitor Configurator set CMSP/CMSC window size and position, don't make it too small or this app will not work as expected, you can use this value( CMSP 343x75, CMSC: 331x98 ) 3. Start this application and set the CMSP/CMSC X,Y, W, H accordingly, IMPORTANT: If the monitor setting for the CMSC Y value is 100 for example, please enter 98 ( decrease 2 pixel ) for CMSC-Y in this application. I haven't figure out why the CMSC export has 2 pixel vertical offset. 4. By default, this app will send the string to specified IP:port through UDP, if you want a serial port implementation please do it by yourself. known issues: please report bug in this thread or at github. the code is not pretty, sorry. side note: First of all, I have no experience on pattern recognition, I thought this is the application that would be very difficult to write. But I do have the interesting on this topic, and after reading some articles I decided to have a try. Attached is the screen shot, not too bad. Because the CMSP characters are very "normalized", there is no need to filter the noise or rotate characters to the normalized form. I used some time to tune the parameters to make the result correct. The CPU utilization is around 5%, RAM utilization 10MB ~ 20MB some limitations: it requires the CMSP screen resolution has at least 300 pixel width, or it will not recognize the character correctly. Okay, this is a test of the whole process: This is a CMSC test, now this tool will use 5% CPU power for both CMSP CMSC character recognition. So ED, please improve your data export API, provide a LUA function so people can get the CDU/CMSP/CMSC screen text more easily.
-
My solution to the IP conflict issue is store / read the IP and MAC address in EEPROM, the IP just need 4 bytes. IPAddress ip; setup() { byte IP[4]; ReadIPFromEEPROM( IP ); ip = IPAddress( IP[0], IP[1], IP[2], IP[3] ); } void ReadIPFromEEPROM(byte *IP) { IP[0] = EEPROM.read(0); IP[1] = EEPROM.read(1); IP[2] = EEPROM.read(2); IP[3] = EEPROM.read(3); //provide some feedback. char msg[16]; snprintf( msg, 15, "%d.%d.%d.%d", IP[0], IP[1], IP[2], IP[3] ); Serial.println( msg ); } If people want to change their IP address then they can use a Serial Monitor to send some "commands" to Arduino to update the IP or MAC. The implementation is watch the serial port data in the loop() body if there are any, then parse the commands and update the IP or MAC address accordingly. Then press the "Reset" key on the Arduino board to make it live. void loop() { SerialDataLength = Serial.available(); if( SerialDataLength > 0 ) { //parse the command and write EEPROM }
-
1.2.6 after autoupdate Freetrack headtracking does not work
overpro replied to zaelu's topic in View System
Confirm you are using the headtracker.dll from here: http://forums.eagle.ru/showpost.php?p=1234317&postcount=28 I tried the facetrackNoIR one and got the save issue as your's. -
1.2.6 after autoupdate Freetrack headtracking does not work
overpro replied to zaelu's topic in View System
Uh, confirmed, the same headtracker.dll should be in 2 places, one in \bin\headtracker\ and one in \bin\ folder, it's weird but works:joystick: Btw, I'm still using the headtracker.dll from http://forums.eagle.ru/showpost.php?p=1234317&postcount=28 which is created by samtheeagle -
1.2.6 after autoupdate Freetrack headtracking does not work
overpro replied to zaelu's topic in View System
It works before upgraded to 1.2.6, now I downloaded the 64bit version headtracker.dll from facetracknoIR link you provided and put it in \bin folder but DCS crashed during mission loading (DCS.exe stopped work). My friend have the same situation. I use this headtracker.dll before: http://forums.eagle.ru/showpost.php?p=1234317&postcount=28 -
1.2.6 after autoupdate Freetrack headtracking does not work
overpro replied to zaelu's topic in View System
For some reason I still don't have it work properly. But it seems my head movement affected the default view once I sit in the cockpit and that's all. -
Issue Report: MFCD not rendering DCSW version: 1.2.5.16508 OS: Win8 Description: After click "Install LUA file" button, the MFCD will not render in virtual cockpit, I have to edit this file manually to make MFCD work again: C:\Program Files\Eagle Dynamics\DCS World\Mods\aircrafts\A-10C\Cockpit\Scripts\MFCD\indicator\MFCD_init.lua change line 15,16 from render_target_always = false purposes = {render_purpose.HUD_ONLY_VIEW}to render_target_always = false purposes = {[b]render_purpose.GENERAL[/b],render_purpose.HUD_ONLY_VIEW} I hope icemaker can have a patch on this, or if EMC open sourced the whole community can submit the patches. :smilewink:
-
My test shows Gun Cross Occult set to N doesn't affect SPI, it always hidden under Gun pipper.
-
same here, unable to activate Blackshark2 upgrade version.
-
sorry, it's fog of war
-
We just did a few more tests, if we enabled CA slots( Ground Control, JTAC ) but not enforce "fog of war" in game options, then all connected players are ok. if we enforce to enable "war fog" then the clients got disconnected.
-
I'm running a server dubbed "China Virtual Pilot DCSW server", we have the same issue, only 3 people can connect to the server, other players connected will get "connection interrupted" after 2 minutes, I don't think it is caused by a bad network connection, we did the test with some one who have a good connection and used wireshark to capture the UDP packages on both end and compared the saved capture, well, no package lost but the people still get disconnected. Nothing in logs. But now we found the solution for our server, in simple: disable CA slots in .miz we did quite a lot of test and I can say if our server running a map with any Combined Arms slots available then this issue can happens. With the same internet connection, same setting, same .miz but with all the CA slots disabled, this issue is gone. And it doesn't matter if the server has CA installed or not. I'm not sure if this workaround will fix your problem, but worth a try. ---New test result--- if a mission has CA slots enabled then the options should NOT enforce "fog of war"
-
Thanks speed, The problem is lua runtime error or syntax error in Scripts/net mods are unreported in dcs.log. To be precise: if I tried to import a module like this in server.lua: local socketHttp = require("socket.http") socketHttp.TIMEOUT = 5 if lua can't find socket.http then the value change of .TIMEOUT would fail because socketHttp is nil. this runtime error can be logged in dcs.log in dcs a10c, but in dcsw there is nothing ( I checked dcs.log and net-server.log ). So I created my own log file in main.lua and inserted quite a lot of debug log output in server.lua to see which piece of code introduced the error, like this: in server.lua: #some code #some code #some code myDebugLog( "section 1 executed") #some code myDebugLog( "section 2 executed")#some code #some code myDebugLog( "section 3 executed")by using this stupid method I finally found the erroneous code. The scripts/net mods are loaded during dcs.exe multiplayer start up, if there are any issues in there then the "network speed" drop down list in "options" windows will be empty. Once the scripts are loaded then the scripts functions runtime error( errors in server.on_connect() or events.on_kill() ) can be seen in dcs.log. Anyway, I feel a little bit pain to debug script error with dcsw.