Browse Source

update

master
zhaohe 2 years ago
parent
commit
5d481aa3aa
  1. 2
      iflytoplinuxsdk
  2. 19
      src/main_control_service.cpp

2
iflytoplinuxsdk

@ -1 +1 @@
Subproject commit 4b77d8a85c6627652a1f8933042b1e8d79454e46
Subproject commit 11ccc50026b05ca736e4a9d0d6c4fc854c7893e6

19
src/main_control_service.cpp

@ -1,6 +1,7 @@
#include "main_control_service.hpp"
#include "configs/project_setting.hpp"
#include "iflytop/components/zcanreceiver/zcanreceiverhost.hpp"
#include "iflytop/core/components/stringutils.hpp"
#include "iflytop/core/core.hpp"
#include "version.hpp"
@ -59,6 +60,24 @@ void MainControlService::initialize() {
m_dbService.reset(new DBService());
m_dbService->initialize();
shared_ptr<ZCanReceiverHost> zcanReceiverHost = make_shared<ZCanReceiverHost>();
zcanReceiverHost->initialize(m_zconfig->get_iflytopSubDeviceCanIFName(), m_zconfig->get_iflytopSubDeviceCanBitrate(), false);
// while (true) {
// shared_ptr<ZCanReceiverCMD> cmd = make_shared<ZCanReceiverCMD>();
// cmd->packetindex = 1;
// cmd->cmdid = 1004;
// cmd->subcmdid = 0;
// cmd->data[0] = 0x02;
// cmd->data[1] = 0;
// *(int16_t*)(&cmd->data[2]) = 300;
// *(int16_t*)(&cmd->data[4]) = -1000;
// cmd->len = 6;
// logger->info("send cmd:{}", cmd->toString());
// zcanReceiverHost->sendcmdblock(cmd, 100);
// sleep(3);
// }
m_reportThread.reset(new Thread("reportThread", [this]() {
//
// {

Loading…
Cancel
Save