From 7522bc9974fd93f90fb6c35346cc9f06b215c5c6 Mon Sep 17 00:00:00 2001 From: TuxMonkey <8196772+tuxmonkey@user.noreply.gitee.com> Date: Thu, 4 Dec 2025 21:32:17 +0800 Subject: [PATCH] message hub --- User_Code/module/periph/buzzer/buzzer.c | 46 +++++++++++++++++++++- User_Code/module/periph/buzzer/buzzer.h | 2 + User_Code/module/periph/referee/referee.c | 5 +++ User_Code/module/periph/referee/referee.h | 8 ++++ ozonedeb/windebnewestux.jdebug.user | 48 +++++++++++------------ 5 files changed, 84 insertions(+), 25 deletions(-) create mode 100644 User_Code/module/periph/referee/referee.c create mode 100644 User_Code/module/periph/referee/referee.h diff --git a/User_Code/module/periph/buzzer/buzzer.c b/User_Code/module/periph/buzzer/buzzer.c index b838a67..a451a02 100644 --- a/User_Code/module/periph/buzzer/buzzer.c +++ b/User_Code/module/periph/buzzer/buzzer.c @@ -123,7 +123,7 @@ const uint8_t sound_autoaiming[6] = {0x2D, 0x10, 0x2D, 0x10, 0x2D, 0x10}; //D_D_ static uint16_t bzply_n = 0; //乐谱播放位置计数 static uint8_t bzply_count = 1; //单个音的节拍延时计数 - +auto note = 80; /*---------------------FUNCTIONS---------------------*/ /*********************************************************************** @@ -287,6 +287,7 @@ void systemstart_song(void) // HAL_Delay(550); SongSpring(); //为什么要演奏春日影!!! + // SongNortheastern(); // SongLaoda(); @@ -313,6 +314,49 @@ void SongSpring(void) //春日影!!! HAL_Delay(300); } +void SongNortheastern(void) +{ + // buzzer_note(110, 0.5); //la + // HAL_Delay(290); + // buzzer_note(110, 0.5); //la + // HAL_Delay(290); + // buzzer_note(135, 0.5); //mi + // HAL_Delay(290); + // buzzer_note(160, 0.5); //so + // HAL_Delay(290); + // buzzer_note(135, 0.5); //mi + // HAL_Delay(290); + // buzzer_note(135, 0.5); //mi + // HAL_Delay(290); + // buzzer_note(138, 0.5); //so + // HAL_Delay(290); + // buzzer_note(135, 0.5); //mi + // HAL_Delay(290); + // buzzer_note(145, 0.5); //xi + // HAL_Delay(290); + // buzzer_note(110, 0.5); //la + // HAL_Delay(290); + + // buzzer_note(85,0.5);//中音mi + // delay_ticks(450); + // buzzer_note(90,0.5);//fa + // delay_ticks(450); + // buzzer_note(100,0.5);//so + // delay_ticks(750); + // buzzer_note(85,0.5);//mi + // delay_ticks(250); + // buzzer_note(100,0.5);//so + // delay_ticks(250); + // buzzer_note(85,0.5);//mi + // delay_ticks(290); + // buzzer_note(100,0.5);//so + // delay_ticks(300); + // buzzer_note(125,0.5);//xi + // delay_ticks(550); + // buzzer_note(132,0.5);//~do + // delay_ticks(1000); +} + void SongLaoda(void) { // 播放歌曲牢大 diff --git a/User_Code/module/periph/buzzer/buzzer.h b/User_Code/module/periph/buzzer/buzzer.h index 7160966..abd5744 100644 --- a/User_Code/module/periph/buzzer/buzzer.h +++ b/User_Code/module/periph/buzzer/buzzer.h @@ -46,6 +46,8 @@ void SongLaoda(void); void SongSpring(void); +void SongNortheastern(void); + // extern void SetBuzzerOff(void); diff --git a/User_Code/module/periph/referee/referee.c b/User_Code/module/periph/referee/referee.c new file mode 100644 index 0000000..523bac0 --- /dev/null +++ b/User_Code/module/periph/referee/referee.c @@ -0,0 +1,5 @@ +// +// Created by ASUS on 2025/12/4. +// + +#include "referee.h" diff --git a/User_Code/module/periph/referee/referee.h b/User_Code/module/periph/referee/referee.h new file mode 100644 index 0000000..163841e --- /dev/null +++ b/User_Code/module/periph/referee/referee.h @@ -0,0 +1,8 @@ +// +// Created by ASUS on 2025/12/4. +// + +#ifndef TRONONEH7_SCAFFOLD_REFEREE_H +#define TRONONEH7_SCAFFOLD_REFEREE_H + +#endif //TRONONEH7_SCAFFOLD_REFEREE_H diff --git a/ozonedeb/windebnewestux.jdebug.user b/ozonedeb/windebnewestux.jdebug.user index 810c59d..2e3628c 100644 --- a/ozonedeb/windebnewestux.jdebug.user +++ b/ozonedeb/windebnewestux.jdebug.user @@ -1,45 +1,45 @@ GraphedExpression="(QEKF_INS).Roll", Color=#a00909 -OpenDocument="delayticks.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/User_Code/bsp/delayticks/delayticks.c", Line=10 -OpenDocument="bsp_dwt.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/User_Code/bsp/dwt/bsp_dwt.c", Line=93 -OpenDocument="main.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/Core/Src/main.c", Line=67 -OpenDocument="robot.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/User_Code/application/robot.c", Line=33 OpenDocument="tasks.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/Middlewares/Third_Party/FreeRTOS/Source/tasks.c", Line=2303 -OpenDocument="stm32h7xx_hal.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c", Line=329 +OpenDocument="main.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/Core/Src/main.c", Line=119 +OpenDocument="robot.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/User_Code/application/robot.c", Line=33 +OpenDocument="bsp_dwt.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/User_Code/bsp/dwt/bsp_dwt.c", Line=93 +OpenDocument="stm32h7xx_hal.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c", Line=328 OpenDocument="list.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/Middlewares/Third_Party/FreeRTOS/Source/list.c", Line=144 OpenDocument="cmsis_gcc.h", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/Drivers/CMSIS/Include/cmsis_gcc.h", Line=264 OpenDocument="cmsis_os2.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.c", Line=872 OpenDocument="stm32h7xx_it.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/Core/Src/stm32h7xx_it.c", Line=99 -OpenDocument="stm32h7xx_hal_spi.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.c", Line=3887 -OpenDocument="buzzer.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/User_Code/module/periph/buzzer/buzzer.c", Line=191 +OpenDocument="delayticks.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/User_Code/bsp/delayticks/delayticks.c", Line=0 +OpenDocument="buzzer.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/User_Code/module/periph/buzzer/buzzer.c", Line=306 OpenDocument="ins_task.c", FilePath="D:/RM/Elec Control/TronOneH7_Scaffold/User_Code/module/periph/imu/ins_task.c", Line=0 OpenToolbar="Debug", Floating=0, x=0, y=0 OpenToolbar="Breakpoints", Floating=0, x=1, y=0 -OpenWindow="Registers 1", DockArea=BOTTOM, x=1, y=0, w=271, h=181, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0, FilteredItems=[], RefreshRate=1 -OpenWindow="Source Files", DockArea=LEFT, x=0, y=0, w=551, h=183, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 -OpenWindow="Disassembly", DockArea=BOTTOM, x=2, y=0, w=471, h=181, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 -OpenWindow="Break & Tracepoints", DockArea=LEFT, x=0, y=1, w=551, h=190, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0, VectorCatchIndexMask=254 -OpenWindow="Memory 1", DockArea=BOTTOM, x=3, y=0, w=349, h=181, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0, EditorAddress=0x20005E30 -OpenWindow="Global Data", DockArea=RIGHT, x=0, y=2, w=681, h=283, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 -OpenWindow="Watched Data 1", DockArea=LEFT, x=0, y=2, w=551, h=194, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 -OpenWindow="Functions", DockArea=LEFT, x=0, y=3, w=551, h=145, TabPos=1, TopOfStack=0, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 -OpenWindow="Call Graph", DockArea=LEFT, x=0, y=3, w=551, h=145, TabPos=2, TopOfStack=1, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 -OpenWindow="Data Sampling", DockArea=BOTTOM, x=0, y=0, w=826, h=181, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0, VisibleTab=0, UniformSampleSpacing=0 -OpenWindow="Timeline", DockArea=RIGHT, x=0, y=1, w=681, h=274, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=1, DataPaneShown=1, PowerPaneShown=0, CodePaneShown=0, PinCursor="Cursor Movable", TimePerDiv="1 s / Div", TimeStampFormat="Time", DataGraphDrawAsPoints=0, DataGraphLegendShown=1, DataGraphUniformSampleSpacing=0, DataGraphLegendPosition="435;0", PowerGraphDrawAsPoints=0, PowerGraphLegendShown=0, PowerGraphAvgFilterTime=Off, PowerGraphAvgFilterLen=Off, PowerGraphUniformSampleSpacing=0, PowerGraphLegendPosition="459;-65", CodeGraphLegendShown=0, CodeGraphLegendPosition="475;0" -OpenWindow="Console", DockArea=LEFT, x=0, y=3, w=551, h=145, TabPos=0, TopOfStack=0, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 -OpenWindow="FreeRTOS", DockArea=RIGHT, x=0, y=0, w=681, h=176, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0, Showing="Task List" -TableHeader="Functions", SortCol="Name", SortOrder="ASCENDING", VisibleCols=["Name";"Address";"Size";"#Insts";"Source"], ColWidths=[1164;100;100;100;100] +OpenWindow="Registers 1", DockArea=BOTTOM, x=1, y=0, w=361, h=181, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0, FilteredItems=[], RefreshRate=1 +OpenWindow="Source Files", DockArea=LEFT, x=0, y=0, w=551, h=273, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 +OpenWindow="Disassembly", DockArea=BOTTOM, x=2, y=0, w=629, h=181, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 +OpenWindow="Break & Tracepoints", DockArea=LEFT, x=0, y=1, w=551, h=282, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0, VectorCatchIndexMask=254 +OpenWindow="Memory 1", DockArea=BOTTOM, x=3, y=0, w=465, h=181, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0, EditorAddress=0x20005E30 +OpenWindow="Global Data", DockArea=RIGHT, x=0, y=2, w=681, h=414, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 +OpenWindow="Watched Data 1", DockArea=LEFT, x=0, y=2, w=551, h=287, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 +OpenWindow="Functions", DockArea=LEFT, x=0, y=3, w=551, h=230, TabPos=1, TopOfStack=0, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 +OpenWindow="Call Graph", DockArea=LEFT, x=0, y=3, w=551, h=230, TabPos=2, TopOfStack=1, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 +OpenWindow="Data Sampling", DockArea=BOTTOM, x=0, y=0, w=1102, h=181, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0, VisibleTab=0, UniformSampleSpacing=0 +OpenWindow="Timeline", DockArea=RIGHT, x=0, y=1, w=681, h=403, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=1, DataPaneShown=1, PowerPaneShown=0, CodePaneShown=0, PinCursor="Cursor Movable", TimePerDiv="1 s / Div", TimeStampFormat="Time", DataGraphDrawAsPoints=0, DataGraphLegendShown=1, DataGraphUniformSampleSpacing=0, DataGraphLegendPosition="434;0", PowerGraphDrawAsPoints=0, PowerGraphLegendShown=0, PowerGraphAvgFilterTime=Off, PowerGraphAvgFilterLen=Off, PowerGraphUniformSampleSpacing=0, PowerGraphLegendPosition="459;0", CodeGraphLegendShown=0, CodeGraphLegendPosition="475;0" +OpenWindow="Console", DockArea=LEFT, x=0, y=3, w=551, h=230, TabPos=0, TopOfStack=0, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0 +OpenWindow="FreeRTOS", DockArea=RIGHT, x=0, y=0, w=681, h=276, FilterBarShown=0, TotalValueBarShown=0, ToolBarShown=0, Showing="Task List" +TableHeader="Call Graph", SortCol="Name", SortOrder="ASCENDING", VisibleCols=["Name";"Stack Total";"Stack Local";"Code Total";"Code Local";"Depth";"Called From"], ColWidths=[384;100;100;100;100;100;118] +TableHeader="Functions", SortCol="Name", SortOrder="ASCENDING", VisibleCols=["Name";"Address";"Size";"#Insts";"Source"], ColWidths=[1164;100;100;100;286] TableHeader="Global Data", SortCol="Name", SortOrder="ASCENDING", VisibleCols=["Name";"Value";"Location";"Size";"Type";"Scope"], ColWidths=[222;130;100;54;95;486] TableHeader="Vector Catches", SortCol="None", SortOrder="ASCENDING", VisibleCols=["";"Vector Catch";"Description"], ColWidths=[50;300;500] TableHeader="Break & Tracepoints", SortCol="None", SortOrder="ASCENDING", VisibleCols=["";"Type";"Location";"Extras"], ColWidths=[100;100;142;209] TableHeader="Source Files", SortCol="File", SortOrder="ASCENDING", VisibleCols=["File";"Status";"Size";"#Insts";"Path"], ColWidths=[229;100;100;100;902] TableHeader="Data Sampling Table", SortCol="Index", SortOrder="ASCENDING", VisibleCols=["Index";"Time";" (QEKF_INS).Roll"], ColWidths=[100;100;100] -TableHeader="Data Sampling Setup", SortCol="Expression", SortOrder="ASCENDING", VisibleCols=["Expression";"Type";"Value";"Min";"Max";"Average";"# Changes";"Min. Change";"Max. Change"], ColWidths=[320;100;110;102;100;110;102;118;118] +TableHeader="Data Sampling Setup", SortCol="Expression", SortOrder="ASCENDING", VisibleCols=["Expression";"Type";"Value";"Min";"Max";"Average";"# Changes";"Min. Change";"Max. Change"], ColWidths=[320;100;102;102;100;102;102;118;118] TableHeader="Power Sampling", SortCol="Index", SortOrder="ASCENDING", VisibleCols=["Index";"Time";"Ch 0"], ColWidths=[100;100;100] TableHeader="Task List", SortCol="Name", SortOrder="ASCENDING", VisibleCols=["Name";"Run Count";"Priority";"Status";"Timeout";"Stack Info (Free / Size)";"ID";"Mutex Count";"Notified Value";"Notify State"], ColWidths=[110;110;110;110;110;110;110;110;110;110] TableHeader="Registers 1", SortCol="Name", SortOrder="ASCENDING", VisibleCols=["Name";"Value";"Description"], ColWidths=[100;105;294] TableHeader="Watched Data 1", SortCol="Expression", SortOrder="ASCENDING", VisibleCols=["Expression";"Value";"Location"], ColWidths=[171;101;279] TableHeader="RegisterSelectionDialog", SortCol="None", SortOrder="ASCENDING", VisibleCols=[], ColWidths=[] -TableHeader="Call Graph", SortCol="Name", SortOrder="ASCENDING", VisibleCols=["Name";"Stack Total";"Stack Local";"Code Total";"Code Local";"Depth";"Called From"], ColWidths=[384;100;100;100;100;100;118] TableHeader="TargetExceptionDialog", SortCol="Name", SortOrder="ASCENDING", VisibleCols=["Name";"Value";"Address";"Description"], ColWidths=[27;27;27;38] -WatchedExpression="QEKF_INS", RefreshRate=2, Window=Watched Data 1 \ No newline at end of file +WatchedExpression="QEKF_INS", RefreshRate=2, Window=Watched Data 1 +WatchedExpression="note", Window=Watched Data 1 \ No newline at end of file