Эх сурвалжийг харах

Z991239-1350 #comment 增加对gpio指示灯的控制

雷志明80280620 4 жил өмнө
parent
commit
a20732ef1f

+ 14 - 2
Module/mod_gpio/mod_gpio.cpp

@@ -663,8 +663,14 @@ bool CGpioEntity::SetOutDriving(GpioService_Set_Info req,OutDrivingInfo od, ULON
 		//如果关闭照明灯,以感知为准
 		if (pinSeq == m_headlightDevPort)
 			WritePin(pinSeq, m_bHeadLightFlag);
-		else
-			WritePin(pinSeq,false);
+		else {
+			if (pinSeq == 12) {
+				Dbg("off hspsanner.");
+				WritePin(25, false);
+			}
+			WritePin(pinSeq, false);
+		}
+			
 		return true;
 	}
 
@@ -677,6 +683,12 @@ bool CGpioEntity::SetOutDriving(GpioService_Set_Info req,OutDrivingInfo od, ULON
 			case SM_CALLTRIGGER:
 				{
 					LOG_TRACE("0.0 mode:output[%u]",doi.output);
+					Dbg("pinSeq=%u", pinSeq);
+					//if it is hspsanner
+					if (pinSeq == 12) {
+						Dbg("light hspsanner.");
+						WritePin(25, true);
+					}
 					WritePin(pinSeq,true);
 					break;
 				}