mirror of
https://github.com/lora-aprs/LoRa_APRS_iGate.git
synced 2026-04-05 06:26:44 +00:00
parent
b7b8884594
commit
8cf0c67683
7 changed files with 17 additions and 2 deletions
|
|
@ -25,6 +25,11 @@ void Display::setup(std::shared_ptr<BoardConfig> boardConfig)
|
|||
_disp->display(&bitmap);
|
||||
}
|
||||
|
||||
void Display::turn180()
|
||||
{
|
||||
_disp->flipScreenVertically();
|
||||
}
|
||||
|
||||
void Display::update()
|
||||
{
|
||||
if(_statusFrame->isPrio())
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ public:
|
|||
~Display() {}
|
||||
|
||||
void setup(std::shared_ptr<BoardConfig> boardConfig);
|
||||
void turn180();
|
||||
void update();
|
||||
|
||||
void addFrame(std::shared_ptr<DisplayFrame> frame);
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
#include <logger.h>
|
||||
#include <TimeLib.h>
|
||||
#include "TaskDisplay.h"
|
||||
|
||||
DisplayTask::DisplayTask()
|
||||
: Task("DisplayTask", 0)
|
||||
{
|
||||
}
|
||||
|
||||
DisplayTask::~DisplayTask()
|
||||
{
|
||||
}
|
||||
|
||||
bool DisplayTask::setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig)
|
||||
{
|
||||
Display::instance().setup(boardConfig);
|
||||
std::shared_ptr<StatusFrame> statusFrame = std::shared_ptr<StatusFrame>(new StatusFrame(TaskManager::instance().getTasks()));
|
||||
Display::instance().setStatusFrame(statusFrame);
|
||||
_stateInfo = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DisplayTask::loop(std::shared_ptr<Configuration> config)
|
||||
{
|
||||
Display::instance().update();
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#ifndef TASK_DISPLAY_H_
|
||||
#define TASK_DISPLAY_H_
|
||||
|
||||
#include <Display.h>
|
||||
#include <TaskManager.h>
|
||||
|
||||
class DisplayTask : public Task
|
||||
{
|
||||
public:
|
||||
DisplayTask();
|
||||
virtual ~DisplayTask();
|
||||
|
||||
virtual bool setup(std::shared_ptr<Configuration> config, std::shared_ptr<BoardConfig> boardConfig) override;
|
||||
virtual bool loop(std::shared_ptr<Configuration> config) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue