diff --git a/usrc/apphal/apphal.cpp b/uappbase/apphal/apphal.cpp similarity index 100% rename from usrc/apphal/apphal.cpp rename to uappbase/apphal/apphal.cpp diff --git a/usrc/apphal/apphal.hpp b/uappbase/apphal/apphal.hpp similarity index 92% rename from usrc/apphal/apphal.hpp rename to uappbase/apphal/apphal.hpp index 8f4e552..f789e55 100644 --- a/usrc/apphal/apphal.hpp +++ b/uappbase/apphal/apphal.hpp @@ -1,5 +1,5 @@ #pragma once -#include "uappbase/base.hpp" +#include "uappbase/appdep.hpp" namespace iflytop { class AppHal { private: diff --git a/uappbase/base.hpp b/uappbase/base.hpp index 5d8d354..8fb4488 100644 --- a/uappbase/base.hpp +++ b/uappbase/base.hpp @@ -7,3 +7,4 @@ #include "service/app_event_bus.hpp" #include "service/gstate_mgr.hpp" #include "service/config_service.hpp" +#include "apphal/apphal.hpp" diff --git a/uappbase/service/config_service.cpp b/uappbase/service/config_service.cpp index c4f1776..0e861d1 100644 --- a/uappbase/service/config_service.cpp +++ b/uappbase/service/config_service.cpp @@ -42,7 +42,6 @@ typedef struct { #define CHECKSUM() checksum((uint8_t *)&(cfgcache.cfg[0].str[0]), sizeof(cfgcache) - 8) static config_data_t cfgcache; -static M24M02_I2C_EEPROM *eeprom; static int32_t checksum(uint8_t *data, int32_t n) { int32_t sum = 0; @@ -52,10 +51,13 @@ static int32_t checksum(uint8_t *data, int32_t n) { return sum; } -bool ConfigService::initialize(M24M02_I2C_EEPROM *_eeprom) { +bool ConfigService::initialize() { mutex.init(); - eeprom = _eeprom; + AppHal::MX_I2C1_Init(); + eeprom.initialize(&hi2c1); + + static_assert(kcfg_max == CFG_MAX_INDEX, ""); if (!checkcfg()) { ZLOGI(TAG, "cfg check fail,init cfg"); @@ -68,7 +70,7 @@ bool ConfigService::initialize(M24M02_I2C_EEPROM *_eeprom) { } cfgcache.checksum = CHECKSUM(); - eeprom->write(CONFIG_EEPROM_ADD, (uint8_t *)&cfgcache, sizeof(cfgcache)); + eeprom.write(CONFIG_EEPROM_ADD, (uint8_t *)&cfgcache, sizeof(cfgcache)); flashall(); } bool suc = checkcfg(); @@ -174,7 +176,7 @@ const char *ConfigService::_getcfg(config_index_t index, CfgItermCache *cache) { } bool ConfigService::checkcfg() { - eeprom->read(CONFIG_EEPROM_ADD, (uint8_t *)&cfgcache, sizeof(cfgcache)); + eeprom.read(CONFIG_EEPROM_ADD, (uint8_t *)&cfgcache, sizeof(cfgcache)); int32_t checksumval = CHECKSUM(); @@ -187,10 +189,10 @@ bool ConfigService::checkcfg() { bool ConfigService::flashIndex(int32_t index) { // for (int i = 0; i < sizeof(cfg_content_t); i += 4) { // uint32_t wdata = cfgcache.cfg[index].u32s[i / 4]; - // eeprom->write32(TO_EEPROM_ADD(index) + i, wdata); + // eeprom.write32(TO_EEPROM_ADD(index) + i, wdata); // } - eeprom->write(TO_EEPROM_ADD(index), (uint8_t *)&cfgcache.cfg[index], sizeof(cfg_content_t)); - eeprom->write32(CONFIG_EEPROM_ADD + 4 * 1, (uint32_t)cfgcache.checksum); + eeprom.write(TO_EEPROM_ADD(index), (uint8_t *)&cfgcache.cfg[index], sizeof(cfg_content_t)); + eeprom.write32(CONFIG_EEPROM_ADD + 4 * 1, (uint32_t)cfgcache.checksum); return true; } -bool ConfigService::flashall() { eeprom->write(CONFIG_EEPROM_ADD, (uint8_t *)&cfgcache, sizeof(cfgcache)); } +bool ConfigService::flashall() { eeprom.write(CONFIG_EEPROM_ADD, (uint8_t *)&cfgcache, sizeof(cfgcache)); } diff --git a/uappbase/service/config_service.hpp b/uappbase/service/config_service.hpp index 504e9bc..ec41dbb 100644 --- a/uappbase/service/config_service.hpp +++ b/uappbase/service/config_service.hpp @@ -1,9 +1,10 @@ #pragma once #include "../appdep.hpp" +#include "config_index.hpp" #include "uappbase/appcfg/appcfg.hpp" #include "uappbase/bean/bean.hpp" #include "ucomponents/eeprom/m24m02_i2c_eeprom.hpp" -#include "config_index.hpp" +#include "uappbase/apphal/apphal.hpp" namespace iflytop { using namespace std; @@ -19,7 +20,8 @@ struct CfgItermCache { class ConfigService { private: /* data */ - zmutex mutex; + zmutex mutex; + M24M02_I2C_EEPROM eeprom; public: static ConfigService* ins() { @@ -27,7 +29,7 @@ class ConfigService { return &instance; } - bool initialize(M24M02_I2C_EEPROM* _eeprom); + bool initialize(); void setcfgAndFlush(config_index_t index, const char* val); void setcfgAndFlush(config_index_t index, int32_t val); diff --git a/usrc/apphal/apphardware.cpp b/usrc/apphardware/apphardware.cpp similarity index 98% rename from usrc/apphal/apphardware.cpp rename to usrc/apphardware/apphardware.cpp index 34a00b9..efdc31a 100644 --- a/usrc/apphal/apphardware.cpp +++ b/usrc/apphardware/apphardware.cpp @@ -75,5 +75,5 @@ void AppHardware::initialize() { IO_OUT2.setState(false); // ZCAN1::ins()->init(); - eeprom.initialize(&hi2c1); + } \ No newline at end of file diff --git a/usrc/apphal/apphardware.hpp b/usrc/apphardware/apphardware.hpp similarity index 95% rename from usrc/apphal/apphardware.hpp rename to usrc/apphardware/apphardware.hpp index 9dcbd85..2321a16 100644 --- a/usrc/apphal/apphardware.hpp +++ b/usrc/apphardware/apphardware.hpp @@ -1,11 +1,10 @@ #pragma once -#include "apphal.hpp" +#include "uappbase/base.hpp" namespace iflytop { class AppHardware { private: /* data */ public: - M24M02_I2C_EEPROM eeprom; TMC51X0 MOTO1; TMC51X0 MOTO2; TMC51X0 MOTO3; diff --git a/usrc/service/app_core.cpp b/usrc/service/app_core.cpp index 7aad29b..7c70824 100644 --- a/usrc/service/app_core.cpp +++ b/usrc/service/app_core.cpp @@ -3,10 +3,10 @@ #include #include +#include "service/front_end_controler.hpp" #include "service/pump_ctrl_service.hpp" #include "service/remote_controler.hpp" #include "service/remote_controler_event_processer.hpp" -#include "service/ui_scheduler.hpp" // #include "service/page/page.hpp" @@ -50,30 +50,32 @@ void AppCore::appsetup() { /*********************************************************************************************************************** * INIT * ***********************************************************************************************************************/ - AppHardware::ins()->initialize(); + ConfigService::ins()->initialize(); - ConfigService::ins()->initialize(&AppHardware::ins()->eeprom); - UIScheduler::ins()->initialize(); + // hardInit + AppHardware::ins()->initialize(); // 基础硬件初始化 + RemoteControlerUpper::ins()->initialize(); // 遥控器初始化 + FrontEndControler::ins()->initialize(); // 前端控制器,对屏幕的消息进行解析,发送消息给屏幕 + + // BaseServiceInit // - RCTRL->initialize(); // 遥控器初始化 Page_login::ins()->initialize(); // Page_main::ins()->initialize(); // Page_keybAcidCh::ins()->initialize(); Page_muAcidType::ins()->initialize(); - // MenuPageMgrService::ins()->initialize(); // /*********************************************************************************************************************** * REG_EVENT_HANDLER * ***********************************************************************************************************************/ - RCTRL->regOnReport([](uint8_t* rx, int32_t len) { // + RemoteControlerUpper::ins()->regOnReport([](uint8_t* rx, int32_t len) { // ZLOGI(TAG, "[RCTRL] on event:%s", zhex2str(rx, len)); }); /*********************************************************************************************************************** * START * ***********************************************************************************************************************/ - UIScheduler::ins()->startSchedule(); + FrontEndControler::ins()->startSchedule(); RCTRL->startSchedule(); // dim diff --git a/usrc/service/app_core.hpp b/usrc/service/app_core.hpp index 55d8232..573a930 100644 --- a/usrc/service/app_core.hpp +++ b/usrc/service/app_core.hpp @@ -1,6 +1,6 @@ #pragma once -#include "apphal/apphal.hpp" +#include "apphardware/apphardware.hpp" #include "uappbase/base.hpp" namespace iflytop { diff --git a/usrc/service/ui_scheduler.cpp b/usrc/service/front_end_controler.cpp similarity index 86% rename from usrc/service/ui_scheduler.cpp rename to usrc/service/front_end_controler.cpp index deb75d1..664be0d 100644 --- a/usrc/service/ui_scheduler.cpp +++ b/usrc/service/front_end_controler.cpp @@ -1,4 +1,4 @@ -#include "ui_scheduler.hpp" +#include "front_end_controler.hpp" #include #include @@ -31,7 +31,7 @@ static const char* zhex2str(uint8_t* data, size_t len) { return buf; } -void UIScheduler::initialize() { // +void FrontEndControler::initialize() { // ackQueue.initialize(5, sizeof(tjc_rx_packet_t)); eventQueue.initialize(5, sizeof(tjc_rx_packet_t)); usartRxThread.init("usartRxThread", 1024); @@ -41,7 +41,7 @@ void UIScheduler::initialize() { // m_cmdlock.init(); } #define UART_RX_OVERTIME 5 -void UIScheduler::startSchedule() { +void FrontEndControler::startSchedule() { usartRxThread.start([this]() { static uint8_t rxbuf[128]; tjcUart->USR_UartITRxing = 1; @@ -113,7 +113,7 @@ void UIScheduler::startSchedule() { // GVAR_triBId // GVAR_triPageId -void UIScheduler::processScreenRxPacket(uint8_t* data, size_t len) { +void FrontEndControler::processScreenRxPacket(uint8_t* data, size_t len) { // 判断包是否合法 #if DEBUG ZLOGI(TAG, "[rx-thread] : rx :%s(%d)", zhex2str(data, len), len); @@ -150,7 +150,7 @@ void UIScheduler::processScreenRxPacket(uint8_t* data, size_t len) { } } -void UIScheduler::regOnUsrEventCb(on_usr_event_cb_t cb) { +void FrontEndControler::regOnUsrEventCb(on_usr_event_cb_t cb) { m_cb[m_ncb] = cb; m_ncb++; } @@ -166,7 +166,7 @@ static const char* zcpystr(char* cpyto, const char* strbegin, int32_t maxlen) { } return NULL; } -void UIScheduler::processUsrButtonEvent(uint8_t* data, size_t len) { +void FrontEndControler::processUsrButtonEvent(uint8_t* data, size_t len) { /** * @brief * 指令格式: @@ -188,7 +188,7 @@ void UIScheduler::processUsrButtonEvent(uint8_t* data, size_t len) { callUsrEventCb(&event_cache); } -void UIScheduler::processUsrDoubleStateButtonEvent(uint8_t* data, size_t len) { +void FrontEndControler::processUsrDoubleStateButtonEvent(uint8_t* data, size_t len) { /** * @brief * 指令格式: @@ -212,13 +212,13 @@ void UIScheduler::processUsrDoubleStateButtonEvent(uint8_t* data, size_t len) { callUsrEventCb(&event_cache); } -void UIScheduler::callUsrEventCb(tjc::tjc_usr_event_t* event) { +void FrontEndControler::callUsrEventCb(tjc::tjc_usr_event_t* event) { for (int32_t i = 0; i < m_ncb; i++) { m_cb[i](event); } } -void UIScheduler::processUsrKeyboardConfirmEvent(uint8_t* data, size_t len) { +void FrontEndControler::processUsrKeyboardConfirmEvent(uint8_t* data, size_t len) { /** * @brief * @@ -241,7 +241,7 @@ void UIScheduler::processUsrKeyboardConfirmEvent(uint8_t* data, size_t len) { callUsrEventCb(&event_cache); } -void UIScheduler::processLoginRequestEvent(uint8_t* data, size_t len) { +void FrontEndControler::processLoginRequestEvent(uint8_t* data, size_t len) { /* * printh AE * prints dp,1 @@ -265,7 +265,7 @@ void UIScheduler::processLoginRequestEvent(uint8_t* data, size_t len) { callUsrEventCb(&event_cache); } -bool UIScheduler::readTxt(uint8_t pid, uint8_t cId, char* txt, int32_t txtbuflen) { +bool FrontEndControler::readTxt(uint8_t pid, uint8_t cId, char* txt, int32_t txtbuflen) { zlock_guard lg(m_cmdlock); startReceiveAck(); @@ -289,7 +289,7 @@ bool UIScheduler::readTxt(uint8_t pid, uint8_t cId, char* txt, int32_t txtbuflen memcpy(txt, &ackcache.data[1], cpysize); return true; } -bool UIScheduler::readInt(uint8_t pid, uint8_t cId, int32_t* val) { +bool FrontEndControler::readInt(uint8_t pid, uint8_t cId, int32_t* val) { zlock_guard lg(m_cmdlock); startReceiveAck(); @@ -311,7 +311,7 @@ bool UIScheduler::readInt(uint8_t pid, uint8_t cId, int32_t* val) { return true; } -bool UIScheduler::setVal(uint8_t pid, uint8_t bid, const char* txt, ...) { +bool FrontEndControler::setVal(uint8_t pid, uint8_t bid, const char* txt, ...) { zlock_guard lg(m_cmdlock); va_list args; @@ -323,18 +323,18 @@ bool UIScheduler::setVal(uint8_t pid, uint8_t bid, const char* txt, ...) { sendcmd("p[%d].b[%d].txt=\"%s\"", pid, bid, buf); return true; } -bool UIScheduler::setVal(uint8_t pid, uint8_t cid, int32_t val) { +bool FrontEndControler::setVal(uint8_t pid, uint8_t cid, int32_t val) { zlock_guard lg(m_cmdlock); sendcmd("p[%d].b[%d].val=%d", pid, cid, val); return true; } -bool UIScheduler::vis(uint16_t buuid, int32_t val) { +bool FrontEndControler::vis(uint16_t buuid, int32_t val) { zlock_guard lg(m_cmdlock); sendcmd("vis %d,%d", buuid & 0xff, val); return true; } -void UIScheduler::alert(const char* info, ...) { +void FrontEndControler::alert(const char* info, ...) { zlock_guard lg(m_cmdlock); va_list args; @@ -346,9 +346,9 @@ void UIScheduler::alert(const char* info, ...) { sendcmd("p[%d].b[%d].txt=\"%s\"", pg_alert, ob_alert_info, buf); sendcmd("page alert"); } -void UIScheduler::chpage(uint8_t page) { sendcmd("page %d", page); } +void FrontEndControler::chpage(uint8_t page) { sendcmd("page %d", page); } -void UIScheduler::sendcmd(const char* format, ...) { +void FrontEndControler::sendcmd(const char* format, ...) { static char buf[128]; va_list args; va_start(args, format); @@ -374,23 +374,23 @@ void UIScheduler::sendcmd(const char* format, ...) { } } -void UIScheduler::startReceiveAck() { +void FrontEndControler::startReceiveAck() { ackQueue.clear(); m_isWaitingForAck = true; } -void UIScheduler::virtualClick(uint8_t pid, uint8_t bid, uint8_t event) { +void FrontEndControler::virtualClick(uint8_t pid, uint8_t bid, uint8_t event) { zlock_guard lg(m_cmdlock); sendcmd("click b[%d],%d", bid, event); } -void UIScheduler::setTouchEnableState(uint8_t bid, uint8_t enable) { +void FrontEndControler::setTouchEnableState(uint8_t bid, uint8_t enable) { // tsw obj,state zlock_guard lg(m_cmdlock); sendcmd("tsw b[%d],%d", bid, enable); } -void UIScheduler::setEnumComponentState(uint8_t pid, uint8_t bid, int32_t state) { +void FrontEndControler::setEnumComponentState(uint8_t pid, uint8_t bid, int32_t state) { // 枚举类型使用动画组件 sendcmd("p[%d].b[%d].tim=%d", pid, bid, state * 50); } diff --git a/usrc/service/ui_scheduler.hpp b/usrc/service/front_end_controler.hpp similarity index 90% rename from usrc/service/ui_scheduler.hpp rename to usrc/service/front_end_controler.hpp index 6ff82fd..a885788 100644 --- a/usrc/service/ui_scheduler.hpp +++ b/usrc/service/front_end_controler.hpp @@ -1,6 +1,5 @@ #pragma once -#include "apphal/apphal.hpp" -#include "apphal/apphardware.hpp" +#include "apphardware/apphardware.hpp" #include "uappbase/base.hpp" // @@ -15,8 +14,8 @@ typedef struct { typedef std::function on_usr_event_cb_t; -#define UIS UIScheduler::ins() -class UIScheduler { +#define UIS FrontEndControler::ins() +class FrontEndControler { ZThread m_thread; tjc_rx_packet_t ackcache; @@ -30,11 +29,11 @@ class UIScheduler { int32_t m_ncb = 0; public: - UIScheduler() {}; - ~UIScheduler() {}; + FrontEndControler() {}; + ~FrontEndControler() {}; - static UIScheduler* ins() { - static UIScheduler instance; + static FrontEndControler* ins() { + static FrontEndControler instance; return &instance; } diff --git a/usrc/service/page/page_processer.hpp b/usrc/service/page/page_processer.hpp index 5082b1d..9a657d1 100644 --- a/usrc/service/page/page_processer.hpp +++ b/usrc/service/page/page_processer.hpp @@ -1,7 +1,7 @@ #pragma once -#include "apphal/apphal.hpp" -#include "service\ui_scheduler.hpp" +#include "apphardware/apphardware.hpp" +#include "service\front_end_controler.hpp" #include "uappbase/base.hpp" #include "ui/ui.h" namespace iflytop { diff --git a/usrc/service/pump_ctrl_service.hpp b/usrc/service/pump_ctrl_service.hpp index 8657fd5..0375346 100644 --- a/usrc/service/pump_ctrl_service.hpp +++ b/usrc/service/pump_ctrl_service.hpp @@ -1,6 +1,5 @@ #pragma once -#include "apphal/apphal.hpp" -#include "apphal/apphardware.hpp" +#include "apphardware/apphardware.hpp" #include "uappbase/base.hpp" namespace iflytop { using namespace std; diff --git a/usrc/service/remote_controler.cpp b/usrc/service/remote_controler.cpp index cc07d29..4494be7 100644 --- a/usrc/service/remote_controler.cpp +++ b/usrc/service/remote_controler.cpp @@ -24,7 +24,7 @@ static const char* zhex2str(uint8_t* data, size_t len) { return buf; } -void RemoteControler::initialize() { +void RemoteControlerUpper::initialize() { ackQueue.initialize(1, sizeof(RemoteControlerReportPacket_t)); eventQueue.initialize(3, sizeof(RemoteControlerReportPacket_t)); usartRxThread.init("usartRxThread", 1024); @@ -34,19 +34,19 @@ void RemoteControler::initialize() { m_uart = AppHardware::ins()->remoteContolerUart; m_cmdlock.init(); } -void RemoteControler::regOnReport(on_report_cb_t on_report) { +void RemoteControlerUpper::regOnReport(on_report_cb_t on_report) { m_cb[m_ncb] = on_report; m_ncb++; } -bool RemoteControler::isConnected() { return AppHardware::ins()->BLE_CONNECTED_STATE_IO_PE6.getState(); } -void RemoteControler::callOnReport(uint8_t* rx, int32_t len) { +bool RemoteControlerUpper::isConnected() { return AppHardware::ins()->BLE_CONNECTED_STATE_IO_PE6.getState(); } +void RemoteControlerUpper::callOnReport(uint8_t* rx, int32_t len) { for (int32_t i = 0; i < m_ncb; i++) { m_cb[i](rx, len); } } -void RemoteControler::startSchedule() { +void RemoteControlerUpper::startSchedule() { usartRxThread.start([this]() { static uint8_t rxbuf[128]; m_uart->USR_UartITRxing = 1; @@ -91,7 +91,7 @@ void RemoteControler::startSchedule() { }); } -void RemoteControler::preProcessrxpacket(RemoteControlerReportPacket_t* packet) { +void RemoteControlerUpper::preProcessrxpacket(RemoteControlerReportPacket_t* packet) { // 判断包是否合法 #if DEBUG ZLOGI(TAG, "[rx-thread] : rx :%s(%d)", zhex2str(packet->data, packet->datalen), packet->datalen); @@ -119,7 +119,7 @@ void RemoteControler::preProcessrxpacket(RemoteControlerReportPacket_t* packet) } } -void RemoteControler::processRxEventPacket(RemoteControlerReportPacket_t* packet) { +void RemoteControlerUpper::processRxEventPacket(RemoteControlerReportPacket_t* packet) { #if DEBUG ZLOGI(TAG, "[process-thread] rx event : %s", zhex2str(packet->data, packet->datalen)); #endif @@ -128,7 +128,7 @@ void RemoteControler::processRxEventPacket(RemoteControlerReportPacket_t* packet // } callOnReport(packet->data, packet->datalen); } -bool RemoteControler::txcmd(uint8_t* data, uint32_t len) { +bool RemoteControlerUpper::txcmd(uint8_t* data, uint32_t len) { /** * @brief */ @@ -158,10 +158,12 @@ bool RemoteControler::txcmd(uint8_t* data, uint32_t len) { * CMD * ***********************************************************************************************************************/ -bool RemoteControler::setRemoterState(hand_acid_mode_t mode, bool state) { +bool RemoteControlerUpper::setRemoterState(hand_acid_mode_t mode, bool state) { zble_proto_packet_t* packet = (zble_proto_packet_t*)txbuf; int32_t param[2] = {mode, state}; zble_proto_utils_create_cmd_packet_int32(packet, kzble_app_cmd_set_state, m_index++, param, 2); bool suc = txcmd(txbuf, packet->packetlen); return suc; } + + diff --git a/usrc/service/remote_controler.hpp b/usrc/service/remote_controler.hpp index 9766a38..30759aa 100644 --- a/usrc/service/remote_controler.hpp +++ b/usrc/service/remote_controler.hpp @@ -1,15 +1,14 @@ #pragma once -#include "apphal/apphal.hpp" -#include "apphal/apphardware.hpp" +#include "apphardware/apphardware.hpp" #include "uappbase/base.hpp" namespace iflytop { using namespace std; -#define RCTRL RemoteControler::ins() +#define RCTRL RemoteControlerUpper::ins() typedef struct { uint8_t data[255]; uint16_t datalen; } RemoteControlerReportPacket_t; -class RemoteControler { +class RemoteControlerUpper { public: typedef std::function on_report_cb_t; @@ -25,11 +24,11 @@ class RemoteControler { uint8_t m_index = 0; public: - RemoteControler() {}; - ~RemoteControler() {}; + RemoteControlerUpper() {}; + ~RemoteControlerUpper() {}; - static RemoteControler* ins() { - static RemoteControler instance; + static RemoteControlerUpper* ins() { + static RemoteControlerUpper instance; return &instance; } @@ -38,7 +37,6 @@ class RemoteControler { void startSchedule(); bool isConnected(); - // bool cmd_set_state(hand_acid_mode_t mode, hand_pump_working_state_t state); private: bool txcmd(uint8_t* data, uint32_t len); @@ -47,6 +45,27 @@ class RemoteControler { void callOnReport(uint8_t* rx, int32_t len); public: + /*********************************************************************************************************************** + * COMMON_API * + ***********************************************************************************************************************/ + bool resetMasterBoard(); + bool resetClientBoard(); + + bool readMasterBoardVersion(zble_read_version_t* version); + bool readClientBoardVersion(zble_read_version_t* version); + + bool clearMasterResetFlag(); + bool clearSlaveResetFlag(); + + bool setMasterInDfuMode(); + bool setSlaveInDfuMode(); + + bool startScan(); + bool stopScan(); + + /*********************************************************************************************************************** + * app * + ***********************************************************************************************************************/ bool setRemoterState(hand_acid_mode_t mode, bool state); }; diff --git a/usrc/service/remote_controler_event_processer.cpp b/usrc/service/remote_controler_event_processer.cpp index a93b5a5..57e2ca2 100644 --- a/usrc/service/remote_controler_event_processer.cpp +++ b/usrc/service/remote_controler_event_processer.cpp @@ -3,7 +3,7 @@ using namespace iflytop; void RemoterControlerEventProcesser::initialize() { // - RemoteControler::ins()->regOnReport([this](uint8_t* rx, int32_t len) { // + RemoteControlerUpper::ins()->regOnReport([this](uint8_t* rx, int32_t len) { // onPacket((zble_proto_packet_t*)rx); }); } diff --git a/usrc/service/remote_controler_event_processer.hpp b/usrc/service/remote_controler_event_processer.hpp index 963cfa4..7a5cb78 100644 --- a/usrc/service/remote_controler_event_processer.hpp +++ b/usrc/service/remote_controler_event_processer.hpp @@ -1,6 +1,5 @@ #pragma once -#include "apphal/apphal.hpp" -#include "apphal/apphardware.hpp" +#include "apphardware/apphardware.hpp" #include "uappbase/base.hpp" namespace iflytop { using namespace std;