Skip to content

Commit

Permalink
*
Browse files Browse the repository at this point in the history
  • Loading branch information
Sasha7b9Work committed Mar 6, 2025
1 parent a31c108 commit 1df6136
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion sources/Panel/src/Hardware/Sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ void Sound::Sound_Beep(const TypeWave::E newTypeWave, const float newFreq, const

HAL_DAC_Start_DMA(&handleDAC, DAC_CHANNEL_1, (uint *)points, POINTS_IN_PERIOD_SOUND, DAC_ALIGN_8B_R);

Timer::SetOnceTask(TimerTask::kStopSound, (uint)newDuration, Stop);
Timer::SetDefferedOnceTask(TimerTask::StopSound, (uint)newDuration, Stop);
}


Expand Down
2 changes: 1 addition & 1 deletion sources/Panel/src/Hardware/Timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace RemainingTimeCounter
}


void Timer::SetOnceTask(TimerTask::E task, uint time, void (*func)())
void Timer::SetDefferedOnceTask(TimerTask::E task, uint time, void (*func)())
{
tasks[task].dT = time;
tasks[task].time_next_run = TIME_MS + time;
Expand Down
6 changes: 3 additions & 3 deletions sources/Panel/src/Hardware/Timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ struct TimerTask
enum E
{
ChangeColorOnLabelStop, // Èçìåíèòü öâåò êíîïêè ÑÒÎÏ ÷åðåç íåêîòîðîå âðåìÿ ïîñëå îñòàíîâêè
kUSB,
kStopSound,
USB,
StopSound,
Count
};
};
Expand All @@ -25,7 +25,7 @@ struct TimerTask
namespace Timer
{
// Îäíîêðàòíîå çíà÷åíèå - âûïîëíÿåòñÿ òîëüêî îäèí ðàç
void SetOnceTask(TimerTask::E, uint time, void (*func)());
void SetDefferedOnceTask(TimerTask::E, uint time, void (*func)());

void DisableTask(TimerTask::E);

Expand Down
2 changes: 1 addition & 1 deletion sources/Panel/src/Menu/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void Menu::Input::OnControl(const Control &control)

labelMode.SetState("ÑÒÎÏ", Color::BLACK, Color::GREEN);

Timer::SetOnceTask(TimerTask::ChangeColorOnLabelStop, 10000, []()
Timer::SetDefferedOnceTask(TimerTask::ChangeColorOnLabelStop, 10000, []()
{
labelMode.SetState("ÑÒÎÏ", Color::BLACK, Color::GRAY);
});
Expand Down
3 changes: 2 additions & 1 deletion sources/Panel/src/Menu/Pages/PageSignal2b.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ namespace PageSignal2b

static void FuncStartTest()
{

}

static Item *items[] =
Expand All @@ -53,7 +54,7 @@ namespace PageSignal2b

static void AdditionDraw()
{
Text("%s Ri: 0.05 Îì Äëèò: %s", VoltageMode::TextValue()).Write(
Text("%s Ri: 0.05 Îì", VoltageMode::TextValue()).Write(
Display::xConstParameters, Display::yConstParameters, Color::WHITE
);

Expand Down
4 changes: 2 additions & 2 deletions sources/Panel/src/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#pragma once
#include "no-warnings.h"

#define VERSION_BUILD 128
#define VERSION_BUILD 129

#define DATE_BUILD "2025-03-04 17:29:58"
#define DATE_BUILD "2025-03-06 12:07:09"

#include <stdint.h>

Expand Down
2 changes: 1 addition & 1 deletion sources/common/libs/USBD/usbd_cdc_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static void SetAttributeConnected()
static int8_t CDC_Itf_Init()
{
USBD_CDC_SetRxBuffer(&VCP::handleUSBD, UserRxBuffer);
Timer::SetOnceTask(TimerTask::kUSB, 100, SetAttributeConnected); /** \todo Çàäåðæêà ââåäåíà äëÿ òîãî, ÷òîáû íå áûëî ëîæíûõ ñðàáàòûâàíèé â
Timer::SetDefferedOnceTask(TimerTask::USB, 100, SetAttributeConnected); /** \todo Çàäåðæêà ââåäåíà äëÿ òîãî, ÷òîáû íå áûëî ëîæíûõ ñðàáàòûâàíèé â
usbd_conf.c:HAL_PCD_SetupStageCallback ïðè îïðåäåëåíèè ïîäêëþ÷åíèÿ õîñòà */
return (USBD_OK);
}
Expand Down

0 comments on commit 1df6136

Please sign in to comment.