优化bit模式,添加扫频记录模块。

This commit is contained in:
LZY\79495
2025-07-07 19:21:14 +08:00
parent 0a4d0a0297
commit c064c0d250
8 changed files with 32 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
classdef ENUM_BIT_MODE < Simulink.IntEnumType
enumeration
IDLE (0)
MANUAL (1) % Xbit手控
Q_STAB (2) % Xbit增稳角速率
ACT_SWEEP (3) % Xbit舵机连续扫频
CTR_SWEEP (4) % Xbit结构模态扫频
SERVO_SWEEP (5) % Xbit舵机单点扫频
THT_STAB (6) % Xbit增稳姿态
SERVO_TEST (7) % Xbit舵机多模式扫频
CTR_SWEEP_IMPULSE (8) % Xbit闭环扫频
end
methods (Static = true)
function retVal = getDescription()
retVal = 'BIT Modes';
end
function retVal = getDefaultValue()
retVal = ENUM_BIT_MODE.IDLE;
end
function retVal = addClassNameToEnumNames()
retVal = true;
end
end
end
+7
View File
@@ -11,6 +11,13 @@ classdef ENUM_mode < Simulink.IntEnumType
SIMPLE (bitshift(uint32(8),16))
STANDBY (bitshift(uint32(9),16))
BIT (bitshift(uint32(10),16))
BIT_SERVO_SWEEP (bitshift(uint32(10),16)+bitshift(uint32(1),16)) % 720896
BIT_THT_STAB (bitshift(uint32(10),16)+bitshift(uint32(2),16)) % 786432
BIT_Q_STAB (bitshift(uint32(10),16)+bitshift(uint32(3),16)) % 851968
BIT_ACT_SWEEP (bitshift(uint32(10),16)+bitshift(uint32(4),16)) % 917504
BIT_CTR_SWEEP (bitshift(uint32(10),16)+bitshift(uint32(5),16)) % 983040
BIT_SERVO_TEST (bitshift(uint32(10),16)+bitshift(uint32(6),16)) % 1048576
BIT_CTR_SWEEP_IMPULSE (bitshift(uint32(10),16)+bitshift(uint32(7),16)) % 1114112
AUTO_READY (bitshift(uint32(4),16)+bitshift(uint32(1),24))
AUTO_TAKEOFF (bitshift(uint32(4),16)+bitshift(uint32(2),24))
AUTO_LOITER (bitshift(uint32(4),16)+bitshift(uint32(3),24))
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.