Comments (3)
Hi, I'm not sure why the number of channels is wrong. Anyway if you are not using the analog channels you should change the code to:
#define NUM_ANALOG_INPUTS 0
byte analogPins[] = {};
#define NUM_DIGITAL_INPUTS 12
byte digitalPins[] = {40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51};
#define NUM_DIGITAL_BITMAPPED_INPUTS 0
byte digitalBitmappedPins[] = {};
But I would recommend to use the bitmapped inputs like this:
#define NUM_ANALOG_INPUTS 0
byte analogPins[] = {};
#define NUM_DIGITAL_INPUTS 0
byte digitalPins[] = {};
#define NUM_DIGITAL_BITMAPPED_INPUTS 12
byte digitalBitmappedPins[] = {40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51};
This will allow all 12 buttons to be packed in just one channel (2 bytes/16bits). Otherwise, with every frame you are sending 12 16bit channels of which really only 1 bit has any meaning, so it's a waste.
from vjoyserialfeeder.
Thanks for the insight. I've reconfigured with your suggestion but still having issues with these momentary buttons.
Firstly when I upload the script I get the following warnings:
C:\Users\William\Desktop\vjoy-serialfeeder\Joystick\Joystick.ino:15:0: warning: "NUM_ANALOG_INPUTS" redefined
#define NUM_ANALOG_INPUTS 0In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:258:0,
from sketch\Joystick.ino.cpp:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\mega/pins_arduino.h:29:0: note: this is the location of the previous definition
#define NUM_ANALOG_INPUTS 16
Secondly, in the vJoySerialFeeder App I now show only one channel detected, so I configured a bit-mapped button. Tied it to channel 1 and here are my settings for each bit:
Nothing seems to be working, I'm not getting any feedback or seeing any button response in the vJoy Game controller.
from vjoyserialfeeder.
Oh, I see now. I had no idea that NUM_ANALOG_INPUTS
is actually #define
that is used in Arduino code itself =O
I'll have to update the sketch to use another name. Please replace every instance of NUM_ANALOG_INPUTS
inside the .ino
file with something else.
About the the other problem: I completely forgot that recently there was update of vjsf that is probably the reason for this.
Some time ago it turned out that IBUS uses only 12bits (0-2047) for each channel. This leaves 4bits free from every 16. Thus FlySky is using the 4bits of three consecutive channels to pack another 12-bit channel. For this reason if you have 3 channels (2 bytes/16-bit each) in the frame, you can pack inside one additional 12-bit channel (3 times the 4 unused bits).
This is the reason that you got 37 channels instead of 28.
28/3 = 9.333... So with 28 16bit values you can pack 9 additional channels, giving the total of 37.
Newer AFHDS3 tranismitters pack these additional channels. Within the standard 14 channels they pack 4 additional for total of 18. That's why I've implemented this in vjsf, but also made it possible to use the old behavior that uses the full 16-bits for each channel. You have to click the Setup
button next to the IBUS
protocol selector and there choose 16-bit channels
.
I had to document this but I completely forgot about all this.
from vjoyserialfeeder.
Related Issues (20)
- Help with Custom Controller Protocol HOT 9
- Facing Connected failsafe serial port read timeout error HOT 4
- Connecting İbus Receiver HOT 2
- not reading serial data HOT 6
- I don't know my problem, there's two of them. HOT 8
- l HOT 21
- Readable map of buttons -> joy pad button HOT 1
- dji rc N1 HOT 6
- Rotatory encoder implementation HOT 3
- vjoy Connected,Failsafe(waiting for serial data) HOT 31
- how to add buttons with your old joystck in vjoy HOT 7
- SERaero serial protocol implementation
- Disappearing port HOT 4
- Raspberry Pi Pico IBUS - Failsafe (Serial Port Read Timeout) HOT 6
- Radiolink T8FB BT usb com not visible in vjoyserialfeeder HOT 10
- Potentiometer value keep changing slightly HOT 1
- vJoySerialFeeder with SBUS is glitching HOT 10
- vJoy does not receive inputs | Arduino HOT 3
- automatic reconnect only works halfway HOT 5
- OPtic 6 to corona cr8d and Nano not getting signal to VJoy HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vjoyserialfeeder.