Namespace OpenSkyhawk
Classes
| Type | Name |
|---|---|
| struct | AccelPoint One point on the acceleration curve (SwitecX25 form). |
| class | AnalogInput Continuous analog input — one analog PinRef , normalised to a 16-bit value 0..65535. Emits the smoothed value over CAN (MULTIPOS transport). Self-registers intoPanelGroup 'sInputBase list. |
| class | AnalogMultiPos Resistor-ladder multi-position selector — one analog PinRef , a different voltage per position. Emits the resolved position index 0..N-1 over CAN (MULTIPOS dispatch). |
| class | DrumDisplay Rolling-drum OLED readout. One instance == one OLED panel. |
| struct | DrumFlag Optional 2-state (or N-state) flag tape — hemisphere N/S · E/W, or a mode letter. |
| struct | DrumGlyph A fixed (non-rolling) glyph painted between digit columns — '.', ' ', ':' etc. |
| struct | DrumReadout Complete description of one rolling readout: its sources, geometry, glyphs, flag. |
| struct | DrumSource One DCS-BIOS digit source feeding a DrumReadout . |
| struct | GaugeCal Value → position calibration for one gauge. |
| class | HIDAxis HID axis handler. Declared at sketch scope for each joystick axis. |
| class | HIDButton HID button handler. Declared at sketch scope for each button. |
| class | HIDHatSwitch HID hat switch handler. Declared at sketch scope for each hat switch. |
| struct | HomeSensor Home-sensor parameters ( HomeMode::SENSOR only). |
| class | I2cHealth Per-device I2C circuit breaker. Mix into any class that talks to an I2C device. |
| class | I2cMux Selects one downstream channel of a TCA9548A I2C multiplexer. |
| class | InputBase Abstract base for all hardware-polled input objects. |
| class | LED Digital LED output. Drives a pin based on a DCS-BIOS state value. |
| class | MotorDriver Common interface every motor/servo backend implements. |
| class | MultiPosInput Base for the MULTIPOS input family — selectors that emit an absolute position index 0..N-1 over CAN. Self-registers into PanelGroup 'sInputBase list. |
| class | NeedleGauge DCS-driven pointer gauge over any MotorDriver backend. |
| class | OutputBase Abstract base for all DCS-driven output objects. |
| class | RotaryEncoder Incremental quadrature encoder on two pins (A/B). Emits a signed relative value per detent over CAN — direction in the sign, magnitude set by the mode. Self-registers intoPanelGroup 'sInputBase list. |
| struct | StepperConfig Full per-instance stepper configuration. Authored per sketch (panel wiring). |
| class | StepperMotor Non-blocking instrument-gauge stepper driven through PinRef coils. |
| class | Switch2Pos Debounced 2-position switch. Self-registers into PanelGroup 'sInputBase list. |
| class | Switch3Pos Three-position switch (ON-OFF-ON / spring-centred) on two pins. Emits 0 / 1 / 2 over CAN (MULTIPOS dispatch). |
| class | SwitchMultiPos Multi-position rotary selector — N discrete pins, exactly one active at a time. Emits the active position index 0..N-1 over CAN (MULTIPOS dispatch). |
Public Types
| Type | Name |
|---|---|
| enum uint8_t | DrumFont Glyph font size. Maps to a fixed monospace ProFont face. |
| enum uint8_t | DrumScroll Scroll behaviour per readout. |
| enum uint8_t | EncoderMode Relative-dispatch mode — picks the DCS-BIOS interface the bridge drives, hence the CAN frame + payload encoding this encoder uses per detent. Scoped enum. |
| enum uint8_t | EncoderStepsPerDetent Quadrature transitions per mechanical detent (match to the encoder). Scoped enum. |
| enum uint8_t | HomeMode How the driver establishes its zero reference at boot. |
| enum uint8_t | StepPattern Coil energising sequence. |
Public Attributes
| Type | Name |
|---|---|
| const AccelPoint | kSwitecDefaultAccel = /* multi line expression */Default SwitecX25 acceleration table; fits the X27/VID-29/BKA-30 air-core family. |
| constexpr uint8_t | kSwitecDefaultAccelN = 5 |
Public Static Attributes
| Type | Name |
|---|---|
| constexpr uint16_t | ANALOG_NC = [**MultiPosInput::NO\_POSITION**](classOpenSkyhawk_1_1MultiPosInput.md#variable-no_position)posVals[] sentinel: a position with no physical detent (no distinct voltage). |
| const float | EASE = 0.30f |
| const uint32_t | FRAME_MS = 16 |
| const uint8_t | KIND_DIGIT = 0 |
| const uint8_t | KIND_FLAG = 2 |
| const uint8_t | KIND_GLYPH = 1 |
| const float | PX_PER_MM = 4.35f |
| const float | SETTLE_EPS = 0.02f |
| const float | SNAP_LANDING = 1.5f |
Public Functions
| Type | Name |
|---|---|
| StepperConfig | makeX27Config (int16_t homePosition, int16_t parkPosition, int16_t minPos, int16_t maxPos, HomeMode home=HomeMode::STALL, bool homeSeekClockwise=false, HomeSensor sensor={ true, 5, 2000 }, bool wrap=false, uint8_t deadband=1, bool autoRecal=false, uint32_t recalDebounceMs=0, uint16_t stepsPerRev=1080, uint16_t rangeSteps=945, uint16_t homeStepUs=0) Build a StepperConfig with the X27 air-core motor defaults filled in. |
Public Static Functions
| Type | Name |
|---|---|
| long | pow10l (uint8_t n) |
Public Types Documentation
enum DrumFont
Glyph font size. Maps to a fixed monospace ProFont face.
enum OpenSkyhawk::DrumFont {
SMALL = 0,
LARGE = 1
};
Note:
SMALL = u8g2_font_profont22_mr, LARGE = u8g2_font_profont29_mr (mono, ASCII). Mono guarantees the flag glyph ('N'/'S'/'E'/'W') is no wider than a digit cell.
enum DrumScroll
Scroll behaviour per readout.
enum OpenSkyhawk::DrumScroll {
EASE_ONLY = 0,
SNAP_SETTLE = 1
};
Note:
SNAP_SETTLE adds the prototype-missing jump handling: deltas above the readout's snapThreshold teleport the tape near the target, then ease the final step, so a sudden 130→250 KIAS change doesn't spin every wheel through 120 intermediate values.
enum EncoderMode
Relative-dispatch mode — picks the DCS-BIOS interface the bridge drives, hence the CAN frame + payload encoding this encoder uses per detent. Scoped enum.
enum OpenSkyhawk::EncoderMode {
Rel,
Dir
};
enum EncoderStepsPerDetent
Quadrature transitions per mechanical detent (match to the encoder). Scoped enum.
enum OpenSkyhawk::EncoderStepsPerDetent {
One = 1,
Two = 2,
Four = 4,
Eight = 8
};
enum HomeMode
How the driver establishes its zero reference at boot.
enum OpenSkyhawk::HomeMode {
STALL,
SENSOR
};
enum StepPattern
Coil energising sequence.
enum OpenSkyhawk::StepPattern {
SWITEC_6STATE,
FULL_4STATE
};
Public Attributes Documentation
variable kSwitecDefaultAccel
Default SwitecX25 acceleration table; fits the X27/VID-29/BKA-30 air-core family.
const AccelPoint OpenSkyhawk::kSwitecDefaultAccel;
variable kSwitecDefaultAccelN
constexpr uint8_t OpenSkyhawk::kSwitecDefaultAccelN;
Public Static Attributes Documentation
variable ANALOG_NC
posVals[] sentinel: a position with no physical detent (no distinct voltage).
constexpr uint16_t OpenSkyhawk::ANALOG_NC;
The uint16_t analog of SwitchMultiPos's PIN_NC — same "this position index has no physical
input" role, but a different sentinel because an analog ladder is an array of ADC values (uint16_t), not PinRefs. Kept == MultiPosInput::NO_POSITION (both 0xFFFF) so there is one sentinel value across the MULTIPOS family.
variable EASE
const float OpenSkyhawk::EASE;
variable FRAME_MS
const uint32_t OpenSkyhawk::FRAME_MS;
variable KIND_DIGIT
const uint8_t OpenSkyhawk::KIND_DIGIT;
variable KIND_FLAG
const uint8_t OpenSkyhawk::KIND_FLAG;
variable KIND_GLYPH
const uint8_t OpenSkyhawk::KIND_GLYPH;
variable PX_PER_MM
const float OpenSkyhawk::PX_PER_MM;
variable SETTLE_EPS
const float OpenSkyhawk::SETTLE_EPS;
variable SNAP_LANDING
const float OpenSkyhawk::SNAP_LANDING;
Public Functions Documentation
function makeX27Config
Build a StepperConfig with the X27 air-core motor defaults filled in.
StepperConfig OpenSkyhawk::makeX27Config (
int16_t homePosition,
int16_t parkPosition,
int16_t minPos,
int16_t maxPos,
HomeMode home=HomeMode::STALL,
bool homeSeekClockwise=false,
HomeSensor sensor={ true, 5, 2000 },
bool wrap=false,
uint8_t deadband=1,
bool autoRecal=false,
uint32_t recalDebounceMs=0,
uint16_t stepsPerRev=1080,
uint16_t rangeSteps=945,
uint16_t homeStepUs=0
)
Bakes the motor-invariant fields — stepsPerRev, pattern (SWITEC_6STATE), and the default SwitecX25 accel table — so a sketch specifies only the per-gauge wiring/travel. Shared by every X27 / VID-29 / BKA-30 gauge; override any default for a specific panel.
Parameters:
homePositionstep index at the home reference.parkPositionrest position after homing.minPoslower moveTo travel clamp (ignored if wrap).maxPosupper moveTo travel clamp (ignored if wrap).homehoming strategy. Default STALL.homeSeekClockwiseseek direction. Default false.sensorhome-sensor params (SENSOR mode). Default active-low, 5 ms, 2000 steps.wrapcontinuous-rotation gauge. Default false.deadbandanti-jitter band, steps. Default 1.autoRecalre-zero on sensor crossing. Default false.recalDebounceMsminimum interval between auto-recals. Default 0.stepsPerRevfull revolution in steps. Default 1080 (X27/BKA datasheet, 1/3°/step).rangeStepsmechanical stop-to-stop travel in steps = STALL home distance. Default 945 (X27.589 ~315°); set per gauge (e.g. 960 for a 320° BKA-30).homeStepUshoming seek rate µs/step. Default 0 → library default (2000 ≈ 500 steps/s). Keep under the motor start-stop rate (~774 steps/s) or the seek slips.
Returns:
Populated StepperConfig.
Public Static Functions Documentation
function pow10l
static long OpenSkyhawk::pow10l (
uint8_t n
)
The documentation for this class was generated from the following file Firmware/Libraries/DrumDisplay/DrumDisplay.cpp