2023-11-07 01:11:12 +01:00
|
|
|
#pragma once
|
|
|
|
|
2023-11-10 13:02:05 +01:00
|
|
|
#include <Fonts/FreeSans9pt7b.h>
|
2023-11-30 22:38:01 +01:00
|
|
|
#include <Fonts/FreeSansBold9pt7b.h>
|
|
|
|
#include <GxEPD2_BW.h>
|
2023-11-30 22:56:50 +01:00
|
|
|
|
2024-12-18 19:47:03 +01:00
|
|
|
|
2023-11-30 22:38:01 +01:00
|
|
|
#include <mcp23x17_pin.hpp>
|
2023-11-13 12:27:34 +01:00
|
|
|
#include <mutex>
|
2023-11-30 22:38:01 +01:00
|
|
|
#include <native_pin.hpp>
|
|
|
|
#include <regex>
|
2023-11-10 13:02:05 +01:00
|
|
|
|
2023-11-30 22:56:50 +01:00
|
|
|
#include "fonts/fonts.hpp"
|
|
|
|
#include "lib/config.hpp"
|
|
|
|
#include "lib/shared.hpp"
|
2024-07-29 20:49:46 +02:00
|
|
|
#include "icons/icons.h"
|
2023-11-30 22:56:50 +01:00
|
|
|
|
2023-11-10 19:52:06 +01:00
|
|
|
#ifdef USE_QR
|
2023-11-10 13:02:05 +01:00
|
|
|
#include "qrcodegen.h"
|
2023-11-10 19:52:06 +01:00
|
|
|
#endif
|
2023-11-12 12:38:28 +01:00
|
|
|
// extern TaskHandle_t epdTaskHandle;
|
|
|
|
|
2023-11-30 22:38:01 +01:00
|
|
|
typedef struct {
|
|
|
|
char dispNum;
|
2023-11-12 12:38:28 +01:00
|
|
|
} UpdateDisplayTaskItem;
|
2023-11-07 01:11:12 +01:00
|
|
|
|
2023-11-13 00:33:48 +01:00
|
|
|
void forceFullRefresh();
|
2023-11-13 17:33:09 +01:00
|
|
|
void refreshFromMemory();
|
2023-11-07 01:11:12 +01:00
|
|
|
void setupDisplays();
|
|
|
|
|
2023-11-30 22:38:01 +01:00
|
|
|
void splitText(const uint dispNum, const String &top, const String &bottom,
|
|
|
|
bool partial);
|
2023-11-08 20:29:06 +01:00
|
|
|
|
2023-11-07 01:11:12 +01:00
|
|
|
void showDigit(const uint dispNum, char chr, bool partial, const GFXfont *font);
|
2023-11-30 22:38:01 +01:00
|
|
|
void showChars(const uint dispNum, const String &chars, bool partial,
|
|
|
|
const GFXfont *font);
|
2023-11-10 19:52:06 +01:00
|
|
|
|
2023-11-07 01:11:12 +01:00
|
|
|
extern "C" void updateDisplay(void *pvParameters) noexcept;
|
2023-11-08 20:29:06 +01:00
|
|
|
void updateDisplayAlt(int epdIndex);
|
2023-11-12 12:38:28 +01:00
|
|
|
void prepareDisplayUpdateTask(void *pvParameters);
|
2023-11-07 01:11:12 +01:00
|
|
|
|
|
|
|
int getBgColor();
|
|
|
|
int getFgColor();
|
|
|
|
void setBgColor(int color);
|
|
|
|
void setFgColor(int color);
|
|
|
|
|
2024-07-29 20:49:46 +02:00
|
|
|
void renderIcon(const uint dispNum, const String &text, bool partial);
|
2023-11-30 22:38:01 +01:00
|
|
|
void renderText(const uint dispNum, const String &text, bool partial);
|
|
|
|
void renderQr(const uint dispNum, const String &text, bool partial);
|
2023-11-10 13:02:05 +01:00
|
|
|
|
2023-11-30 22:38:01 +01:00
|
|
|
void setEpdContent(std::array<String, NUM_SCREENS> newEpdContent,
|
|
|
|
bool forceUpdate);
|
2023-11-07 01:11:12 +01:00
|
|
|
void setEpdContent(std::array<String, NUM_SCREENS> newEpdContent);
|
2023-11-28 01:30:36 +01:00
|
|
|
|
|
|
|
void setEpdContent(std::array<std::string, NUM_SCREENS> newEpdContent);
|
|
|
|
|
2023-11-07 21:26:15 +01:00
|
|
|
std::array<String, NUM_SCREENS> getCurrentEpdContent();
|
2023-11-10 19:52:06 +01:00
|
|
|
void waitUntilNoneBusy();
|