Skip to content

Struct OpenSkyhawk::GaugeCal

ClassList > OpenSkyhawk > GaugeCal

Value → position calibration for one gauge. More...

  • #include <NeedleGauge.h>

Public Attributes

Type Name
const uint16_t * curveIn
ascending DCS breakpoints, or nullptr for linear
uint8_t curveN
breakpoint count (0 = linear)
const uint16_t * curveOut
matching positions for curveIn
int16_t maxTravel
motor position at DCS value 65535 (linear path)
int16_t minTravel
motor position at DCS value 0 (linear path)
bool reverse
flip direction (mounted/wired reversed)

Detailed Description

The DCS-BIOS value (0..65535) maps to a motor position. For a linear gauge, 0 → minTravel and 65535 → maxTravel (either may exceed the other or be negative — a centre-zero gauge sits mid-range). For a non-linear dial (airspeed, VVI), supply a piecewise curve: curveIn holds ascending DCS breakpoints and curveOut the matching positions (curveN entries); intermediate values are linearly interpolated.

Note:

curveOut is unsigned — non-linear dials use a positive position range. Centre-zero gauges use the linear path (signed minTravel / maxTravel) instead.

Public Attributes Documentation

variable curveIn

ascending DCS breakpoints, or nullptr for linear

const uint16_t* OpenSkyhawk::GaugeCal::curveIn;

variable curveN

breakpoint count (0 = linear)

uint8_t OpenSkyhawk::GaugeCal::curveN;

variable curveOut

matching positions for curveIn

const uint16_t* OpenSkyhawk::GaugeCal::curveOut;

variable maxTravel

motor position at DCS value 65535 (linear path)

int16_t OpenSkyhawk::GaugeCal::maxTravel;

variable minTravel

motor position at DCS value 0 (linear path)

int16_t OpenSkyhawk::GaugeCal::minTravel;

variable reverse

flip direction (mounted/wired reversed)

bool OpenSkyhawk::GaugeCal::reverse;


The documentation for this class was generated from the following file Firmware/Libraries/PanelGroup/Outputs/NeedleGauge/NeedleGauge.h