예제 #1
0
 public CKernelWriterIpc(Vehicle vehicle, Protocol protocol, WriteTypeIpc writeTypeIpc, ILogger logger)
 {
     this.vehicle      = vehicle;
     this.protocol     = protocol;
     this.writeTypeIpc = writeTypeIpc;
     this.logger       = logger;
 }
예제 #2
0
 /// <summary>
 /// Compare the two operating system IDs, report on the ramifications, set a flag if the write should be halted.
 /// </summary>
 public static void ReportIpcOperatingSystems(UInt32 fileOs, UInt32 pcmOs, WriteTypeIpc writeTypeIpc, ILogger logger, out bool shouldHalt)
 {
     shouldHalt = false;
     if (fileOs == pcmOs)
     {
         logger.AddUserMessage("PCM and image file are both operating system " + fileOs);
     }
     else
     {
         if ((writeTypeIpc == WriteTypeIpc.OsPlusCalibrationPlusBoot) || (writeTypeIpc == WriteTypeIpc.Full))
         {
             logger.AddUserMessage("Changing PCM to operating system " + fileOs);
         }
         else if (writeTypeIpc == WriteTypeIpc.TestWrite)
         {
             logger.AddUserMessage("PCM and image file are different operating systems.");
             logger.AddUserMessage("But we'll ignore that because this is just a test write.");
         }
         else
         {
             logger.AddUserMessage("Flashing this file could render your PCM unusable.");
             shouldHalt = true;
         }
     }
 }