Merge branch 'master' into master

This commit is contained in:
Ben Meadors 2025-07-03 09:34:08 -05:00 committed by GitHub
commit 32cf35c340
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 20 additions and 5 deletions

View File

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

@ -1 +1 @@
Subproject commit 386fa53c1596c8dfc547521f08df107f4cb3a275
Subproject commit 584f0a3a359103acf0bfce506c1b1fc32c639841

View File

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

View File

@ -285,7 +285,11 @@ typedef enum _meshtastic_Config_LoRaConfig_RegionCode {
/* Philippines 915mhz */
meshtastic_Config_LoRaConfig_RegionCode_PH_915 = 21,
/* Australia / New Zealand 433MHz */
meshtastic_Config_LoRaConfig_RegionCode_ANZ_433 = 22
meshtastic_Config_LoRaConfig_RegionCode_ANZ_433 = 22,
/* Kazakhstan 433MHz */
meshtastic_Config_LoRaConfig_RegionCode_KZ_433 = 23,
/* Kazakhstan 863MHz */
meshtastic_Config_LoRaConfig_RegionCode_KZ_863 = 24
} meshtastic_Config_LoRaConfig_RegionCode;
/* Standard predefined channel settings
@ -681,8 +685,8 @@ extern "C" {
#define _meshtastic_Config_DisplayConfig_CompassOrientation_ARRAYSIZE ((meshtastic_Config_DisplayConfig_CompassOrientation)(meshtastic_Config_DisplayConfig_CompassOrientation_DEGREES_270_INVERTED+1))
#define _meshtastic_Config_LoRaConfig_RegionCode_MIN meshtastic_Config_LoRaConfig_RegionCode_UNSET
#define _meshtastic_Config_LoRaConfig_RegionCode_MAX meshtastic_Config_LoRaConfig_RegionCode_ANZ_433
#define _meshtastic_Config_LoRaConfig_RegionCode_ARRAYSIZE ((meshtastic_Config_LoRaConfig_RegionCode)(meshtastic_Config_LoRaConfig_RegionCode_ANZ_433+1))
#define _meshtastic_Config_LoRaConfig_RegionCode_MAX meshtastic_Config_LoRaConfig_RegionCode_KZ_863
#define _meshtastic_Config_LoRaConfig_RegionCode_ARRAYSIZE ((meshtastic_Config_LoRaConfig_RegionCode)(meshtastic_Config_LoRaConfig_RegionCode_KZ_863+1))
#define _meshtastic_Config_LoRaConfig_ModemPreset_MIN meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST
#define _meshtastic_Config_LoRaConfig_ModemPreset_MAX meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO

View File

@ -642,6 +642,11 @@ bool loadConfig(const char *configPath)
settingsMap[tbLeftPin] = yamlConfig["Input"]["TrackballLeft"].as<int>(RADIOLIB_NC);
settingsMap[tbRightPin] = yamlConfig["Input"]["TrackballRight"].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"]) {

View File

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