|
|
@@ -645,29 +645,14 @@ int dev_sensor_init(GlobalDeviceManager *_globalDeviceManager)
|
|
|
{
|
|
|
int ret = 0;
|
|
|
|
|
|
- // 初始化modbus,搜寻子设备
|
|
|
- if (_globalDeviceManager->_global_device_info->product_type == 2 &&
|
|
|
- _globalDeviceManager->_global_device_info->product_pwr_type == 1)
|
|
|
- {
|
|
|
- ret = g_modbus_init(&_globalDeviceManager->sensor_modbus_manager,
|
|
|
- INTERL_485_SENSOR_MODBUS_PORT, // _globalSensorMangerTemp->sensor_port_name,
|
|
|
- INTERL_485_SENSOR_MODBUS_BAUD, // _globalSensorMangerTemp->sensor_baud,
|
|
|
- MASTER_MODE,
|
|
|
- 0,
|
|
|
- "sensor",
|
|
|
- 1);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
+ ret = g_modbus_init(&_globalDeviceManager->sensor_modbus_manager,
|
|
|
+ INTERL_SENSOR_MODBUS_PORT, // _globalSensorMangerTemp->sensor_port_name,
|
|
|
+ INTERL_SENSOR_MODBUS_BAUD, // _globalSensorMangerTemp->sensor_baud,
|
|
|
+ MASTER_MODE,
|
|
|
+ 0,
|
|
|
+ "sensor",
|
|
|
+ 1);
|
|
|
|
|
|
- ret = g_modbus_init(&_globalDeviceManager->sensor_modbus_manager,
|
|
|
- INTERL_SENSOR_MODBUS_PORT, // _globalSensorMangerTemp->sensor_port_name,
|
|
|
- INTERL_SENSOR_MODBUS_BAUD, // _globalSensorMangerTemp->sensor_baud,
|
|
|
- MASTER_MODE,
|
|
|
- 0,
|
|
|
- "sensor",
|
|
|
- 1);
|
|
|
- }
|
|
|
if (ret != 0)
|
|
|
{
|
|
|
log_e("sensor modbus init error.\n");
|