add DMA remote control

This commit is contained in:
TuxMonkey
2026-07-14 21:56:46 +08:00
parent 591707d9fc
commit f4c0424c45
16 changed files with 371 additions and 191 deletions

View File

@@ -24,6 +24,7 @@
#include "delayticks.h"
#include "robot_def.h"
#include "rc.h"
/*---------------------VARIABLES---------------------*/
uint8_t r = 0;
@@ -53,10 +54,13 @@ void robotSelfCheck(void)
void ws2812Task(void *argument)
{
(void) argument;
RobotMode_t RobotMode = REMOTE_NOT_CONNECTED; // 初始状态为遥控器未连接
while (1)
{
switch (RobotMode)
RobotMode_t display_mode = RobotMode;
if (display_mode != SYS_ERROR_OCCURRED && !RemoteControlIsOnline())
display_mode = REMOTE_NOT_CONNECTED;
switch (display_mode)
{
case NORMAL_MODE:
BlinkGreen();