From 32753356b91c2a8f9fb352231826fce56260e78d Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sun, 2 Jun 2024 15:38:02 +0800 Subject: [PATCH] recode --- components/algorithm/pid_module.cpp | 68 --------- components/algorithm/pid_module.hpp | 54 ------- components/date/date_helper.cpp | 53 ------- components/date/date_helper.hpp | 9 -- components/errorcode/errorcode.hpp | 1 - components/flash/znvs_bak.cpp | 167 --------------------- components/flash/znvs_bak.hpp | 83 ---------- .../mini_servo_motor_ctrl_module.cpp | 2 +- .../scirpt_cmder_mini_servo_motor_ctrl_module.cpp | 7 - .../scirpt_cmder_mini_servo_motor_ctrl_module.hpp | 5 - .../step_motor_ctrl_module.cpp | 2 +- .../pid_module.cpp | 68 +++++++++ .../pid_module.hpp | 54 +++++++ .../water_cooling_temperature_control_module.hpp | 2 +- .../xy_robot_ctrl_module/xy_robot_ctrl_module.cpp | 2 +- 15 files changed, 126 insertions(+), 451 deletions(-) delete mode 100644 components/algorithm/pid_module.cpp delete mode 100644 components/algorithm/pid_module.hpp delete mode 100644 components/date/date_helper.cpp delete mode 100644 components/date/date_helper.hpp delete mode 100644 components/errorcode/errorcode.hpp delete mode 100644 components/flash/znvs_bak.cpp delete mode 100644 components/flash/znvs_bak.hpp delete mode 100644 components/mini_servo_motor/scirpt_cmder_mini_servo_motor_ctrl_module.cpp delete mode 100644 components/mini_servo_motor/scirpt_cmder_mini_servo_motor_ctrl_module.hpp create mode 100644 components/water_cooling_temperature_control_module/pid_module.cpp create mode 100644 components/water_cooling_temperature_control_module/pid_module.hpp diff --git a/components/algorithm/pid_module.cpp b/components/algorithm/pid_module.cpp deleted file mode 100644 index 2a3e44f..0000000 --- a/components/algorithm/pid_module.cpp +++ /dev/null @@ -1,68 +0,0 @@ - -#include "pid_module.hpp" - -using namespace iflytop; - -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define MAX(a, b) ((a) > (b) ? (a) : (b)) - -void PidModule::initialize(config_t *cfg) { - m_cfg.kp = cfg->kp; - m_cfg.ki = cfg->ki; - m_cfg.kd = cfg->kd; - m_cfg.max_output = cfg->max_output; - m_cfg.min_output = cfg->min_output; - m_cfg.max_integral = cfg->max_integral; - m_cfg.min_integral = cfg->min_integral; -} - -int32_t PidModule::reset() { - m_last_output = 0; - m_previous_err1 = 0; - m_integral_err = 0; - return 0; -} -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -float PidModule::pid_calc_positional(float error) { - float output = 0; - /* Add current error to the integral error */ - m_integral_err += error; - /* If the integral error is out of the range, it will be limited */ - m_integral_err = MIN(m_integral_err, m_cfg.max_integral); - m_integral_err = MAX(m_integral_err, m_cfg.min_integral); - - /* Calculate the pid control value by location formula */ - /* u(k) = e(k)*Kp + (e(k)-e(k-1))*Kd + integral*Ki */ - output = error * m_cfg.kp + (error - m_previous_err1) * m_cfg.kd + m_integral_err * m_cfg.ki; - - /* If the output is out of the range, it will be limited */ - output = MIN(output, m_cfg.max_output); - output = MAX(output, m_cfg.min_output); - - /* Update previous error */ - m_previous_err1 = error; - - return output; -} - -int32_t PidModule::compute(float input_error, float *ret_result) { - *ret_result = pid_calc_positional(input_error); - return 0; -} - -void PidModule::update_kp(float v) { m_cfg.kp = v; } -void PidModule::update_ki(float v) { m_cfg.ki = v; } -void PidModule::update_kd(float v) { m_cfg.kd = v; } -void PidModule::update_max_output(float v) { m_cfg.max_output = v; } -void PidModule::update_min_output(float v) { m_cfg.min_output = v; } -void PidModule::update_max_integral(float v) { m_cfg.max_integral = v; } -void PidModule::update_min_integral(float v) { m_cfg.min_integral = v; } - -PidModule::config_t *PidModule::get_cfg() { return &m_cfg; } - -float PidModule::get_integral_err() { return m_integral_err; } -void PidModule::set_integral_err(float v) { m_integral_err = v; } - - -float PidModule::get_output() { return m_last_output; } diff --git a/components/algorithm/pid_module.hpp b/components/algorithm/pid_module.hpp deleted file mode 100644 index 7a0f59b..0000000 --- a/components/algorithm/pid_module.hpp +++ /dev/null @@ -1,54 +0,0 @@ -#pragma once -#include - -#include - -#include "a8000_protocol\api\errorcode.hpp" - -namespace iflytop { -using namespace std; -class PidModule { - public: - typedef struct { - public: - float kp; // PID Kp parameter - float ki; // PID Ki parameter - float kd; // PID Kd parameter - float max_output; // PID maximum output limitation - float min_output; // PID minimum output limitation - float max_integral; // PID maximum integral value limitation - float min_integral; // PID minimum integral value limitation - } config_t; - - config_t m_cfg; - float m_last_output = 0; - float m_previous_err1 = 0; - float m_previous_err2 = 0; - float m_integral_err = 0; - - public: - void initialize(config_t *cfg); - - int32_t reset(); - int32_t compute(float input_error, float *ret_result); - - void update_kp(float v); - void update_ki(float v); - void update_kd(float v); - void update_max_output(float v); - void update_min_output(float v); - void update_max_integral(float v); - void update_min_integral(float v); - - float get_integral_err(); - float get_output(); - - config_t *get_cfg(); - - - void set_integral_err(float v); - - private: - float pid_calc_positional(float error); -}; -} // namespace iflytop diff --git a/components/date/date_helper.cpp b/components/date/date_helper.cpp deleted file mode 100644 index a8fd6e0..0000000 --- a/components/date/date_helper.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "date_helper.hpp" - -using namespace iflytop; -using namespace std; - -int DateHelper::getMaxDay(int year, int month) { - int daymax = 0; - switch (month) { - case 1: - daymax = 31; - break; - case 2: - if (year % 4 == 0) { - daymax = 29; - } else { - daymax = 28; - } - break; - case 3: - daymax = 31; - break; - case 4: - daymax = 30; - break; - case 5: - daymax = 31; - break; - case 6: - daymax = 30; - break; - case 7: - daymax = 31; - break; - case 8: - daymax = 31; - break; - case 9: - daymax = 30; - break; - case 10: - daymax = 31; - break; - case 11: - daymax = 30; - break; - case 12: - daymax = 31; - break; - default: - break; - } - return daymax; -} \ No newline at end of file diff --git a/components/date/date_helper.hpp b/components/date/date_helper.hpp deleted file mode 100644 index 35ee7e5..0000000 --- a/components/date/date_helper.hpp +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -namespace iflytop { -using namespace std; -class DateHelper { - public: - static int getMaxDay(int year, int month); -}; -} // namespace iflytop \ No newline at end of file diff --git a/components/errorcode/errorcode.hpp b/components/errorcode/errorcode.hpp deleted file mode 100644 index 58abe8a..0000000 --- a/components/errorcode/errorcode.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "a8000_protocol\api\errorcode.hpp" \ No newline at end of file diff --git a/components/flash/znvs_bak.cpp b/components/flash/znvs_bak.cpp deleted file mode 100644 index 8e33044..0000000 --- a/components/flash/znvs_bak.cpp +++ /dev/null @@ -1,167 +0,0 @@ -#if 0 - -#include "znvs.hpp" - -#include - -#include "sdk\components\flash\zsimple_flash.hpp" -#define TAG "config" - -#ifdef IFLYTOP_NVS_CONFIG_MAX_ITEM_NUM - - -using namespace iflytop; -using namespace std; -#define MARK_S 0x123456 -#define MARK_E 0x87654321 - -#define GET_CFG(typename) \ - cfg_t* cfg = get_cfg(key); \ - if (cfg == nullptr || cfg->type != kcfg_type_##typename) { \ - allocate_cfg(key, kcfg_type_##typename, (uint8_t*)&default_val, sizeof(default_val)); \ - cfg = get_cfg(key); \ - } \ - return *(typename*)cfg->val; - -#define SET_CFG(typename) \ - cfg_t* cfg = get_cfg(key); \ - if (cfg == nullptr || cfg->type != kcfg_type_##typename) { \ - allocate_cfg(key, kcfg_type_##typename, (uint8_t*)&val, sizeof(val)); \ - cfg = get_cfg(key); \ - } else { \ - *(typename*)cfg->val = val; \ - flush(); \ - } - -ZNVS& ZNVS::ins() { - static ZNVS instance; - return instance; -} -void ZNVS::initialize() { - zsimple_flash_init(IFLYTOP_NVS_CONFIG_FLASH_SECTOR); - zsimple_flash_read((uint8_t*)&m_cfg, sizeof(m_cfg)); - if (m_cfg.config_start != MARK_S || m_cfg.config_end != MARK_E) { - ZLOGW(TAG, "config uninitialized, initialize it"); - memset(&m_cfg, 0, sizeof(m_cfg)); - m_cfg.config_start = MARK_S; - m_cfg.config_end = MARK_E; - zsimple_flash_write((uint8_t*)&m_cfg, sizeof(m_cfg)); - } else { - ZLOGI(TAG, "config initialized"); - } -} - -void ZNVS::factory_reset() { - memset(&m_cfg, 0, sizeof(m_cfg)); - m_cfg.config_start = MARK_S; - m_cfg.config_end = MARK_E; - zsimple_flash_write((uint8_t*)&m_cfg, sizeof(m_cfg)); -} - -ZNVS::cfg_t* ZNVS::get_cfg(const char* key) { - for (int i = 0; i < IFLYTOP_NVS_CONFIG_MAX_ITEM_NUM; i++) { - if (strcmp(m_cfg.cfgs[i].key, key) == 0) { - return &m_cfg.cfgs[i]; - } - } - return nullptr; -} - -void ZNVS::allocate_cfg(const char* key, type_t type, uint8_t* default_val, uint8_t len) { - cfg_t* cfg = get_cfg(key); - for (int i = 0; i < IFLYTOP_NVS_CONFIG_MAX_ITEM_NUM; i++) { - if (m_cfg.cfgs[i].is_initialed == false) { - cfg = &m_cfg.cfgs[i]; - strcpy(cfg->key, key); - cfg->is_initialed = true; - cfg->type = (uint8_t)type; - memcpy(cfg->val, default_val, len); -#if 0 - /** - * @brief 刷新flash - * - * TODO:优化这里的代码,不要每次都刷新flash - */ - zsimple_flash_write((uint8_t*)&m_cfg, sizeof(m_cfg)); -#endif - break; - } - } -} - -ZNVS::cfg_t* ZNVS::get_and_create_cfg(const char* key, type_t type, uint8_t* default_val, uint8_t len) { - cfg_t* cfg = get_cfg(key); - if (cfg == nullptr) { - allocate_cfg(key, type, default_val, len); - cfg = get_cfg(key); - } - return cfg; -} - -void ZNVS::dumpcfg() { - ZLOGI(TAG, "=================dump nvs config =================="); - ZLOGI(TAG, "="); - for (int i = 0; i < IFLYTOP_NVS_CONFIG_MAX_ITEM_NUM; i++) { - if (m_cfg.cfgs[i].is_initialed) { - dumpcfg(&m_cfg.cfgs[i]); - } - } - ZLOGI(TAG, "============="); -} - -void ZNVS::dumpcfg(cfg_t* cfg) { - if (!cfg->is_initialed) return; - switch (cfg->type) { - case kcfg_type_int8_t: - ZLOGI(TAG, "= %s val:%d", cfg->key, *(int8_t*)cfg->val); - break; - case kcfg_type_int16_t: - ZLOGI(TAG, "= %s val:%d", cfg->key, *(int16_t*)cfg->val); - break; - case kcfg_type_int32_t: - ZLOGI(TAG, "= %s val:%d", cfg->key, *(int32_t*)cfg->val); - break; - - case kcfg_type_uint8_t: - ZLOGI(TAG, "= %s val:%u", cfg->key, *(int8_t*)cfg->val); - break; - case kcfg_type_uint16_t: - ZLOGI(TAG, "= %s val:%u", cfg->key, *(int16_t*)cfg->val); - break; - case kcfg_type_uint32_t: - ZLOGI(TAG, "= %s val:%u", cfg->key, *(int32_t*)cfg->val); - break; - case kcfg_type_float: - ZLOGI(TAG, "= %s val:%f", cfg->key, *(float*)cfg->val); - break; - case kcfg_type_bool: - ZLOGI(TAG, "= %s val:%d", cfg->key, *(bool*)cfg->val); - break; - default: - ZLOGI(TAG, "= %s val:unknow type", cfg->key); - break; - } - return; -} - -int8_t ZNVS::get_config_int8(const char* key, int8_t default_val) { GET_CFG(int8_t); } -void ZNVS::set_config_int8(const char* key, int8_t val) { SET_CFG(int8_t); } -uint8_t ZNVS::get_config_uint8(const char* key, uint8_t default_val) { GET_CFG(uint8_t); } -void ZNVS::set_config_uint8(const char* key, uint8_t val) { SET_CFG(uint8_t); } -int16_t ZNVS::get_config_int16(const char* key, int16_t default_val) { GET_CFG(int16_t); } -void ZNVS::set_config_int16(const char* key, int16_t val) { SET_CFG(int16_t); } -uint16_t ZNVS::get_config_uint16(const char* key, uint16_t default_val) { GET_CFG(uint16_t); } -void ZNVS::set_config_uint16(const char* key, uint16_t val) { SET_CFG(uint16_t); } -int32_t ZNVS::get_config_int32(const char* key, int32_t default_val) { GET_CFG(int32_t); } -void ZNVS::set_config_int32(const char* key, int32_t val) { SET_CFG(int32_t); } -uint32_t ZNVS::get_config_uint32(const char* key, uint32_t default_val) { GET_CFG(uint32_t); } -void ZNVS::set_config_uint32(const char* key, uint32_t val) { SET_CFG(uint32_t); } -float ZNVS::get_config_float(const char* key, float default_val) { GET_CFG(float); } -void ZNVS::set_config_float(const char* key, float val) { SET_CFG(float); } -bool ZNVS::get_config_bool(const char* key, bool default_val) { GET_CFG(bool); } -void ZNVS::set_config_bool(const char* key, bool val) { SET_CFG(bool); } - -void ZNVS::flush() { zsimple_flash_write((uint8_t*)&m_cfg, sizeof(m_cfg)); } - -#endif -#endif \ No newline at end of file diff --git a/components/flash/znvs_bak.hpp b/components/flash/znvs_bak.hpp deleted file mode 100644 index 79f57be..0000000 --- a/components/flash/znvs_bak.hpp +++ /dev/null @@ -1,83 +0,0 @@ -#pragma once -#if 0 -#include "project_configs.h" -#include "sdk/os/zos.hpp" - -#ifdef IFLYTOP_NVS_CONFIG_MAX_ITEM_NUM - -namespace iflytop { -using namespace std; - -class ZNVS { - typedef enum { - kcfg_type_int8_t, - kcfg_type_uint8_t, - kcfg_type_int16_t, - kcfg_type_uint16_t, - kcfg_type_int32_t, - kcfg_type_uint32_t, - kcfg_type_float, - kcfg_type_bool, - } type_t; - -#pragma pack(1) - typedef struct { - char key[64]; - uint8_t val[8]; - uint8_t type; - bool is_initialed; - } cfg_t; - - typedef struct { - uint32_t config_start; - cfg_t cfgs[IFLYTOP_NVS_CONFIG_MAX_ITEM_NUM]; - uint32_t config_end; - } config_t; -#pragma pack() - - config_t m_cfg; - - public: - static ZNVS& ins(); - - void initialize(); - void factory_reset(); - void dumpcfg(); - - void flush(); - - int8_t get_config_int8(const char* key, int8_t default_val); - void set_config_int8(const char* key, int8_t val); - - uint8_t get_config_uint8(const char* key, uint8_t default_val); - void set_config_uint8(const char* key, uint8_t val); - - int16_t get_config_int16(const char* key, int16_t default_val); - void set_config_int16(const char* key, int16_t val); - - uint16_t get_config_uint16(const char* key, uint16_t default_val); - void set_config_uint16(const char* key, uint16_t val); - - int32_t get_config_int32(const char* key, int32_t default_val); - void set_config_int32(const char* key, int32_t val); - - uint32_t get_config_uint32(const char* key, uint32_t default_val); - void set_config_uint32(const char* key, uint32_t val); - - float get_config_float(const char* key, float default_val); - void set_config_float(const char* key, float val); - - bool get_config_bool(const char* key, bool default_val); - void set_config_bool(const char* key, bool val); - - private: - void dumpcfg(cfg_t* cfg); - - cfg_t* get_cfg(const char* key); - void allocate_cfg(const char* key, type_t type, uint8_t* default_val, uint8_t len); - cfg_t* get_and_create_cfg(const char* key, type_t type, uint8_t* default_val, uint8_t len); -}; - -} // namespace iflytop -#endif -#endif \ No newline at end of file diff --git a/components/mini_servo_motor/mini_servo_motor_ctrl_module.cpp b/components/mini_servo_motor/mini_servo_motor_ctrl_module.cpp index e1d5944..66bfbfb 100644 --- a/components/mini_servo_motor/mini_servo_motor_ctrl_module.cpp +++ b/components/mini_servo_motor/mini_servo_motor_ctrl_module.cpp @@ -1,6 +1,6 @@ #include "mini_servo_motor_ctrl_module.hpp" -#include "sdk\components\errorcode\errorcode.hpp" +#include "a8000_protocol\api\errorcode.hpp" using namespace iflytop; using namespace std; #define TAG "MiniRobotCtrlModule" diff --git a/components/mini_servo_motor/scirpt_cmder_mini_servo_motor_ctrl_module.cpp b/components/mini_servo_motor/scirpt_cmder_mini_servo_motor_ctrl_module.cpp deleted file mode 100644 index 2c31844..0000000 --- a/components/mini_servo_motor/scirpt_cmder_mini_servo_motor_ctrl_module.cpp +++ /dev/null @@ -1,7 +0,0 @@ - -#include "scirpt_cmder_mini_servo_motor_ctrl_module.hpp" - -#include -#if 0 - -#endif \ No newline at end of file diff --git a/components/mini_servo_motor/scirpt_cmder_mini_servo_motor_ctrl_module.hpp b/components/mini_servo_motor/scirpt_cmder_mini_servo_motor_ctrl_module.hpp deleted file mode 100644 index 510e690..0000000 --- a/components/mini_servo_motor/scirpt_cmder_mini_servo_motor_ctrl_module.hpp +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once -#include -#if 0 - -#endif \ No newline at end of file diff --git a/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp b/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp index 9a0372d..39b675b 100644 --- a/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp +++ b/components/step_motor_ctrl_module/step_motor_ctrl_module.cpp @@ -3,7 +3,7 @@ #include #include -#include "sdk/components/errorcode/errorcode.hpp" +#include "a8000_protocol\api\errorcode.hpp" #include "sdk\components\flash\znvs.hpp" using namespace iflytop; #define TAG "SMCM" diff --git a/components/water_cooling_temperature_control_module/pid_module.cpp b/components/water_cooling_temperature_control_module/pid_module.cpp new file mode 100644 index 0000000..2a3e44f --- /dev/null +++ b/components/water_cooling_temperature_control_module/pid_module.cpp @@ -0,0 +1,68 @@ + +#include "pid_module.hpp" + +using namespace iflytop; + +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + +void PidModule::initialize(config_t *cfg) { + m_cfg.kp = cfg->kp; + m_cfg.ki = cfg->ki; + m_cfg.kd = cfg->kd; + m_cfg.max_output = cfg->max_output; + m_cfg.min_output = cfg->min_output; + m_cfg.max_integral = cfg->max_integral; + m_cfg.min_integral = cfg->min_integral; +} + +int32_t PidModule::reset() { + m_last_output = 0; + m_previous_err1 = 0; + m_integral_err = 0; + return 0; +} +#define MAX(a,b) ((a) > (b) ? (a) : (b)) +#define MIN(a,b) ((a) < (b) ? (a) : (b)) +float PidModule::pid_calc_positional(float error) { + float output = 0; + /* Add current error to the integral error */ + m_integral_err += error; + /* If the integral error is out of the range, it will be limited */ + m_integral_err = MIN(m_integral_err, m_cfg.max_integral); + m_integral_err = MAX(m_integral_err, m_cfg.min_integral); + + /* Calculate the pid control value by location formula */ + /* u(k) = e(k)*Kp + (e(k)-e(k-1))*Kd + integral*Ki */ + output = error * m_cfg.kp + (error - m_previous_err1) * m_cfg.kd + m_integral_err * m_cfg.ki; + + /* If the output is out of the range, it will be limited */ + output = MIN(output, m_cfg.max_output); + output = MAX(output, m_cfg.min_output); + + /* Update previous error */ + m_previous_err1 = error; + + return output; +} + +int32_t PidModule::compute(float input_error, float *ret_result) { + *ret_result = pid_calc_positional(input_error); + return 0; +} + +void PidModule::update_kp(float v) { m_cfg.kp = v; } +void PidModule::update_ki(float v) { m_cfg.ki = v; } +void PidModule::update_kd(float v) { m_cfg.kd = v; } +void PidModule::update_max_output(float v) { m_cfg.max_output = v; } +void PidModule::update_min_output(float v) { m_cfg.min_output = v; } +void PidModule::update_max_integral(float v) { m_cfg.max_integral = v; } +void PidModule::update_min_integral(float v) { m_cfg.min_integral = v; } + +PidModule::config_t *PidModule::get_cfg() { return &m_cfg; } + +float PidModule::get_integral_err() { return m_integral_err; } +void PidModule::set_integral_err(float v) { m_integral_err = v; } + + +float PidModule::get_output() { return m_last_output; } diff --git a/components/water_cooling_temperature_control_module/pid_module.hpp b/components/water_cooling_temperature_control_module/pid_module.hpp new file mode 100644 index 0000000..7a0f59b --- /dev/null +++ b/components/water_cooling_temperature_control_module/pid_module.hpp @@ -0,0 +1,54 @@ +#pragma once +#include + +#include + +#include "a8000_protocol\api\errorcode.hpp" + +namespace iflytop { +using namespace std; +class PidModule { + public: + typedef struct { + public: + float kp; // PID Kp parameter + float ki; // PID Ki parameter + float kd; // PID Kd parameter + float max_output; // PID maximum output limitation + float min_output; // PID minimum output limitation + float max_integral; // PID maximum integral value limitation + float min_integral; // PID minimum integral value limitation + } config_t; + + config_t m_cfg; + float m_last_output = 0; + float m_previous_err1 = 0; + float m_previous_err2 = 0; + float m_integral_err = 0; + + public: + void initialize(config_t *cfg); + + int32_t reset(); + int32_t compute(float input_error, float *ret_result); + + void update_kp(float v); + void update_ki(float v); + void update_kd(float v); + void update_max_output(float v); + void update_min_output(float v); + void update_max_integral(float v); + void update_min_integral(float v); + + float get_integral_err(); + float get_output(); + + config_t *get_cfg(); + + + void set_integral_err(float v); + + private: + float pid_calc_positional(float error); +}; +} // namespace iflytop diff --git a/components/water_cooling_temperature_control_module/water_cooling_temperature_control_module.hpp b/components/water_cooling_temperature_control_module/water_cooling_temperature_control_module.hpp index ba04c34..ddd2639 100644 --- a/components/water_cooling_temperature_control_module/water_cooling_temperature_control_module.hpp +++ b/components/water_cooling_temperature_control_module/water_cooling_temperature_control_module.hpp @@ -22,7 +22,7 @@ #include "sdk\components\api\zi_pwm_fan_ctrl_module.hpp" #include "sdk\components\api\zi_pwm_pump_ctrl_module.hpp" // -#include "sdk\components\algorithm\pid_module.hpp" +#include "pid_module.hpp" #include "sdk\components\api\zi_temperature_sensor.hpp" #include "sdk\components\ti\drv8710.hpp" #include "a8000_protocol\api\zi_module.hpp" diff --git a/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp b/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp index 326cf7a..a8cf034 100644 --- a/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp +++ b/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp @@ -2,7 +2,7 @@ #include -#include "sdk/components/errorcode/errorcode.hpp" +#include "a8000_protocol\api\errorcode.hpp" #include "sdk\components\flash\znvs.hpp" using namespace iflytop; using namespace std;