mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-31 02:45:41 +00:00
Merge branch 'master' into rak_wismeshtag
This commit is contained in:
commit
af3e3d93b2
@ -9,7 +9,7 @@ plugins:
|
||||
lint:
|
||||
enabled:
|
||||
- checkov@3.2.450
|
||||
- renovate@41.29.1
|
||||
- renovate@41.30.5
|
||||
- prettier@3.6.2
|
||||
- trufflehog@3.89.2
|
||||
- yamllint@1.37.1
|
||||
|
@ -23,11 +23,11 @@ build_flags =
|
||||
-DMESHTASTIC_EXCLUDE_SCREEN=1
|
||||
-DMESHTASTIC_EXCLUDE_MQTT=1
|
||||
-DMESHTASTIC_EXCLUDE_BLUETOOTH=1
|
||||
-DMESHTASTIC_EXCLUDE_GPS=1
|
||||
-DMESHTASTIC_EXCLUDE_WIFI=1
|
||||
-DMESHTASTIC_EXCLUDE_TZ=1 ; Exclude TZ to save some flash space.
|
||||
-DSERIAL_RX_BUFFER_SIZE=256 ; For GPS - the default of 64 is too small.
|
||||
-DPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF ; This is REQUIRED for at least traceroute debug prints - without it the length ends up uninitialized.
|
||||
;-DDEBUG_MUTE
|
||||
-DDEBUG_MUTE ; You can #undef DEBUG_MUTE in certain source files if you need the logs.
|
||||
-fmerge-all-constants
|
||||
-ffunction-sections
|
||||
-fdata-sections
|
||||
|
@ -3,6 +3,7 @@
|
||||
# trunk-ignore-all(flake8/F821): For SConstruct imports
|
||||
import sys
|
||||
from os.path import join
|
||||
import subprocess
|
||||
import json
|
||||
import re
|
||||
|
||||
@ -92,6 +93,17 @@ prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
|
||||
verObj = readProps(prefsLoc)
|
||||
print("Using meshtastic platformio-custom.py, firmware version " + verObj["long"] + " on " + env.get("PIOENV"))
|
||||
|
||||
# get repository owner if git is installed
|
||||
try:
|
||||
r_owner = (
|
||||
subprocess.check_output(["git", "config", "--get", "remote.origin.url"])
|
||||
.decode("utf-8")
|
||||
.strip().split("/")
|
||||
)
|
||||
repo_owner = r_owner[-2] + "/" + r_owner[-1].replace(".git", "")
|
||||
except subprocess.CalledProcessError:
|
||||
repo_owner = "unknown"
|
||||
|
||||
jsonLoc = env["PROJECT_DIR"] + "/userPrefs.jsonc"
|
||||
with open(jsonLoc) as f:
|
||||
jsonStr = re.sub("//.*","", f.read(), flags=re.MULTILINE)
|
||||
@ -117,6 +129,7 @@ flags = [
|
||||
"-DAPP_VERSION=" + verObj["long"],
|
||||
"-DAPP_VERSION_SHORT=" + verObj["short"],
|
||||
"-DAPP_ENV=" + env.get("PIOENV"),
|
||||
"-DAPP_REPO=" + repo_owner,
|
||||
] + pref_flags
|
||||
|
||||
print ("Using flags:")
|
||||
|
@ -39,9 +39,9 @@ template <typename T, std::size_t N> std::size_t array_count(const T (&)[N])
|
||||
return N;
|
||||
}
|
||||
|
||||
#if defined(NRF52840_XXAA) || defined(NRF52833_XXAA) || defined(ARCH_ESP32) || defined(ARCH_PORTDUINO)
|
||||
#if defined(RAK2560)
|
||||
HardwareSerial *GPS::_serial_gps = &Serial2;
|
||||
#if defined(NRF52840_XXAA) || defined(NRF52833_XXAA) || defined(ARCH_ESP32) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32WL)
|
||||
#if defined(GPS_SERIAL_PORT)
|
||||
HardwareSerial *GPS::_serial_gps = &GPS_SERIAL_PORT;
|
||||
#else
|
||||
HardwareSerial *GPS::_serial_gps = &Serial1;
|
||||
#endif
|
||||
|
@ -386,9 +386,7 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver)
|
||||
#ifdef T_WATCH_S3
|
||||
PMU->enablePowerOutput(XPOWERS_ALDO2);
|
||||
#endif
|
||||
#ifdef HELTEC_TRACKER_V1_X
|
||||
uint8_t tft_vext_enabled = digitalRead(VEXT_ENABLE);
|
||||
#endif
|
||||
|
||||
#if !ARCH_PORTDUINO
|
||||
dispdev->displayOn();
|
||||
#endif
|
||||
@ -400,10 +398,7 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver)
|
||||
|
||||
dispdev->displayOn();
|
||||
#ifdef HELTEC_TRACKER_V1_X
|
||||
// If the TFT VEXT power is not enabled, initialize the UI.
|
||||
if (!tft_vext_enabled) {
|
||||
ui->init();
|
||||
}
|
||||
ui->init();
|
||||
#endif
|
||||
#ifdef USE_ST7789
|
||||
pinMode(VTFT_CTRL, OUTPUT);
|
||||
|
@ -286,7 +286,7 @@ void lateInitVariant() {}
|
||||
*/
|
||||
void printInfo()
|
||||
{
|
||||
LOG_INFO("S:B:%d,%s,%s", HW_VENDOR, optstr(APP_VERSION), optstr(APP_ENV));
|
||||
LOG_INFO("S:B:%d,%s,%s,%s", HW_VENDOR, optstr(APP_VERSION), optstr(APP_ENV), optstr(APP_REPO));
|
||||
}
|
||||
#ifndef PIO_UNIT_TESTING
|
||||
void setup()
|
||||
|
@ -10,6 +10,10 @@
|
||||
#include "memGet.h"
|
||||
#include "configuration.h"
|
||||
|
||||
#ifdef ARCH_STM32WL
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
MemGet memGet;
|
||||
|
||||
/**
|
||||
@ -24,6 +28,9 @@ uint32_t MemGet::getFreeHeap()
|
||||
return dbgHeapFree();
|
||||
#elif defined(ARCH_RP2040)
|
||||
return rp2040.getFreeHeap();
|
||||
#elif defined(ARCH_STM32WL)
|
||||
struct mallinfo m = mallinfo();
|
||||
return m.fordblks; // Total free space (bytes)
|
||||
#else
|
||||
// this platform does not have heap management function implemented
|
||||
return UINT32_MAX;
|
||||
@ -42,6 +49,9 @@ uint32_t MemGet::getHeapSize()
|
||||
return dbgHeapTotal();
|
||||
#elif defined(ARCH_RP2040)
|
||||
return rp2040.getTotalHeap();
|
||||
#elif defined(ARCH_STM32WL)
|
||||
struct mallinfo m = mallinfo();
|
||||
return m.arena; // Non-mmapped space allocated (bytes)
|
||||
#else
|
||||
// this platform does not have heap management function implemented
|
||||
return UINT32_MAX;
|
||||
|
@ -266,9 +266,11 @@ meshtastic_MeshPacket *PositionModule::allocPositionPacket()
|
||||
|
||||
LOG_INFO("Position packet: time=%i lat=%i lon=%i", p.time, p.latitude_i, p.longitude_i);
|
||||
|
||||
#ifndef MESHTASTIC_EXCLUDE_ATAK
|
||||
// TAK Tracker devices should send their position in a TAK packet over the ATAK port
|
||||
if (config.device.role == meshtastic_Config_DeviceConfig_Role_TAK_TRACKER)
|
||||
return allocAtakPli();
|
||||
#endif
|
||||
|
||||
return allocDataProtobuf(p);
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
|
||||
// #define PIN_GPS_EN PIN_3V3_EN
|
||||
#define PIN_GPS_PPS (17) // Pulse per second input from the GPS
|
||||
|
||||
#define GPS_SERIAL_PORT Serial2
|
||||
// On RAK2560 the GPS is be on a different UART
|
||||
// #define GPS_RX_PIN PIN_SERIAL2_RX
|
||||
// #define GPS_TX_PIN PIN_SERIAL2_TX
|
||||
|
@ -15,7 +15,12 @@ build_flags =
|
||||
-DRADIOLIB_EXCLUDE_SX128X=1
|
||||
-DRADIOLIB_EXCLUDE_SX127X=1
|
||||
-DRADIOLIB_EXCLUDE_LR11X0=1
|
||||
-DHAS_SENSOR
|
||||
-DHAS_SENSOR=1
|
||||
-DENABLE_HWSERIAL2
|
||||
-DPIN_SERIAL2_TX=PA2
|
||||
-DPIN_SERIAL2_RX=PA3
|
||||
-DHAS_GPS=1
|
||||
-DGPS_SERIAL_PORT=Serial2
|
||||
|
||||
upload_port = stlink
|
||||
|
||||
|
@ -17,6 +17,8 @@ Do not expect a working Meshtastic device with this target.
|
||||
#define LED_PIN PB5
|
||||
#define LED_STATE_ON 1
|
||||
|
||||
#define WIO_E5
|
||||
|
||||
#if (defined(LED_BUILTIN) && LED_BUILTIN == PNUM_NOT_DEFINED)
|
||||
#undef LED_BUILTIN
|
||||
#define LED_BUILTIN (LED_PIN)
|
||||
|
Loading…
Reference in New Issue
Block a user