修复全部循环的问题,因为memset将结构体清空导致

This commit is contained in:
FlyM 2025-08-28 16:13:37 +08:00
parent e8c743b7fa
commit e80e2849a0
16 changed files with 23134 additions and 23133 deletions

View File

@ -76,7 +76,7 @@ void kt_change_cycle(u8 cycle)
__this->play_status.cycle_mode = cycle;
if (cycle != FCYCLE_ONE)
{
memset(&__this->play_status, 0, sizeof(__this->play_status));
memset(__this->play_status.play_name, 0, sizeof(__this->play_status.play_name));
}
}

View File

@ -340,7 +340,8 @@ static void uart_process(tRxPacket *pack)
else if (pack->buf[2] == KT_CMD_CYCLE)
{
printf("KT_CMD_CYCLE \n");
app_task_put_key_msg(KEY_USER_PLAY_CYCLE, pack->buf[3]);
//app_task_put_key_msg(KEY_USER_PLAY_CYCLE, pack->buf[3]);
kt_change_cycle(pack->buf[3]);
uart_ack(pack->buf[2], KT_OK);
}
else if (pack->buf[2] == KT_CMD_GET_FILE_NUM) //文件数量

View File

@ -178,7 +178,7 @@ enum {
KEY_USER_PLAY_NUM,
KEY_USER_PLAY_NAME,
KEY_USER_PLAY_FULL_NAME,
KEY_USER_PLAY_CYCLE,
//KEY_USER_PLAY_CYCLE,
KEY_USER_PLAY_STOP,
KEY_IR_NUM_0, //中间不允许插入

View File

@ -648,14 +648,14 @@ static int music_key_event_opr(struct sys_event *event)
kt_set_last_play(3, 0, play_name);
}
break;
case KEY_USER_PLAY_CYCLE:
/*case KEY_USER_PLAY_CYCLE:
printf("KEY_USER_PLAY_CYCLE !!\n");
if (msg[1] < FCYCLE_MAX)
{
kt_change_cycle(msg[1]);
music_player_set_repeat_mode(msg[1]);
}
break;
break;*/
case KEY_USER_PLAY_STOP:
printf("KEY_USER_PLAY_STOP !!\n");
//err = music_player_end_deal(msg[1]);

View File

@ -1,3 +1,6 @@
fat_vfs_ops
fat_sdfile_fat_ops

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,7 @@
rem @echo off
@echo *****************************************************************

View File

@ -1233,6 +1233,7 @@ objs/apps/kaotings/kt_uart.c.o
-r=objs/apps/kaotings/kt_uart.c.o,app_audio_set_volume,l
-r=objs/apps/kaotings/kt_uart.c.o,app_audio_mute,l
-r=objs/apps/kaotings/kt_uart.c.o,strlen,l
-r=objs/apps/kaotings/kt_uart.c.o,kt_change_cycle,l
-r=objs/apps/kaotings/kt_uart.c.o,music_player_get_file_total,l
-r=objs/apps/kaotings/kt_uart.c.o,music_player_get_dir_total,l
-r=objs/apps/kaotings/kt_uart.c.o,music_player_get_fileindir_number,l
@ -2390,7 +2391,6 @@ objs/apps/soundbox/task_manager/music/music.c.o
-r=objs/apps/soundbox/task_manager/music/music.c.o,kt_set_last_play,l
-r=objs/apps/soundbox/task_manager/music/music.c.o,strcat,l
-r=objs/apps/soundbox/task_manager/music/music.c.o,music_player_play_by_path,l
-r=objs/apps/soundbox/task_manager/music/music.c.o,music_player_set_repeat_mode,l
-r=objs/apps/soundbox/task_manager/music/music.c.o,app_task_switch_next,l
-r=objs/apps/soundbox/task_manager/music/music.c.o,music_player_end_deal,l
-r=objs/apps/soundbox/task_manager/music/music.c.o,kt_get_last_play,l

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.