mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 06:02:05 +00:00
- G1 Explorer use correct display controller
- adhere UA font in modules
This commit is contained in:
parent
20bcf310d1
commit
267db05d69
7
.vscode/extensions.json
vendored
7
.vscode/extensions.json
vendored
@ -2,8 +2,9 @@
|
|||||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||||
// for the documentation about the extensions.json format
|
// for the documentation about the extensions.json format
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"ms-vscode.cpptools",
|
"platformio.platformio-ide"
|
||||||
"platformio.platformio-ide",
|
|
||||||
"trunk.io"
|
|
||||||
],
|
],
|
||||||
|
"unwantedRecommendations": [
|
||||||
|
"ms-vscode.cpptools-extension-pack"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 19d49ec5280b6904f8c4cd1182ba4250d4122dbe
|
Subproject commit fef42ee673658bdcd34b821233558406615e8ddd
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
GxEPD2_BW<TECHO_DISPLAY_MODEL, TECHO_DISPLAY_MODEL::HEIGHT> *adafruitDisplay;
|
GxEPD2_BW<TECHO_DISPLAY_MODEL, TECHO_DISPLAY_MODEL::HEIGHT> *adafruitDisplay;
|
||||||
|
|
||||||
EInkDisplay::EInkDisplay(uint8_t address, int sda, int scl, uint8_t screen_model)
|
EInkDisplay::EInkDisplay(uint8_t address, int sda, int scl, OLEDDISPLAY_GEOMETRY screen_geometry)
|
||||||
{
|
{
|
||||||
#if defined(TTGO_T_ECHO)
|
#if defined(TTGO_T_ECHO)
|
||||||
setGeometry(GEOMETRY_RAWMODE, TECHO_DISPLAY_MODEL::WIDTH, TECHO_DISPLAY_MODEL::HEIGHT);
|
setGeometry(GEOMETRY_RAWMODE, TECHO_DISPLAY_MODEL::WIDTH, TECHO_DISPLAY_MODEL::HEIGHT);
|
||||||
|
@ -22,7 +22,7 @@ class EInkDisplay : public OLEDDisplay
|
|||||||
/* constructor
|
/* constructor
|
||||||
FIXME - the parameters are not used, just a temporary hack to keep working like the old displays
|
FIXME - the parameters are not used, just a temporary hack to keep working like the old displays
|
||||||
*/
|
*/
|
||||||
EInkDisplay(uint8_t address, int sda, int scl, uint8_t screen_model);
|
EInkDisplay(uint8_t address, int sda, int scl, OLEDDISPLAY_GEOMETRY screen_geometry);
|
||||||
|
|
||||||
// Write the buffer to the display memory (for eink we only do this occasionally)
|
// Write the buffer to the display memory (for eink we only do this occasionally)
|
||||||
virtual void display(void) override;
|
virtual void display(void) override;
|
||||||
|
@ -888,8 +888,7 @@ static void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_
|
|||||||
// #else
|
// #else
|
||||||
Screen::Screen(uint8_t address, int sda, int scl)
|
Screen::Screen(uint8_t address, int sda, int scl)
|
||||||
: OSThread("Screen"), cmdQueue(32),
|
: OSThread("Screen"), cmdQueue(32),
|
||||||
dispdev(address, sda, scl,
|
dispdev(address, sda, scl, screen_geometry),
|
||||||
screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107 ? GEOMETRY_128_128 : GEOMETRY_128_64),
|
|
||||||
ui(&dispdev)
|
ui(&dispdev)
|
||||||
{
|
{
|
||||||
address_found = address;
|
address_found = address;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
static TFT_eSPI tft = TFT_eSPI(); // Invoke library, pins defined in User_Setup.h
|
static TFT_eSPI tft = TFT_eSPI(); // Invoke library, pins defined in User_Setup.h
|
||||||
|
|
||||||
TFTDisplay::TFTDisplay(uint8_t address, int sda, int scl, uint8_t screen_model)
|
TFTDisplay::TFTDisplay(uint8_t address, int sda, int scl, OLEDDISPLAY_GEOMETRY screen_geometry)
|
||||||
{
|
{
|
||||||
#ifdef SCREEN_ROTATE
|
#ifdef SCREEN_ROTATE
|
||||||
setGeometry(GEOMETRY_RAWMODE, TFT_HEIGHT, TFT_WIDTH);
|
setGeometry(GEOMETRY_RAWMODE, TFT_HEIGHT, TFT_WIDTH);
|
||||||
|
@ -18,7 +18,7 @@ class TFTDisplay : public OLEDDisplay
|
|||||||
/* constructor
|
/* constructor
|
||||||
FIXME - the parameters are not used, just a temporary hack to keep working like the old displays
|
FIXME - the parameters are not used, just a temporary hack to keep working like the old displays
|
||||||
*/
|
*/
|
||||||
TFTDisplay(uint8_t address, int sda, int scl, uint8_t screen_model);
|
TFTDisplay(uint8_t address, int sda, int scl, OLEDDISPLAY_GEOMETRY screen_geometry);
|
||||||
|
|
||||||
// Write the buffer to the display memory
|
// Write the buffer to the display memory
|
||||||
virtual void display(void) override;
|
virtual void display(void) override;
|
||||||
|
@ -82,6 +82,7 @@ meshtastic::NodeStatus *nodeStatus = new meshtastic::NodeStatus();
|
|||||||
/// The I2C address of our display (if found)
|
/// The I2C address of our display (if found)
|
||||||
uint8_t screen_found;
|
uint8_t screen_found;
|
||||||
uint8_t screen_model;
|
uint8_t screen_model;
|
||||||
|
OLEDDISPLAY_GEOMETRY screen_geometry = GEOMETRY_128_64;
|
||||||
|
|
||||||
// The I2C address of the cardkb or RAK14004 (if found)
|
// The I2C address of the cardkb or RAK14004 (if found)
|
||||||
uint8_t cardkb_found;
|
uint8_t cardkb_found;
|
||||||
@ -326,7 +327,12 @@ void setup()
|
|||||||
screen_model = config.display.oled;
|
screen_model = config.display.oled;
|
||||||
|
|
||||||
#if defined(USE_SH1107)
|
#if defined(USE_SH1107)
|
||||||
screen_model = Config_DisplayConfig_OledType_OLED_SH1107; // set dimension of 128x128
|
screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // set dimension of 128x128
|
||||||
|
display_geometry = GEOMETRY_128_128;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_SH1107_128_64)
|
||||||
|
screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Init our SPI controller (must be before screen and lora)
|
// Init our SPI controller (must be before screen and lora)
|
||||||
|
@ -20,6 +20,7 @@ extern NRF52Bluetooth *nrf52Bluetooth;
|
|||||||
|
|
||||||
extern uint8_t screen_found;
|
extern uint8_t screen_found;
|
||||||
extern uint8_t screen_model;
|
extern uint8_t screen_model;
|
||||||
|
extern OLEDDISPLAY_GEOMETRY screen_geometry;
|
||||||
extern uint8_t cardkb_found;
|
extern uint8_t cardkb_found;
|
||||||
extern uint8_t kb_model;
|
extern uint8_t kb_model;
|
||||||
extern uint8_t rtc_found;
|
extern uint8_t rtc_found;
|
||||||
|
@ -8,7 +8,11 @@
|
|||||||
#include "mesh/generated/meshtastic/cannedmessages.pb.h"
|
#include "mesh/generated/meshtastic/cannedmessages.pb.h"
|
||||||
|
|
||||||
#ifdef OLED_RU
|
#ifdef OLED_RU
|
||||||
#include "graphics/fonts/OLEDDisplayFontsRU.h"
|
#include "grahics/pfonts/OLEDDisplayFontsRU.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef OLED_UA
|
||||||
|
#include "grahics/fonts/OLEDDisplayFontsUA.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7735_CS)
|
#if defined(USE_EINK) || defined(ILI9341_DRIVER) || defined(ST7735_CS)
|
||||||
@ -20,8 +24,12 @@
|
|||||||
#ifdef OLED_RU
|
#ifdef OLED_RU
|
||||||
#define FONT_SMALL ArialMT_Plain_10_RU
|
#define FONT_SMALL ArialMT_Plain_10_RU
|
||||||
#else
|
#else
|
||||||
|
#ifdef OLED_UA
|
||||||
|
#define FONT_SMALL ArialMT_Plain_10_UA
|
||||||
|
#else
|
||||||
#define FONT_SMALL ArialMT_Plain_10
|
#define FONT_SMALL ArialMT_Plain_10
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#define FONT_MEDIUM ArialMT_Plain_16
|
#define FONT_MEDIUM ArialMT_Plain_16
|
||||||
#define FONT_LARGE ArialMT_Plain_24
|
#define FONT_LARGE ArialMT_Plain_24
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
#include "graphics/fonts/OLEDDisplayFontsRU.h"
|
#include "graphics/fonts/OLEDDisplayFontsRU.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef OLED_UA
|
||||||
|
#include "grahics/fonts/OLEDDisplayFontsUA.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
AudioModule
|
AudioModule
|
||||||
A interface to send raw codec2 audio data over the mesh network. Based on the example code from the ESP32_codec2 project.
|
A interface to send raw codec2 audio data over the mesh network. Based on the example code from the ESP32_codec2 project.
|
||||||
@ -53,8 +57,12 @@ AudioModule *audioModule;
|
|||||||
#ifdef OLED_RU
|
#ifdef OLED_RU
|
||||||
#define FONT_SMALL ArialMT_Plain_10_RU
|
#define FONT_SMALL ArialMT_Plain_10_RU
|
||||||
#else
|
#else
|
||||||
|
#ifdef OLED_UA
|
||||||
|
#define FONT_SMALL ArialMT_Plain_10_UA
|
||||||
|
#else
|
||||||
#define FONT_SMALL ArialMT_Plain_10
|
#define FONT_SMALL ArialMT_Plain_10
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#define FONT_MEDIUM ArialMT_Plain_16
|
#define FONT_MEDIUM ArialMT_Plain_16
|
||||||
#define FONT_LARGE ArialMT_Plain_24
|
#define FONT_LARGE ArialMT_Plain_24
|
||||||
#endif
|
#endif
|
||||||
|
@ -33,5 +33,4 @@
|
|||||||
#define BATTERY_SENSE_SAMPLES 15 // Set the number of samples, It has an effect of increasing sensitivity.
|
#define BATTERY_SENSE_SAMPLES 15 // Set the number of samples, It has an effect of increasing sensitivity.
|
||||||
#define ADC_MULTIPLIER 2
|
#define ADC_MULTIPLIER 2
|
||||||
|
|
||||||
//#define USE_SH1107 // Finally we will use SH1107 128x64 resolution driver, because SH1106 will shift the screen by 2 lines.
|
#define USE_SH1107_128_64
|
||||||
#define USE_SH1106
|
|
||||||
|
Loading…
Reference in New Issue
Block a user