2024-04-15 14:54:47 +02:00
|
|
|
#if HAS_TFT // VIEW_128x64
|
2024-02-25 20:29:59 +01:00
|
|
|
|
2025-01-12 18:08:57 +01:00
|
|
|
#include "graphics/view/OLED/OLEDView_128x64.h"
|
|
|
|
|
#include "graphics/driver/DisplayDriverFactory.h"
|
|
|
|
|
#include "graphics/view/OLED/OLEDViewController.h"
|
2024-05-28 14:43:15 +02:00
|
|
|
#include "ui.h" // this is the ui generated by eez-studio
|
2025-01-12 18:08:57 +01:00
|
|
|
#include "util/ILog.h"
|
2024-02-24 17:19:27 +01:00
|
|
|
#include <cstdio>
|
|
|
|
|
#include <ctime>
|
|
|
|
|
#include <functional>
|
|
|
|
|
|
2024-03-07 16:21:28 +01:00
|
|
|
OLEDView_128x64 *OLEDView_128x64::gui = nullptr;
|
2024-02-24 17:19:27 +01:00
|
|
|
|
2024-03-08 11:45:41 +01:00
|
|
|
OLEDView_128x64 *OLEDView_128x64::instance(void)
|
|
|
|
|
{
|
|
|
|
|
if (!gui)
|
2024-05-28 14:43:15 +02:00
|
|
|
gui = new OLEDView_128x64(nullptr, DisplayDriverFactory::create(128, 64));
|
2024-03-08 11:45:41 +01:00
|
|
|
return gui;
|
2024-02-24 17:19:27 +01:00
|
|
|
}
|
|
|
|
|
|
2024-04-15 14:54:47 +02:00
|
|
|
OLEDView_128x64 *OLEDView_128x64::instance(const DisplayDriverConfig &cfg)
|
2024-03-08 11:45:41 +01:00
|
|
|
{
|
2024-04-15 14:54:47 +02:00
|
|
|
if (!gui)
|
2024-05-28 14:43:15 +02:00
|
|
|
gui = new OLEDView_128x64(&cfg, DisplayDriverFactory::create(cfg));
|
2024-04-15 14:54:47 +02:00
|
|
|
return gui;
|
2024-03-08 11:45:41 +01:00
|
|
|
}
|
2024-04-15 14:54:47 +02:00
|
|
|
|
2024-06-06 09:38:45 +02:00
|
|
|
OLEDView_128x64::OLEDView_128x64(const DisplayDriverConfig *cfg, DisplayDriver *driver)
|
|
|
|
|
: MeshtasticView(cfg, driver, new OLEDViewController)
|
|
|
|
|
{
|
|
|
|
|
}
|
2024-02-24 17:19:27 +01:00
|
|
|
|
2024-03-08 11:45:41 +01:00
|
|
|
void OLEDView_128x64::init(IClientBase *client)
|
|
|
|
|
{
|
2024-10-17 09:06:42 +02:00
|
|
|
ILOG_DEBUG("OLEDView_128x64 init...");
|
2024-03-08 11:45:41 +01:00
|
|
|
MeshtasticView::init(client);
|
|
|
|
|
// ui_events_init();
|
2024-02-24 17:19:27 +01:00
|
|
|
}
|
|
|
|
|
|
2024-04-15 14:54:47 +02:00
|
|
|
void OLEDView_128x64::task_handler(void)
|
|
|
|
|
{
|
|
|
|
|
MeshtasticView::task_handler();
|
|
|
|
|
}
|
2024-02-24 17:19:27 +01:00
|
|
|
#endif
|