public AutothrustMode(IServiceProvider serviceProvider) : base(serviceProvider) { thrustLever1N1 = serviceProvider.GetRequiredService <ThrustLever1N1>(); thrustLever2N1 = serviceProvider.GetRequiredService <ThrustLever2N1>(); engine1N1 = serviceProvider.GetRequiredService <Engine1N1>(); engine2N1 = serviceProvider.GetRequiredService <Engine2N1>(); engine1N1.PropertyChanged += OnPropertyChanged; engine2N1.PropertyChanged += OnPropertyChanged; scHolder = serviceProvider.GetRequiredService <SimConnectHolder>(); hubContext = serviceProvider.GetRequiredService <IHubContext <ControlzmoHub, IControlzmoHub> >(); serviceProvider.GetRequiredService <RunwayCallsStateListener>().onGroundHandlers += OnGroundHandler; }
private Boolean isSet(EngineN1 engine, ThrustLeverN1 lever) { return(lever > 75.0 && engine >= lever - 0.1); }