Two Flap Widgets

mmarien

Murray M.
Joined
Dec 26, 2009
Messages
1,206
Location
Saskatoon SK CAN
Is it possible to have two flap widgets? Yeah, I know both flaps should be the same. Was thinking the flap widget would be handy for the cowl flaps. I can probably use a contact. It would show 0% 25% ... 100%. A bar widget is not so handy as it would just show the voltage of the position sensor. Unless it was calibrated like a position sensor. Is that possible? Can I call the input POSITION, calibrate it between 0-100 and then use a bar widget?

I already used the FLAP and TRIM position widgets.
 

mmarien

Murray M.
Joined
Dec 26, 2009
Messages
1,206
Location
Saskatoon SK CAN
Skyview seems to only be able to calibrate flap and trim positions plus fuel levels. And Dynon is correct in that there can only be one FLAP position sensor. But there is a way to add position sensors besides the predefined ones. It just takes a little hand coding.

In the SFG file I added COWL to the lists of position sensors.

Code:
sensor={
      id=POSITION
      function=POSITION
      pins=C37_P4 C37_P6 C37_P7 C37_P8 C37_P9 C37_P10 C37_P11 C37_P12 C37_P20 C37_P21 C37_P22 C37_P23 C37_P31
      name=FLAPS
      name=AILERN
      name=RUDDER
      name=ELEV
      name=COWL
      min_val=0
      max_val=100
      resolution=0
      round=1
        etc
There was no way to calibrate it so I check the UP and DOWN values in the EMS SENSOR DEBUG DATA page and added a user calibration to the DFG file. I also added some ranges and a gauge.

Code:
ems_module={
      c37_p10={
            valid=1
            name=COWL
            id=POSITION
            alarm_type=OFF
            range={
                  max_display=100
                  min_display=0
                  range1_valid=1
                  range1_top=100.0
                  range1_bot=0.0
                  range1_name=DOWN
                  range1_color=BLACK
                  range2_valid=1
                  range2_top=81
                  range2_bot=80
                  range2_name=80
                  range2_color=WHITE
                  range3_valid=1
                  range3_top=61
                  range3_bot=60
                  range3_name=60
                  range3_color=WHITE
                  range4_valid=1
                  range4_top=41
                  range4_bot=40
                  range4_name=40
                  range4_color=WHITE
                  range5_valid=1
                  range5_top=21
                  range5_bot=20
                  range5_name=UP
                  range5_color=WHITE
                  }
            show_units=0
            }
      user_cal={
            valid=1
            name=COWL POSITION
            num_points=2
            point={
                  volts=1.82739
                  value=0
                  }
            point={
                  volts=2.48291
                  value=100
                  }
            }
      }
ems_display={
      Layout_20={
            c37_p10={
                  type=WIDGET_ARC_VAL_CENTER
                  x_offset=15.8
                  y_offset=27.1
                  width=30
                  height=30
                  params=90
                  params=270
                  params=1
                  value_text=XSMALL
                  label_text=XSMALL
                  }
            }
      }

You can also make it look like a standard flap position gauge. They look like this:

CowlFlap.png
 
Top