From 307d17935801671e62bf07864b08b88499a712db Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sat, 21 Oct 2023 12:56:43 +0800 Subject: [PATCH] update --- api/api.hpp | 3 ++- api/i_zcan_cmder.hpp | 8 ++++---- api/i_zcan_cmder_master.hpp | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/api/api.hpp b/api/api.hpp index be354f1..bf96cf1 100644 --- a/api/api.hpp +++ b/api/api.hpp @@ -5,4 +5,5 @@ #include "zi_motor.hpp" #include "zi_xymotor.hpp" #include "packet_interface.hpp" -#include "i_zcan_cmder.hpp" \ No newline at end of file +#include "i_zcan_cmder.hpp" +#include "i_zcan_cmder_master.hpp" \ No newline at end of file diff --git a/api/i_zcan_cmder.hpp b/api/i_zcan_cmder.hpp index 609e072..d7d7e4e 100644 --- a/api/i_zcan_cmder.hpp +++ b/api/i_zcan_cmder.hpp @@ -17,10 +17,10 @@ class IZcanCmderListener { class IZCanCmder { public: public: - virtual void registerListener(IZcanCmderListener *listener) = 0; - virtual void sendAck(zcr_cmd_header_t *rx_cmd_header, uint8_t *data, int32_t len) = 0; - virtual void sendAck(zcr_cmd_header_t *rx_cmd_header, int32_t *ackvar, uint8_t nack) = 0; - virtual void sendErrorAck(zcr_cmd_header_t *rx_cmd_header, int32_t errorcode) = 0; + virtual void registerListener(IZcanCmderListener *listener) = 0; + virtual int32_t sendAck(zcr_cmd_header_t *rx_cmd_header, uint8_t *data, int32_t len) = 0; + virtual int32_t sendAck(zcr_cmd_header_t *rx_cmd_header, int32_t *ackvar, int32_t nack) = 0; + virtual int32_t sendErrorAck(zcr_cmd_header_t *rx_cmd_header, int32_t errorcode) = 0; }; } // namespace iflytop \ No newline at end of file diff --git a/api/i_zcan_cmder_master.hpp b/api/i_zcan_cmder_master.hpp index 9b6147c..c1b0de4 100644 --- a/api/i_zcan_cmder_master.hpp +++ b/api/i_zcan_cmder_master.hpp @@ -15,7 +15,7 @@ using namespace zcr; class IZcanCmderMaster { public: - virtual int32_t sendCmd(int32_t cmdid, int32_t subcmdid, int32_t *param, size_t npara, int32_t *ack, size_t nack, int overtime_ms) = 0; + virtual int32_t sendCmd(int32_t cmdid, int32_t moduleid, int32_t *param, size_t npara, int32_t *ack, size_t nack, int overtime_ms) = 0; }; } // namespace iflytop \ No newline at end of file