MobiFlight-Connector icon indicating copy to clipboard operation
MobiFlight-Connector copied to clipboard

Display @ - value (Axis raw value) on input assignments

Open joeherwig opened this issue 1 year ago • 7 comments

Hi Stefan,

Story

As a user assigning analogue axis values to RPN scripts, it would be great to have the current axis value displayed somewhere so that I'm able to set the right code to get it working without the hassle of trial-and-error.

Acceptance-Criteria:

  1. The value of the current axis that is available within the RPN scripts as "@" is shown somewhere on the page where I'm able to edit the RPN assignment.

Background

For instance if I want to Assign the ADIRS knob function image to an analogue input (simple poti) I can use something like

@ 30000 < if{ 0 (>L:A32NX_OVHD_ADIRS_IR_1_MODE_SELECTOR_KNOB) } 
30000 40000 @ rng if{ 1 (>L:A32NX_OVHD_ADIRS_IR_1_MODE_SELECTOR_KNOB) }
@ 40000 > if{ 2 (>L:A32NX_OVHD_ADIRS_IR_1_MODE_SELECTOR_KNOB) } 

Unfortunately I need to guess the values (here 3000 and 4000) instead of being able just to turn the potentiometer to the right place and then "read" the value I need to put into the RPN to compare.

See Example @ https://github.com/joeherwig/mobiflight-configs/blob/main/A20N.mcc#L544-L576

Did I just miss the right place, where I can read the current @ walue or is that simply missing at the moment?

Best regards from Walddorfhäslach,

Joe

joeherwig avatar Dec 17 '23 19:12 joeherwig

As a workaround for now: So when you turn on Logging in Settings you should immediately see log messages for the potentiometer that you are turning. You can move the dialog to a side so that it doesn't overlap the log window.

image

DocMoebiuz avatar Dec 17 '23 21:12 DocMoebiuz

Hi Sebastian, Thanks for the fast response. As I have the issue of jittering on two axis, which I can't filter out from the logging, I get a lot of clutter which makes it impossible to read it. So finally I found the logfile, but it's a mess as I get hundreds of entries with 17 analog inputs installed. Is there any way to filter only "active" inputs? Or to de-jitter (define something like "only report change when changed by minimum x)?

joeherwig avatar Dec 18 '23 20:12 joeherwig

The Mobiflight firmware has a built-in smoothing function that is already averaging the last 8 readings. Additionally, the analog device configuration has a sensitivity setting that does what you described. I suspect that you have an electrical noise problem in your panel and should take measures to filter it out. 7 segment displays are notorious for affecting potentiometer readings. Capacitors might help.

JaimeLeon2 avatar Dec 28 '23 14:12 JaimeLeon2

Hi Sebastian, Thanks for the fast response. As I have the issue of jittering on two axis, which I can't filter out from the logging, I get a lot of clutter which makes it impossible to read it. So finally I found the logfile, but it's a mess as I get hundreds of entries with 17 analog inputs installed. Is there any way to filter only "active" inputs? Or to de-jitter (define something like "only report change when changed by minimum x)?

@joeherwig the axis are driven by potis that are connected via MobiFlight boards, not via a joystick? Is that correct. If that's the case I wonder if you have tried what @JaimeLeon2 suggested. There is a sensitivity option for the potentiometer in the board settings.

DocMoebiuz avatar Dec 31 '23 23:12 DocMoebiuz

No, it's just Joysticks where I want to manage the assignments within Mobiflight instead of MSFS.

joeherwig avatar Jan 12 '24 13:01 joeherwig

this will be addressed by the upcoming ui-redesign

DocMoebiuz avatar Feb 02 '24 08:02 DocMoebiuz

follow #1595

DocMoebiuz avatar Feb 02 '24 08:02 DocMoebiuz