Merge branch 'master' into tft-gui-work

This commit is contained in:
Manuel 2024-06-17 22:17:45 +02:00 committed by GitHub
commit 5936d0c06b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 63 additions and 21 deletions

View File

@ -254,7 +254,7 @@ jobs:
chmod +x ./output/device-update.sh chmod +x ./output/device-update.sh
- name: Zip firmware - name: Zip firmware
run: zip -j -9 -r ./firmware-${{ steps.version.outputs.version }}.zip ./output run: zip -j -9 -r ./firmware-${{ steps.version.outputs.version }}.zip ./output -x *.deb
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:

View File

@ -3,5 +3,6 @@
"editor.defaultFormatter": "trunk.io", "editor.defaultFormatter": "trunk.io",
"trunk.enableWindows": true, "trunk.enableWindows": true,
"files.insertFinalNewline": false, "files.insertFinalNewline": false,
"files.trimFinalNewlines": false "files.trimFinalNewlines": false,
"cmake.configureOnOpen": false
} }

View File

@ -80,7 +80,7 @@ monitor_speed = 115200
lib_deps = lib_deps =
jgromes/RadioLib@~6.6.0 jgromes/RadioLib@~6.6.0
https://github.com/meshtastic/esp8266-oled-ssd1306.git#69ba98fa30e67b12d4577b121f210f3eb7049d6b ; ESP8266_SSD1306 https://github.com/meshtastic/esp8266-oled-ssd1306.git#dcacac5d2c7942376bc17f7079cced6a73cb659f ; ESP8266_SSD1306
mathertel/OneButton@^2.5.0 ; OneButton library for non-blocking button debounce mathertel/OneButton@^2.5.0 ; OneButton library for non-blocking button debounce
https://github.com/meshtastic/arduino-fsm.git#7db3702bf0cfe97b783d6c72595e3f38e0b19159 https://github.com/meshtastic/arduino-fsm.git#7db3702bf0cfe97b783d6c72595e3f38e0b19159
https://github.com/meshtastic/TinyGPSPlus.git#71a82db35f3b973440044c476d4bcdc673b104f4 https://github.com/meshtastic/TinyGPSPlus.git#71a82db35f3b973440044c476d4bcdc673b104f4

View File

@ -1,7 +1,7 @@
#include "InputBroker.h" #include "InputBroker.h"
#include "PowerFSM.h" // needed for event trigger #include "PowerFSM.h" // needed for event trigger
InputBroker *inputBroker; InputBroker *inputBroker = nullptr;
InputBroker::InputBroker(){}; InputBroker::InputBroker(){};

View File

@ -1,5 +1,6 @@
#include "cardKbI2cImpl.h" #include "cardKbI2cImpl.h"
#include "InputBroker.h" #include "InputBroker.h"
#include "main.h"
CardKbI2cImpl *cardKbI2cImpl; CardKbI2cImpl *cardKbI2cImpl;

View File

