|
@@ -61,7 +61,8 @@ namespace AwInitilizer.Procedure.ButtonStatusCheck
|
|
|
|
|
|
internal override async Task<bool> Run()
|
|
|
{
|
|
|
- if (UpdateData.SkipButtonTest)
|
|
|
+ if (UpdateData.ButtonTestMode == "SkipButtonTest" ||
|
|
|
+ UpdateData.SkipButtonTest)
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
@@ -92,8 +93,15 @@ namespace AwInitilizer.Procedure.ButtonStatusCheck
|
|
|
//Button1,Button2,EmergencyButton in order 0,1,2
|
|
|
for (int testType = 0; testType < 3; testType++)
|
|
|
{
|
|
|
+ if ((testType == 1 || testType == 0) &&
|
|
|
+ UpdateData.ButtonTestMode == "SkipNormalButton")
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
if (testType == 2 &&
|
|
|
- UpdateData.SkipEmergencyButton)
|
|
|
+ (UpdateData.ButtonTestMode == "SkipEmergencyButton" ||
|
|
|
+ UpdateData.SkipEmergencyButton))
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
@@ -142,26 +150,34 @@ namespace AwInitilizer.Procedure.ButtonStatusCheck
|
|
|
bool isAllMatched = true;
|
|
|
if (status != null)
|
|
|
{
|
|
|
- if (status.Button1 != 0)
|
|
|
- {
|
|
|
- Error = ErrorType.FirstButtonCheckFail;
|
|
|
- LogWriter.Log("Button1 status ERROR, unpress is expected", isError: true);
|
|
|
- //Logger.Print("Button1 status ERROR, unpress is expected", isError: true);
|
|
|
- isAllMatched = false;
|
|
|
+ if (UpdateData.ButtonTestMode != "SkipNormalButton")
|
|
|
+ {
|
|
|
+ if (status.Button1 != 0)
|
|
|
+ {
|
|
|
+ Error = ErrorType.FirstButtonCheckFail;
|
|
|
+ LogWriter.Log("Button1 status ERROR, unpress is expected", isError: true);
|
|
|
+ //Logger.Print("Button1 status ERROR, unpress is expected", isError: true);
|
|
|
+ isAllMatched = false;
|
|
|
+ }
|
|
|
+ if (status.Button2 != 0)
|
|
|
+ {
|
|
|
+ Error = ErrorType.SecondButtonCheckFail;
|
|
|
+ LogWriter.Log("Button2 status ERROR, unpress is expected", isError: true);
|
|
|
+ //Logger.Print("Button2 status ERROR, unpress is expected", isError: true);
|
|
|
+ isAllMatched = false;
|
|
|
+ }
|
|
|
}
|
|
|
- if (status.Button2 != 0)
|
|
|
- {
|
|
|
- Error = ErrorType.SecondButtonCheckFail;
|
|
|
- LogWriter.Log("Button2 status ERROR, unpress is expected", isError: true);
|
|
|
- //Logger.Print("Button2 status ERROR, unpress is expected", isError: true);
|
|
|
- isAllMatched = false;
|
|
|
- }
|
|
|
- if (status.EmergencyButton != 0)
|
|
|
- {
|
|
|
- Error = ErrorType.EmergencyButtonCheckFail;
|
|
|
- LogWriter.Log("EmergencyButton status ERROR, unpress is expected", isError: true);
|
|
|
- //Logger.Print("EmergencyButton status ERROR, unpress is expected", isError: true);
|
|
|
- isAllMatched = false;
|
|
|
+
|
|
|
+ if (UpdateData.ButtonTestMode != "SkipEmergencyButton" &&
|
|
|
+ !UpdateData.SkipEmergencyButton)
|
|
|
+ {
|
|
|
+ if (status.EmergencyButton != 0)
|
|
|
+ {
|
|
|
+ Error = ErrorType.EmergencyButtonCheckFail;
|
|
|
+ LogWriter.Log("EmergencyButton status ERROR, unpress is expected", isError: true);
|
|
|
+ //Logger.Print("EmergencyButton status ERROR, unpress is expected", isError: true);
|
|
|
+ isAllMatched = false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (isAllMatched)
|