From 78c78eb20b299bc665f5f63d88d20b0f6f838fee Mon Sep 17 00:00:00 2001 From: JiaXingyu Date: Sun, 28 Sep 2025 16:28:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20'debug.lua'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debug.lua | 90 ------------------------------------------------------- 1 file changed, 90 deletions(-) delete mode 100644 debug.lua diff --git a/debug.lua b/debug.lua deleted file mode 100644 index 8748b4c..0000000 --- a/debug.lua +++ /dev/null @@ -1,90 +0,0 @@ -------------------------------------------------------- --- 设置CV的值 -------------------------------------------------------- -local CV_Index = 0 -local CV_value = -2 - - -local str -local can_id = 0x120 -local byte0 = 0x00 -local byte1 = 0x00 -local byte2 = 0x00 -local byte3 = 0x00 -local byte4 = 0x00 -local byte5 = 0x00 -local byte6 = 0x00 -local byte7 = 0x00 - -print("设置CV的值") -can_bus("open", 0, 8, 500000, 500000) - -byte0 = ((CV_Index >> 0) & 0xFF) -byte1 = ((CV_Index >> 8) & 0xFF) - -byte2 = ((CV_value >> 0) & 0xFF) -byte3 = ((CV_value >> 8) & 0xFF) -byte4 = ((CV_value >> 16) & 0xFF) -byte5 = ((CV_value >> 24) & 0xFF) - -str= string.format("%c%c%c%c%c%c%c%c", byte0, byte1, byte2, byte3, byte4, byte5, byte6, byte7) - -can_bus("send", 0, 0, can_id, str) -------------------------------------------------------- --- 读取CV的值 -------------------------------------------------------- -local CV_Index = 0 - -local str -local can_id = 0x121 -local byte0 = 0x00 -local byte1 = 0x00 -local byte2 = 0x00 -local byte3 = 0x00 -local byte4 = 0x00 -local byte5 = 0x00 -local byte6 = 0x00 -local byte7 = 0x00 - -print("读取CV的值") -can_bus("open", 0, 8, 500000, 500000) - -byte0 = ((CV_Index >> 0) & 0xFF) -byte1 = ((CV_Index >> 8) & 0xFF) - -str= string.format("%c%c%c%c%c%c%c%c", byte0, byte1, byte2, byte3, byte4, byte5, byte6, byte7) - -can_bus("send", 0, 0, can_id, str) - -------------------------------------------------------- --- 读取GV -------------------------------------------------------- -local GV_Index = 0 -local GV_Length = 1 -local GV_config = 1 - -local str -local can_id = 0x130 -local byte0 = 0x00 -local byte1 = 0x00 -local byte2 = 0x00 -local byte3 = 0x00 -local byte4 = 0x00 -local byte5 = 0x00 -local byte6 = 0x00 -local byte7 = 0x00 - -print("读取GV的值") -can_bus("open", 0, 8, 500000, 500000) - -byte0 = ((GV_Index >> 0) & 0xFF) -byte1 = ((GV_Index >> 8) & 0xFF) - -byte2 = ((GV_Length >> 0) & 0xFF) -byte3 = ((GV_Length >> 8) & 0xFF) - -byte4 = ((GV_config >> 0) & 0xFF) - -str= string.format("%c%c%c%c%c%c%c%c", byte0, byte1, byte2, byte3, byte4, byte5, byte6, byte7) - -can_bus("send", 0, 0, can_id, str) \ No newline at end of file