|
|
|
@ -3131,8 +3131,6 @@ void CPhoneDevice::UpdateSimcard(const std::string& simcard)
|
|
|
|
|
m_simcard = simcard;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceTail, SENSOR_PARAM *sensorParam)
|
|
|
|
|
{
|
|
|
|
|
Collect_sensor_data(); //15s
|
|
|
|
@ -3216,13 +3214,13 @@ bool CPhoneDevice::OpenSensors(int sensortype)
|
|
|
|
|
GpioControl::set12VEnable(true);
|
|
|
|
|
GpioControl::setCam3V3Enable(true);
|
|
|
|
|
GpioControl::setRS485Enable(true);
|
|
|
|
|
GpioControl::setInt(CMD_SET_485_ENABLE, 1); // 打开RS485电源
|
|
|
|
|
GpioControl::setInt(CMD_SET_485_EN_STATE, 1); // 打开RS485电源
|
|
|
|
|
}
|
|
|
|
|
if(sensortype == CAMERA_SENSOR_OPEN)
|
|
|
|
|
{
|
|
|
|
|
GpioControl::setInt(CMD_SET_PIC1_POWER, 1);
|
|
|
|
|
GpioControl::setInt(CMD_SET_485_en4, 1);
|
|
|
|
|
GpioControl::setInt(CMD_SET_3V3_PWR_ENABLE, 1); // 打开3.3V电压
|
|
|
|
|
GpioControl::setInt(CMD_SET_CAM_3V3_EN_STATE, 1); // 打开3.3V电压
|
|
|
|
|
GpioControl::setInt(CMD_SET_PTZ_PWR_ENABLE, 1);
|
|
|
|
|
}
|
|
|
|
|
if(sensortype == WEATHER_SENSOR_OPEN || sensortype == ICETHICK_SENSOR_OPEN)
|
|
|
|
@ -3253,14 +3251,14 @@ bool CPhoneDevice::CloseSensors(int sensortype)
|
|
|
|
|
GpioControl::set12VEnable(false);
|
|
|
|
|
GpioControl::setCam3V3Enable(false);
|
|
|
|
|
GpioControl::setRS485Enable(false);
|
|
|
|
|
GpioControl::setInt(CMD_SET_485_ENABLE, 0);
|
|
|
|
|
GpioControl::setInt(CMD_SET_485_EN_STATE, 0);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(sensortype == CAMERA_SENSOR_OPEN)
|
|
|
|
|
{
|
|
|
|
|
GpioControl::setInt(CMD_SET_PIC1_POWER, 0);
|
|
|
|
|
GpioControl::setInt(CMD_SET_485_en4, 0);
|
|
|
|
|
GpioControl::setInt(CMD_SET_3V3_PWR_ENABLE, 0);
|
|
|
|
|
GpioControl::setInt(CMD_SET_CAM_3V3_EN_STATE, 0);
|
|
|
|
|
GpioControl::setInt(CMD_SET_PTZ_PWR_ENABLE, 0);
|
|
|
|
|
}
|
|
|
|
|
if(sensortype == WEATHER_SENSOR_OPEN || sensortype == ICETHICK_SENSOR_OPEN)
|
|
|
|
@ -3281,4 +3279,4 @@ bool CPhoneDevice::CloseSensors(int sensortype)
|
|
|
|
|
GpioControl::setInt(CMD_SET_485_en2, 0);
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|