mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-18 03:53:51 -04:00
* Timers now are Application thread safe * Timers now have consistent API independend of Application (no more c style timers) * Timers can have either: callback or override onTimer() method - this way we can create more complicated timers or just use existing ones * gui::Timer added via adapter class GuiTimer to decouple sys::Timer with gui::Timer * Fixed race in wrapper * Updated docs * fixed using std and cpp_freertos and DataReceivedHandler hidden in Application.hpp
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#pragma once
|
|
#include "Application.hpp"
|
|
#include "Service/Message.hpp"
|
|
#include "gui/widgets/Label.hpp"
|
|
#include "gui/widgets/Image.hpp"
|
|
#include "gui/widgets/Progress.hpp"
|
|
|
|
namespace app
|
|
{
|
|
|
|
class ApplicationClock : public Application
|
|
{
|
|
std::unique_ptr<sys::Timer> timerClock;
|
|
void timerClockCallback();
|
|
|
|
public:
|
|
ApplicationClock(std::string name,
|
|
std::string parent = "",
|
|
uint32_t stackDepth = 4096,
|
|
sys::ServicePriority priority = sys::ServicePriority::Idle);
|
|
|
|
sys::Message_t DataReceivedHandler(sys::DataMessage *msgl, sys::ResponseMessage *resp) override;
|
|
sys::ReturnCodes InitHandler() override;
|
|
sys::ReturnCodes DeinitHandler() override;
|
|
|
|
sys::ReturnCodes SwitchPowerModeHandler(const sys::ServicePowerMode mode) override final
|
|
{
|
|
return sys::ReturnCodes::Success;
|
|
}
|
|
|
|
void createUserInterface() override;
|
|
void destroyUserInterface() override;
|
|
};
|
|
|
|
} /* namespace app */
|