MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
Doon1
Posts: 53
My rudder pedal motor is a little laggy. I'm assuming I can increase the polling so that the lag is decreased. Where should I look to make the change? I was able to increase the frequency of the PWM signal in the Mobiflight.ccp file .
I found this.
iconcpp:
 #define MF_BUTTON_DEBOUNCE_MS     10 // time between updating the buttons
#define MF_ENCODER_DEBOUNCE_MS    1  // time between encoder updates
#define MF_INSHIFTER_POLL_MS      10 // time between input shift reg updates
#define MF_INMUX_POLL_MS          10 // time between dig input mux updates
#define MF_SERVO_DELAY_MS         5  // time between servo updates
#define MF_ANALOGAVERAGE_DELAY_MS 10 // time between updating the analog average calculation
#define MF_ANALOGREAD_DELAY_MS    50 // time between sending analog values 



EDIT:
Do any of these control the LED light polling setting?
After reading through this a few times I think this is two questions.
1. How often does SimConnect update the information on the board? Or how often is it requested from the board?
2. How often (continuous?) is the LED output sent from the board.
I'm hoping to increase these rates to reduce the lag.

EDIT 2:
I found the analog delay and adjusted it down which should help with the pedal input lag.
iconcpp:
#define MF_ANALOGAVERAGE_DELAY_MS 5  // time between updating the analog average calculation
#define MF_ANALOGREAD_DELAY_MS    5  // time between sending analog values
 

Thinking about it some more. Would I even need to define the LED output as its a PWM signal?
Now to find the code for the SimConnect polling time.
[Last edited by Doon1, 2022-05-14 20:03]
2022-05-14 14:47
Avatar
Doon1
Posts: 53
Doing some research leads me to think that I may need to increase the baud rate. Would this be correct or is there some other timing mechanism at play here?
2022-05-15 22:31
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
???
What do you do ?

Rudder is a INPUT. Why do you need a LED Signal with PWM there ?
Good Luck !
2022-05-16 00:24
Avatar
Doon1
Posts: 53
The PWM output is for the force feedback motor. Mobiflight reads several MSFS2020 variables for wind direction and speed, as well as some other things. Those variables are used as config references for the PWM output. The value changes often so it needs to update often. I was wonder what the update speed is. It isn't defined with the rest of the inputs/outputs in the Mobiflight.ccp file. I thought it was MF_output. So I changed #include Output.h statement to this:
iconcpp:
#if MF_Output_SUPPORT == 1
#include "Output.h"
#endif

But the file won't save. So I'm doing something wrong (big surprise there).
The analog inputs are the rudder and toe brakes. I've lowered them to 5ms. It would be cool if I could give each of them their own individual AnalogRead_delay as the toe brakes don't need to update as often as the rudder.
[Last edited by Doon1, 2022-05-17 01:44]
2022-05-17 01:35
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Please get in contact with Sebastian himself ( the MF Creator)
You can meet him on our Discord Server. https://discord.gg/99vHbK7

About those technical details i´m out.
In the past MF work with a rate of 500ms .... Fastest was 100ms
Maybe after split FSUIPC and include the Analog Stuff we have internal a higher rate.... But 5ms sounds pretty fast.

By the way... You also need to think about the "Loop" Time. Data is read/update only once by loop.
As more configs as longer the loop.
So whatever MF could read e.g. the Sim value multiple times in a short periode .... the Calculation and so the Update of the Config Value only happens once every loop.
Good Luck !
2022-05-17 13:39
icon