Ejemplo n.º 1
0
 protected virtual void OnIgnitionCellChanged(IgnitionCellIndex newIgnitionCell)
 {
     if (IgnitionCellChanged == null)
     {
         return;
     }
     IgnitionCellChanged(this, new EventArgs <IgnitionCellIndex>(newIgnitionCell));
 }
Ejemplo n.º 2
0
 private void UpdateAdvance(IgnitionCellIndex cellIndex, byte advance)
 {
     if (AdvanceMap[cellIndex.MapIndex] == advance)
     {
         return;
     }
     AdvanceMap[cellIndex.MapIndex] = advance;
     OnIgnitionCellUpdated(cellIndex);
 }
Ejemplo n.º 3
0
 private void PopulateIgnitionMap(byte[] ignitionMap)
 {
     for (byte loadIndex = 0; loadIndex < 10; loadIndex++)
     {
         for (byte rpmIndex = 0; rpmIndex < 10; rpmIndex++)
         {
             IgnitionCellIndex cellIndex = new IgnitionCellIndex(loadIndex, rpmIndex);
             UpdateAdvance(cellIndex, ignitionMap[cellIndex.MapIndex]);
         }
     }
 }
Ejemplo n.º 4
0
 protected virtual void OnIgnitionCellUpdated(IgnitionCellIndex cellIndex)
 {
     if (IgnitionCellUpdated == null)
     {
         return;
     }
     if (!LoadInProgress)
     {
         SavedState = SavedStates.Dirty;
     }
     IgnitionCellUpdated(this, new EventArgs <IgnitionCellIndex>(cellIndex));
 }
Ejemplo n.º 5
0
 public void Reset()
 {
     IgnitionAdvance       = 0;
     Rpm                   = 0;
     Load                  = 0;
     IgnitionCell          = new IgnitionCellIndex(byte.MaxValue, byte.MaxValue);
     IgnitionConfiguration = IgnitionConfiguration.Unknown;
     AuxiliaryInput        = 0;
     AdvanceCorrectionBin  = 0;
     AdvanceCorrection     = 0;
     UserOutput1State      = BitState.Inactive;
     UserOutput2State      = BitState.Inactive;
     UserOutput3State      = BitState.Inactive;
     UserOutput4State      = BitState.Inactive;
     ShiftLightState       = BitState.Inactive;
     RevLimitState         = BitState.Inactive;
 }
Ejemplo n.º 6
0
 internal void Populate(GetStateResponse response, EdisType edisType)
 {
     IgnitionAdvance       = response.CurrentIgnitionAdvance;
     Rpm                   = response.GetCurrentRpmValue(edisType);
     Load                  = response.CurrentLoadValue;
     IgnitionCell          = new IgnitionCellIndex(response.CurrentLoadBin, response.CurrentRpmBin);
     UserOutput1State      = response.UserOutput1;
     UserOutput2State      = response.UserOutput2;
     UserOutput3State      = response.UserOutput3;
     UserOutput4State      = response.UserOutput4;
     ShiftLightState       = response.ShiftLightState;
     RevLimitState         = response.RevLimitState;
     IgnitionConfiguration = response.IgnitionConfiguration;
     AuxiliaryInput        = response.AuxiliaryInputValue;
     AdvanceCorrectionBin  = response.CurrentAdvanceCorrectionBin;
     AdvanceCorrection     = response.CurrentAdvanceCorrectionValue;
 }
Ejemplo n.º 7
0
 public byte this[IgnitionCellIndex cellIndex]
 {
     get { return(AdvanceMap[cellIndex.MapIndex]); }
     set { UpdateAdvance(cellIndex, value); }
 }