Skip to main content

Class: NavDataBarFieldFobModelFactory

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

Creates data models for Fuel on Board navigation data bar fields.

The models retrieve fuel on board values from the event bus topic fuel_usable_total (defined in EngineEvents).

Extends

Constructors

Constructor

new NavDataBarFieldFobModelFactory(bus, fuelUnit): NavDataBarFieldFobModelFactory

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

Creates a new instance of NavDataBarFieldFobModelFactory.

Parameters

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

Returns

NavDataBarFieldFobModelFactory

Overrides

EventBusNavDataBarFieldTypeModelFactory.constructor

Properties

fuelUnit

protected readonly fuelUnit: Unit<Weight> = UnitType.GALLON_FUEL

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

The unit with which to interpret the fuel values retrieved from the event bus. The unit should define the weight equivalent of one U.S. gallon of fuel. Defaults to UnitType.GALLON_FUEL.


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<Weight, Unit<Weight>>>

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

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<Weight, Unit<Weight>>>

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

Overrides

EventBusNavDataBarFieldTypeModelFactory.create