Merge branch 'master' into chatter_2_fixes

This commit is contained in:
Jason P 2025-07-03 08:03:13 -05:00 committed by GitHub
commit 66a8521389
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 3 deletions

View File

@ -22,5 +22,5 @@ Input:
TrackballLeft: 5 TrackballLeft: 5
TrackballRight: 26 TrackballRight: 26
TrackballPress: 13 TrackballPress: 13
TrackballDirection: FALLING
# User: 21 # User: 21

View File

@ -633,8 +633,7 @@ void menuHandler::BrightnessPickerMenu()
if (selected != 0) { // Not "Back" if (selected != 0) { // Not "Back"
// Apply brightness immediately // Apply brightness immediately
#if defined(HELTEC_MESH_NODE_T114) || defined(HELTEC_VISION_MASTER_T190) || defined(HELTEC_VISION_MASTER_E213) || \ #if defined(HELTEC_MESH_NODE_T114) || defined(HELTEC_VISION_MASTER_T190)
defined(HELTEC_VISION_MASTER_E290)
// For HELTEC devices, use analogWrite to control backlight // For HELTEC devices, use analogWrite to control backlight
analogWrite(VTFT_LEDA, uiconfig.screen_brightness); analogWrite(VTFT_LEDA, uiconfig.screen_brightness);
#elif defined(ST7789_CS) #elif defined(ST7789_CS)

View File

@ -4,8 +4,13 @@
#include "mesh/NodeDB.h" #include "mesh/NodeDB.h"
#ifndef TB_DIRECTION #ifndef TB_DIRECTION
#if ARCH_PORTDUINO
#include "PortduinoGlue.h"
#define TB_DIRECTION (PinStatus) settingsMap[tbDirection]
#else
#define TB_DIRECTION RISING #define TB_DIRECTION RISING
#endif #endif
#endif
class TrackballInterruptBase : public Observable<const InputEvent *>, public concurrency::OSThread class TrackballInterruptBase : public Observable<const InputEvent *>, public concurrency::OSThread
{ {

View File

@ -642,6 +642,11 @@ bool loadConfig(const char *configPath)
settingsMap[tbLeftPin] = yamlConfig["Input"]["TrackballLeft"].as<int>(RADIOLIB_NC); settingsMap[tbLeftPin] = yamlConfig["Input"]["TrackballLeft"].as<int>(RADIOLIB_NC);
settingsMap[tbRightPin] = yamlConfig["Input"]["TrackballRight"].as<int>(RADIOLIB_NC); settingsMap[tbRightPin] = yamlConfig["Input"]["TrackballRight"].as<int>(RADIOLIB_NC);
settingsMap[tbPressPin] = yamlConfig["Input"]["TrackballPress"].as<int>(RADIOLIB_NC); settingsMap[tbPressPin] = yamlConfig["Input"]["TrackballPress"].as<int>(RADIOLIB_NC);
if (yamlConfig["Input"]["TrackballDirection"].as<std::string>("RISING") == "RISING") {
settingsMap[tbDirection] = 4;
} else if (yamlConfig["Input"]["TrackballDirection"].as<std::string>("RISING") == "FALLING") {
settingsMap[tbDirection] = 3;
}
} }
if (yamlConfig["Webserver"]) { if (yamlConfig["Webserver"]) {

View File

@ -63,6 +63,7 @@ enum configNames {
tbLeftPin, tbLeftPin,
tbRightPin, tbRightPin,
tbPressPin, tbPressPin,
tbDirection,
spidev, spidev,
spiSpeed, spiSpeed,
i2cdev, i2cdev,