zhaohe 1 year ago
parent
commit
a722a37611
  1. 2
      README.md
  2. 2
      iflytop_canbus_protocol
  3. 2
      usrc/project_configs.h
  4. 8
      usrc/protocol_impl/protocol_impl_service.cpp

2
README.md

@ -8,4 +8,6 @@
完成需求
V3:
1.当控制电机时,会重置电机异常标志位
V4:
1.去掉压力传感器传感器信息自动上报
```

2
iflytop_canbus_protocol

@ -1 +1 @@
Subproject commit 702ffbcb82fa62e2cef6621ac49ede8f913273c8
Subproject commit 0e47768d3761fa4926957ad385416dc9410861bc

2
usrc/project_configs.h

@ -9,7 +9,7 @@
* @brief
*
*/
#define SOFTWARE_VERSION 3
#define SOFTWARE_VERSION 4
#define HARDWARE_VERSION 1
#define PROJECT "dbdb_liquid_path_control"
#define SN_HEADER "SN"

8
usrc/protocol_impl/protocol_impl_service.cpp

@ -309,8 +309,8 @@ static void others_func_impl(uint8_t from, uint8_t to, uint8_t* rawpacket, size_
} else {
zcanbus_send_errorack(packet, kerr_subdevice_offline);
}
}
#if 0
// 压力传感器数据上报
else if (packet->function_id == kcmd_pressure_sensor_bus_set_report_period_ms) {
CHECK_PARAM_LEN(paramNum, 1);
@ -329,6 +329,7 @@ static void others_func_impl(uint8_t from, uint8_t to, uint8_t* rawpacket, size_
zcanbus_send_ack(packet, NULL, 0);
}
#endif
}
/***********************************************************************************************************************
@ -358,7 +359,7 @@ static void zcanbus_on_connected(bool connected) {
ZLOGI(TAG, "disconnected from host");
}
}
#if 0
static void onPressureSensorDataReportTimer(void const* argument) {
// 压力传感器数据上报
static uint8_t reportcache[100];
@ -381,6 +382,7 @@ static void onPressureSensorDataReportTimer(void const* argument) {
zcanbus_send_report(kreport_pressure_data, (uint8_t*)report, //
sizeof(report_pressure_data_t) + sensorNum * sizeof(report->data[0]), 10);
}
#endif
static void onMotorMonitorTimer(void const* argument) {
// 电机异常检查
@ -437,9 +439,11 @@ void protocol_impl_service_init() { //
zcanbus_reglistener(zcanbus_on_rx);
zcanbus_reg_on_connected_listener(zcanbus_on_connected);
#if 0
osTimerDef(PressureSensorDataReportTimer, onPressureSensorDataReportTimer);
PressureSensorDataReportTimerId = osTimerCreate(osTimer(PressureSensorDataReportTimer), osTimerPeriodic, NULL);
osTimerStart(PressureSensorDataReportTimerId, m_pressureSensorDataReportPeriodMs);
#endif
osTimerDef(MotorMonitorTimer, onMotorMonitorTimer);
MotorMonitorTimerId = osTimerCreate(osTimer(MotorMonitorTimer), osTimerPeriodic, NULL);

Loading…
Cancel
Save