Merge branch 'master' into tft-gui-work

This commit is contained in:
Manuel 2024-04-22 23:13:35 +02:00 committed by GitHub
commit 269e861b43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 18 additions and 10 deletions

View File

@ -2,14 +2,17 @@
extends = esp32_base extends = esp32_base
build_src_filter = build_src_filter =
${esp32_base.build_src_filter} -<nimble/> -<mesh/raspihttp> ${esp32_base.build_src_filter} - <libpax/> -<nimble/> -<mesh/raspihttp>
monitor_speed = 115200 monitor_speed = 115200
build_flags = build_flags =
${esp32_base.build_flags} ${esp32_base.build_flags}
-DHAS_BLUETOOTH=0 -DHAS_BLUETOOTH=0
-DMESHTASTIC_EXCLUDE_PAXCOUNTER
-DMESHTASTIC_EXCLUDE_BLUETOOTH
lib_ignore = lib_ignore =
${esp32_base.lib_ignore} ${esp32_base.lib_ignore}
NimBLE-Arduino NimBLE-Arduino
libpax

View File

@ -452,7 +452,7 @@ bool GPS::setup()
// Set the NEMA output messages // Set the NEMA output messages
// Ask for only RMC and GGA // Ask for only RMC and GGA
uint8_t fields[] = {CAS_NEMA_RMC, CAS_NEMA_GGA}; uint8_t fields[] = {CAS_NEMA_RMC, CAS_NEMA_GGA};
for (int i = 0; i < sizeof(fields); i++) { for (uint i = 0; i < sizeof(fields); i++) {
// Construct a CAS-CFG-MSG packet // Construct a CAS-CFG-MSG packet
uint8_t cas_cfg_msg_packet[] = {0x4e, fields[i], 0x01, 0x00}; uint8_t cas_cfg_msg_packet[] = {0x4e, fields[i], 0x01, 0x00};
msglen = makeCASPacket(0x06, 0x01, sizeof(cas_cfg_msg_packet), cas_cfg_msg_packet); msglen = makeCASPacket(0x06, 0x01, sizeof(cas_cfg_msg_packet), cas_cfg_msg_packet);
@ -1584,7 +1584,7 @@ bool GPS::hasFlow()
bool GPS::whileIdle() bool GPS::whileIdle()
{ {
int charsInBuf = 0; uint charsInBuf = 0;
bool isValid = false; bool isValid = false;
if (!isAwake) { if (!isAwake) {
clearBuffer(); clearBuffer();

View File

@ -194,6 +194,11 @@ const char *getDeviceName()
static int32_t ledBlinker() static int32_t ledBlinker()
{ {
// Still set up the blinking (heartbeat) interval but skip code path below, so LED will blink if
// config.device.led_heartbeat_disabled is changed
if (config.device.led_heartbeat_disabled)
return 1000;
static bool ledOn; static bool ledOn;
ledOn ^= 1; ledOn ^= 1;

View File

@ -492,7 +492,7 @@ void RadioInterface::applyModemConfig()
// If user has manually specified a channel num, then use that, otherwise generate one by hashing the name // If user has manually specified a channel num, then use that, otherwise generate one by hashing the name
const char *channelName = channels.getName(channels.getPrimaryIndex()); const char *channelName = channels.getName(channels.getPrimaryIndex());
// channel_num is actually (channel_num - 1), since modulus (%) returns values from 0 to (numChannels - 1) // channel_num is actually (channel_num - 1), since modulus (%) returns values from 0 to (numChannels - 1)
int channel_num = (loraConfig.channel_num ? loraConfig.channel_num - 1 : hash(channelName)) % numChannels; uint channel_num = (loraConfig.channel_num ? loraConfig.channel_num - 1 : hash(channelName)) % numChannels;
// Check if we use the default frequency slot // Check if we use the default frequency slot
RadioInterface::uses_default_frequency_slot = RadioInterface::uses_default_frequency_slot =

View File

@ -51,7 +51,7 @@ uint8_t RoutingModule::getHopLimitForResponse(uint8_t hopStart, uint8_t hopLimit
uint8_t hopsUsed = hopStart < hopLimit ? config.lora.hop_limit : hopStart - hopLimit; uint8_t hopsUsed = hopStart < hopLimit ? config.lora.hop_limit : hopStart - hopLimit;
if (hopsUsed > config.lora.hop_limit) { if (hopsUsed > config.lora.hop_limit) {
return hopsUsed; // If the request used more hops than the limit, use the same amount of hops return hopsUsed; // If the request used more hops than the limit, use the same amount of hops
} else if (hopsUsed + 2 < config.lora.hop_limit) { } else if ((uint8_t)(hopsUsed + 2) < config.lora.hop_limit) {
return hopsUsed + 2; // Use only the amount of hops needed with some margin as the way back may be different return hopsUsed + 2; // Use only the amount of hops needed with some margin as the way back may be different
} }
} }

View File

@ -1,5 +1,5 @@
#include "configuration.h" #include "configuration.h"
#if defined(ARCH_ESP32) #if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_PAXCOUNTER
#include "Default.h" #include "Default.h"
#include "MeshService.h" #include "MeshService.h"
#include "PaxcounterModule.h" #include "PaxcounterModule.h"

View File

@ -211,7 +211,7 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false)
// esp_wifi_stop(); // esp_wifi_stop();
waitEnterSleep(skipPreflight); waitEnterSleep(skipPreflight);
#ifdef ARCH_ESP32 #if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_BLUETOOTH
// Full shutdown of bluetooth hardware // Full shutdown of bluetooth hardware
if (nimbleBluetooth) if (nimbleBluetooth)
nimbleBluetooth->deinit(); nimbleBluetooth->deinit();

View File

@ -14,7 +14,7 @@
#define BATTERY_PIN 26 #define BATTERY_PIN 26
#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION #define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION
// ratio of voltage divider = 3.0 (R17=200k, R18=100k) // ratio of voltage divider = 3.0 (R17=200k, R18=100k)
#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic #define ADC_MULTIPLIER 1.84
#define DETECTION_SENSOR_EN 28 #define DETECTION_SENSOR_EN 28
@ -47,4 +47,4 @@
// DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3 // DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3
#define SX126X_DIO2_AS_RF_SWITCH #define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 #define SX126X_DIO3_TCXO_VOLTAGE 1.8
#endif #endif