调整自动模式顺序,调整版本号为1.0.1
This commit is contained in:
+25
-24
@@ -2,12 +2,13 @@
|
||||
* @file app_mode.c
|
||||
* @brief 自动模式 1~6:按节拍改方向与 PWM 占空比
|
||||
* @author cyWu <1917507415@qq.com>
|
||||
* @date 2026.08.24
|
||||
* @version V1.2.0
|
||||
* @date 2026.09.10
|
||||
* @version V1.3.0
|
||||
* @history
|
||||
* - V1.0.0, 2026.08.21, cyWu, 首次发布
|
||||
* - V1.1.0, 2026.08.24, cyWu, 接入 H 桥往返节拍
|
||||
* - V1.2.0, 2026.08.24, cyWu, 节拍带占空比;六档波形加花样
|
||||
* - V1.3.0, 2026.09.10, cyWu, 调整 1~6 玩法顺序
|
||||
******************************************************************************/
|
||||
|
||||
#include "system/includes.h"
|
||||
@@ -37,10 +38,10 @@ typedef struct {
|
||||
|
||||
/* 节拍以 ms=0 结尾,循环播放。同向连续步进只改占空比,换向才刹车。 */
|
||||
|
||||
static const AppModeStep_t s_mode1[] = { /* 弹力呼吸:慢加速放、慢加速收,最长 2s */
|
||||
STEP_OUT(500, DUTY_MID), STEP_OUT(1200, DUTY_RUN), STEP_OUT(500, DUTY_PUNCH),
|
||||
static const AppModeStep_t s_mode1[] = { /* 起伏攻防:2s 慢逗再猛收 */
|
||||
STEP_OUT(500, DUTY_SOFT), STEP_OUT(1200, DUTY_MID), STEP_OUT(500, DUTY_RUN),
|
||||
STEP_STOP(400),
|
||||
STEP_IN(500, DUTY_MID), STEP_IN(1200, DUTY_RUN), STEP_IN(500, DUTY_PUNCH),
|
||||
STEP_IN(500, DUTY_PUNCH), STEP_IN(500, DUTY_MID),
|
||||
STEP_STOP(400),
|
||||
STEP_END
|
||||
};
|
||||
@@ -53,7 +54,24 @@ static const AppModeStep_t s_mode2[] = { /* 飞鸟俯冲:快冲出去,2s 慢
|
||||
STEP_END
|
||||
};
|
||||
|
||||
static const AppModeStep_t s_mode3[] = { /* 云阶陀螺:短步往返加长,力度一档档加 */
|
||||
static const AppModeStep_t s_mode3[] = { /* 闪电快闪:两下轻、两下重,短停防 LVD */
|
||||
STEP_OUT(400, DUTY_MID), STEP_IN(400, DUTY_MID),
|
||||
STEP_OUT(800, DUTY_RUN), STEP_IN(800, DUTY_RUN),
|
||||
STEP_OUT(500, DUTY_PUNCH), STEP_IN(500, DUTY_PUNCH),
|
||||
STEP_OUT(700, DUTY_PUNCH), STEP_IN(700, DUTY_PUNCH),
|
||||
STEP_STOP(300),
|
||||
STEP_END
|
||||
};
|
||||
|
||||
static const AppModeStep_t s_mode4[] = { /* 弹力伪装:慢加速放、慢加速收,最长 2s */
|
||||
STEP_OUT(500, DUTY_MID), STEP_OUT(1200, DUTY_RUN), STEP_OUT(500, DUTY_PUNCH),
|
||||
STEP_STOP(400),
|
||||
STEP_IN(500, DUTY_MID), STEP_IN(1200, DUTY_RUN), STEP_IN(500, DUTY_PUNCH),
|
||||
STEP_STOP(400),
|
||||
STEP_END
|
||||
};
|
||||
|
||||
static const AppModeStep_t s_mode5[] = { /* 云阶陀螺:短步往返加长,力度一档档加 */
|
||||
STEP_OUT(800, DUTY_SOFT), STEP_IN(800, DUTY_SOFT),
|
||||
STEP_OUT(800, DUTY_MID), STEP_IN(800, DUTY_MID),
|
||||
STEP_OUT(800, DUTY_RUN), STEP_IN(800, DUTY_RUN),
|
||||
@@ -61,15 +79,7 @@ static const AppModeStep_t s_mode3[] = { /* 云阶陀螺:短步往返加长,
|
||||
STEP_END
|
||||
};
|
||||
|
||||
static const AppModeStep_t s_mode4[] = { /* 起伏攻防:2s 慢逗再猛收 */
|
||||
STEP_OUT(500, DUTY_SOFT), STEP_OUT(1200, DUTY_MID), STEP_OUT(500, DUTY_RUN),
|
||||
STEP_STOP(400),
|
||||
STEP_IN(500, DUTY_PUNCH), STEP_IN(500, DUTY_MID),
|
||||
STEP_STOP(400),
|
||||
STEP_END
|
||||
};
|
||||
|
||||
static const AppModeStep_t s_mode5[] = { /* 微风拂动:轻点后歇 2s */
|
||||
static const AppModeStep_t s_mode6[] = { /* 微风拂动:轻点后歇 2s */
|
||||
STEP_OUT(500, DUTY_MID), STEP_STOP(1000),
|
||||
STEP_IN(500, DUTY_MID), STEP_STOP(1200),
|
||||
STEP_OUT(500, DUTY_RUN), STEP_STOP(800),
|
||||
@@ -77,15 +87,6 @@ static const AppModeStep_t s_mode5[] = { /* 微风拂动:轻点后歇 2s */
|
||||
STEP_END
|
||||
};
|
||||
|
||||
static const AppModeStep_t s_mode6[] = { /* 闪电快闪:两下轻、两下重,短停防 LVD */
|
||||
STEP_OUT(400, DUTY_MID), STEP_IN(400, DUTY_MID),
|
||||
STEP_OUT(800, DUTY_RUN), STEP_IN(800, DUTY_RUN),
|
||||
STEP_OUT(500, DUTY_PUNCH), STEP_IN(500, DUTY_PUNCH),
|
||||
STEP_OUT(700, DUTY_PUNCH), STEP_IN(700, DUTY_PUNCH),
|
||||
STEP_STOP(300),
|
||||
STEP_END
|
||||
};
|
||||
|
||||
static const AppModeStep_t *const s_tables[7] = {
|
||||
0, s_mode1, s_mode2, s_mode3, s_mode4, s_mode5, s_mode6
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user