Skip to main content

Class: NavDataBarFieldFuelFlowModelFactory

Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldTypeModelFactories.ts:641

Creates data models for Fuel Flow navigation data bar fields.

The models retrieve fuel flow values from the event bus topic fuel_flow_total (defined in EngineEvents).

Extends​

Constructors​

Constructor​

new NavDataBarFieldFuelFlowModelFactory(bus, fuelUnit): NavDataBarFieldFuelFlowModelFactory

Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldTypeModelFactories.ts:650

Creates a new instance of NavDataBarFieldFuelFlowModelFactory.

Parameters​

ParameterTypeDefault valueDescription
busEventBusundefinedThe event bus.
fuelUnitCompoundableUnit<Weight>UnitType.GALLON_FUELThe unit with which to interpret the fuel values retrieved from the event bus. The unit should should define the weight equivalent of one U.S. gallon of fuel. Defaults to UnitType.GALLON_FUEL.

Returns​

NavDataBarFieldFuelFlowModelFactory

Overrides​

EventBusNavDataBarFieldTypeModelFactory.constructor

Properties​

fuelFlowUnit​

protected readonly fuelFlowUnit: Unit<WeightFlux>

Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldTypeModelFactories.ts:642


sub​

protected readonly sub: EventSubscriber<EngineEvents>

Defined in: src/garminsdk/components/navdatabar/EventBusNavDataBarFieldTypeModelFactory.ts:12

Inherited from​

EventBusNavDataBarFieldTypeModelFactory.sub

Methods​

create()​

create(gpsValidity): NavDataBarFieldModel<NumberUnitInterface<WeightFlux, Unit<WeightFlux>>>

Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldTypeModelFactories.ts:657

Creates a navigation data bar field data model for this factory's data field type.

Parameters​

ParameterTypeDescription
gpsValiditySubscribable<NavDataFieldGpsValidity>The subscribable that provides the validity of the GPS data for the models.

Returns​

NavDataBarFieldModel<NumberUnitInterface<WeightFlux, Unit<WeightFlux>>>

A navigation data bar field data model for this factory's data field type.

Overrides​

EventBusNavDataBarFieldTypeModelFactory.create