Exemplo n.º 1
0
        private void Output4TypeComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            UserOutputType outputType = (UserOutputType)Output4TypeComboBox.SelectedIndex;

            Controller.IgnitionMap.UserOutput4.OutputType = outputType;
            SetUserOutputActivationType(outputType, Output4ActivationTypeLabel, Output4ActivationPointNumericUpDown);
        }
Exemplo n.º 2
0
 protected virtual void OnOutputTypeChanged(UserOutputType newOutputType)
 {
     if (OutputTypeChanged == null)
     {
         return;
     }
     OutputTypeChanged(this, new EventArgs <UserOutputType>(newOutputType));
 }
Exemplo n.º 3
0
 public static ushort GetThresholdMaximum(UserOutputType outputType, LoadType loadType, AspirationType aspirationType)
 {
     if (outputType == UserOutputType.Unknown)
     {
         return(ushort.MaxValue);
     }
     if (outputType == UserOutputType.Rpm)
     {
         return(10000);
     }
     if (outputType == UserOutputType.AuxiliaryInput)
     {
         return(255);
     }
     return(loadType.LoadTypeMaximum(aspirationType));
 }
Exemplo n.º 4
0
        private void SetUserOutputActivationType(UserOutputType userOutputType, Label label, BetterNumericUpDown numericUpDown)
        {
            switch (userOutputType)
            {
            case UserOutputType.Rpm:
                label.Text = "RPM";
                numericUpDown.MaximumValue = 10000;
                numericUpDown.Increment    = 100;
                break;

            case UserOutputType.Load:
                label.Text = Controller.GlobalConfiguration.LoadType.LoadTypeLabel();
                numericUpDown.MaximumValue = Controller.GlobalConfiguration.LoadType.LoadTypeMaximum(Controller.GlobalConfiguration.AspirationType);
                numericUpDown.Increment    = 1;
                break;

            case UserOutputType.AuxiliaryInput:
                label.Text = "Aux Input";
                numericUpDown.MaximumValue = 255;
                numericUpDown.Increment    = 1;
                break;
            }
        }
Exemplo n.º 5
0
 internal UserOutput(UserOutputType outputType, UserOutputMode outputMode, ushort threshold)
 {
     OutputType = outputType;
     OutputMode = outputMode;
     Threshold  = OutputType == UserOutputType.Rpm ? (ushort)(threshold * 100) : threshold;
 }