@ -1,6 +1,5 @@
#pragma once #pragma once
#include "kbI2cBase.h" #include "kbI2cBase.h"
#include "main.h"
/** /**
* @brief The idea behind this class to have static methods for the event handlers. * @brief The idea behind this class to have static methods for the event handlers.

View File

@ -42,13 +42,14 @@
#endif #endif
#if !MESHTASTIC_EXCLUDE_BLUETOOTH #if !MESHTASTIC_EXCLUDE_BLUETOOTH
#include "nimble/NimbleBluetooth.h" #include "nimble/NimbleBluetooth.h"
NimbleBluetooth *nimbleBluetooth; NimbleBluetooth *nimbleBluetooth = nullptr;
#endif #endif
#endif #endif
#ifdef ARCH_NRF52 #ifdef ARCH_NRF52
#include "NRF52Bluetooth.h" #include "NRF52Bluetooth.h"
NRF52Bluetooth *nrf52Bluetooth; NRF52Bluetooth *nrf52Bluetooth = nullptr;
;
#endif #endif
#if HAS_WIFI #if HAS_WIFI
@ -95,17 +96,17 @@ NRF52Bluetooth *nrf52Bluetooth;
#include "ButtonThread.h" #include "ButtonThread.h"
#endif #endif
#include "AmbientLightingThread.h"
#include "PowerFSMThread.h" #include "PowerFSMThread.h"
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR #if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
#include "AccelerometerThread.h" #include "AccelerometerThread.h"
#include "AmbientLightingThread.h" AccelerometerThread *accelerometerThread = nullptr;
AccelerometerThread *accelerometerThread;
#endif #endif
#ifdef HAS_I2S #ifdef HAS_I2S
#include "AudioThread.h" #include "AudioThread.h"
AudioThread *audioThread; AudioThread *audioThread = nullptr;
#endif #endif
#if HAS_TFT #if HAS_TFT
@ -123,7 +124,7 @@ DeviceScreen *deviceScreen = nullptr;
using namespace concurrency; using namespace concurrency;
// We always create a screen object, but we only init it if we find the hardware // We always create a screen object, but we only init it if we find the hardware
graphics::Screen *screen; graphics::Screen *screen = nullptr;
// Global power status // Global power status
meshtastic::PowerStatus *powerStatus = new meshtastic::PowerStatus(); meshtastic::PowerStatus *powerStatus = new meshtastic::PowerStatus();

View File

@ -42,6 +42,7 @@
#include "modules/Telemetry/DeviceTelemetry.h" #include "modules/Telemetry/DeviceTelemetry.h"
#endif #endif
#if HAS_SENSOR && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR #if HAS_SENSOR && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
#include "main.h"
#include "modules/Telemetry/AirQualityTelemetry.h" #include "modules/Telemetry/AirQualityTelemetry.h"
#include "modules/Telemetry/EnvironmentTelemetry.h" #include "modules/Telemetry/EnvironmentTelemetry.h"
#endif #endif

View File

@ -1,7 +1,10 @@
#include "OPT3001Sensor.h"
#include "../mesh/generated/meshtastic/telemetry.pb.h"
#include "TelemetrySensor.h"
#include "configuration.h" #include "configuration.h"
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
#include "../mesh/generated/meshtastic/telemetry.pb.h"
#include "OPT3001Sensor.h"
#include "TelemetrySensor.h"
#include <ClosedCube_OPT3001.h> #include <ClosedCube_OPT3001.h>
OPT3001Sensor::OPT3001Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_OPT3001, "OPT3001") {} OPT3001Sensor::OPT3001Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_OPT3001, "OPT3001") {}
@ -41,4 +44,6 @@ bool OPT3001Sensor::getMetrics(meshtastic_Telemetry *measurement)
LOG_INFO("Lux: %f\n", measurement->variant.environment_metrics.lux); LOG_INFO("Lux: %f\n", measurement->variant.environment_metrics.lux);
return true; return true;
} }
#endif

View File

@ -1,3 +1,8 @@
#pragma once
#include "configuration.h"
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
#include "../mesh/generated/meshtastic/telemetry.pb.h" #include "../mesh/generated/meshtastic/telemetry.pb.h"
#include "TelemetrySensor.h" #include "TelemetrySensor.h"
#include <ClosedCube_OPT3001.h> #include <ClosedCube_OPT3001.h>
@ -14,4 +19,6 @@ class OPT3001Sensor : public TelemetrySensor
OPT3001Sensor(); OPT3001Sensor();
virtual int32_t runOnce() override; virtual int32_t runOnce() override;
virtual bool getMetrics(meshtastic_Telemetry *measurement) override; virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
}; };
#endif

View File

@ -19,6 +19,3 @@ lib_deps =
debug_tool = jlink debug_tool = jlink
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
;upload_protocol = jlink ;upload_protocol = jlink
extra_scripts =
${env.extra_scripts}
./variants/rak2560/create_uf2.py

View File

@ -18,5 +18,35 @@ lib_deps =
rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2 rakwireless/RAKwireless NCP5623 RGB LED library@^1.0.2
https://github.com/meshtastic/RAK12034-BMX160.git#4821355fb10390ba8557dc43ca29a023bcfbb9d9 https://github.com/meshtastic/RAK12034-BMX160.git#4821355fb10390ba8557dc43ca29a023bcfbb9d9
debug_tool = jlink debug_tool = jlink
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
;upload_protocol = jlink ; Note: as of 6/2013 the serial/bootloader based programming takes approximately 30 seconds
;upload_protocol = jlink
; Allows programming and debug via the RAK NanoDAP as the default debugger tool for the RAK4631 (it is only $10!)
; programming time is about the same as the bootloader version.
; For information on this see the meshtastic developers documentation for "Development on the NRF52"
[env:rak4631_dap]
extends = env:rak4631
board_level = extra
; pyocd pack --i nrf52840
; eventually use platformio/tool-pyocd@^2.3600.0 instad
upload_protocol = custom
upload_command = pyocd flash -t nrf52840 $UPLOADERFLAGS $SOURCE
; Only reprogram the board if the code has changed
debug_load_mode = modified
;debug_load_mode = manual
debug_tool = custom
; We manually pass in the elf file so that pyocd can reverse engineer FreeRTOS data (running threads, etc...)
debug_server =
pyocd
gdbserver
-t
nrf52840
--elf
${platformio.build_dir}/${this.__env__}/firmware.elf
; The following is not needed because it automatically tries do this
;debug_server_ready_pattern = -.*GDB server started on port \d+.*
;debug_port = localhost:3333

View File

@ -1,4 +1,4 @@
[VERSION] [VERSION]
major = 2 major = 2
minor = 3 minor = 3
build = 13 build = 14