diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index 72f1dcb..fbe7e0a 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/transmit_disinfection_protocol_v1 b/transmit_disinfection_protocol_v1
index 47b9b11..67fd26a 160000
--- a/transmit_disinfection_protocol_v1
+++ b/transmit_disinfection_protocol_v1
@@ -1 +1 @@
-Subproject commit 47b9b112fcc233aca5982b70a4a8bd7defb25b27
+Subproject commit 67fd26a1a81f0afe4e653f2c40151571f846028e
diff --git a/usrc/protocol_impl/protocol_impl_service.cpp b/usrc/protocol_impl/protocol_impl_service.cpp
index 034ab2b..57ee982 100644
--- a/usrc/protocol_impl/protocol_impl_service.cpp
+++ b/usrc/protocol_impl/protocol_impl_service.cpp
@@ -26,7 +26,7 @@ static void onDeviceStateMonitorThreadStart(void const* argument) {
}
static uint8_t txdatabuf[1024] = {0};
-static void zcanbus_on_rx(CanPacketRxBuffer* rxbuf, uint8_t* packet, size_t len) { //
+static void _zcanbus_on_rx(CanPacketRxBuffer* rxbuf, uint8_t* packet, size_t len) { //
transmit_disinfection_protocol_header_t* header = (transmit_disinfection_protocol_header_t*)packet;
memset(txdatabuf, 0, sizeof(txdatabuf));
@@ -77,19 +77,35 @@ static void zcanbus_on_rx(CanPacketRxBuffer* rxbuf, uint8_t* packet, size_t l
}
}
- if (cmdheader->cmdid == kcmd_spray_air_compressor_power_ctrl) {
+
+ if (cmdheader->cmdid == kcmd_dbdb_spray_air_compressor_power_ctrl) {
int32_t val = *(int32_t*)(&cmdheader->data[0]);
- Hardware::ins().sl_mini_ac_ctrl()->write(val);
+ Hardware::ins().atta_mini_air_compressor_ctrl()->write(val);
ZCanReceiver::ins()->sendAck(cmdheader, NULL, 0);
}
- if (cmdheader->cmdid == kcmd_air_tightness_test_air_compressor_power_ctrl) {
+ if (cmdheader->cmdid == kcmd_dbdb_air_tightness_test_air_compressor_power_ctrl) {
int32_t val = *(int32_t*)(&cmdheader->data[0]);
Hardware::ins().sl_mini_ac_ctrl()->write(val);
ZCanReceiver::ins()->sendAck(cmdheader, NULL, 0);
}
}
+static const char* hex2str(uint8_t* data, size_t len) {
+ static char buf[1024] = {0};
+ memset(buf, 0, sizeof(buf));
+ for (size_t i = 0; i < len; i++) {
+ sprintf(buf + i * 2, "%02X", data[i]);
+ }
+ return buf;
+}
+
+static void zcanbus_on_rx(CanPacketRxBuffer* rxbuf, uint8_t* packet, size_t len) { //
+ ZLOGI(TAG, "zcanbus_on_rx %s", hex2str(packet, len));
+ _zcanbus_on_rx(rxbuf, packet, len);
+ ZLOGI(TAG, "end");
+}
+
void protocol_impl_service_init() { //
Hardware::ins().init();
ForceReportFlagMgr::ins()->init();
@@ -98,8 +114,6 @@ void protocol_impl_service_init() { //
ZCanReceiver::ins()->init(cfg);
ZCanReceiver::ins()->registerListener(zcanbus_on_rx);
-
-
osThreadDef(PacketRxThread, onPacketRxThreadStart, osPriorityNormal, 0, 1024);
PacketRxThreadId = osThreadCreate(osThread(PacketRxThread), NULL);
diff --git a/zsdk b/zsdk
index 2d0aea4..cfc9142 160000
--- a/zsdk
+++ b/zsdk
@@ -1 +1 @@
-Subproject commit 2d0aea4bda82668626ba11d42658eb2f36f48119
+Subproject commit cfc9142c9578dbea728bfb93a07d8a85b5cc89eb