给vehicle发送给自动驾驶工控机上电不成功问题

问题:

以前驾驶舱给vehicle发送上强电命令,但是自动驾驶工控机没有上电(风扇没动),多次发送也不管用。

分析:

分析vehicle代码,里面的逻辑存在问题,原来的逻辑就没有接管的状态下给自动驾驶工控机上电的功能,原来的逻辑是先判断下底盘的上电状体,再根据相应的状态执行相应的命令,因为原来就是上强电的状态,所以无论如何也进入不了工控机上电状态(0x03)

	ret = json_object_object_get_ex(m_object , "requestPowerState" , &temp_object);
	if(ret && (NULL != temp_object)){
		pduControlPowerCmd = json_object_get_double(temp_object);
		print_log("requestPowerState = %d\r\n", pduControlPowerCmd);
		if(poweroffIndicate == 0){
			CanOperateSwitch = CAN_SEND_ENABLE;
			if((pduControlPowerCmd == IG_ON) || (pduControlPowerCmd == POWER_ON) || (pduControlPowerCmd == AUTO_ON)){
				if(poweroffIndicate == 0){
					//add 20190713
					print_log("last time poweroff procedure completed, now do IG_ON, POWER_ON or AUTO_ON\r\n");
					if(vcuPowerRelayState == IG_OFF){
						print_log("+++0 vehicle current powerState is IG_OFF, now IG_ON\r\n");
						mPowerCmd = IG_ON;
						powerOnFlag = 1;
						if(currentControlMode == PARA

你可能感兴趣的:(无人车)