Merge branch 'master' into detsensor_broadcast_changes

This commit is contained in:
Augusto Zanellato 2024-09-24 23:00:35 +02:00 committed by GitHub
commit 881f133021
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 72 additions and 66 deletions

View File

@ -51,6 +51,7 @@ jobs:
matrix: ${{ fromJson(needs.setup.outputs.check) }} matrix: ${{ fromJson(needs.setup.outputs.check) }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event_name != 'workflow_dispatch' }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Build base - name: Build base
@ -124,6 +125,7 @@ jobs:
after-checks: after-checks:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event_name != 'workflow_dispatch' }}
needs: [check] needs: [check]
steps: steps:
- name: Checkout code - name: Checkout code
@ -137,8 +139,7 @@ jobs:
contents: write contents: write
pull-requests: write pull-requests: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs: [
[
build-esp32, build-esp32,
build-esp32-s3, build-esp32-s3,
build-esp32-c3, build-esp32-c3,
@ -147,7 +148,7 @@ jobs:
build-stm32, build-stm32,
package-raspbian, package-raspbian,
package-raspbian-armv7l, package-raspbian-armv7l,
package-native, # package-native,
] ]
steps: steps:
- name: Checkout code - name: Checkout code
@ -231,7 +232,7 @@ jobs:
release-artifacts: release-artifacts:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' }} if: ${{ github.event_name == 'workflow_dispatch' }}
needs: [gather-artifacts, after-checks] needs: [gather-artifacts]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4

View File

@ -57,35 +57,50 @@ jobs:
reporter: java-junit reporter: java-junit
hardware-tests: hardware-tests:
runs-on: ubuntu-latest runs-on: test-runner
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: '3.10'
# pipx install "setuptools<72"
- name: Upgrade python tools - name: Upgrade python tools
shell: bash shell: bash
run: | run: |
python -m pip install --upgrade pip pipx install adafruit-nrfutil
pip install -U --no-build-isolation --no-cache-dir "setuptools<72" pipx install poetry
pip install -U platformio adafruit-nrfutil --no-build-isolation pipx install meshtastic --pip-args=--pre
pip install -U poetry --no-build-isolation
pip install -U meshtastic --pre --no-build-isolation
- name: Install PlatformIO from script
shell: bash
run: |
curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
python3 get-platformio.py
- name: Upgrade platformio - name: Upgrade platformio
shell: bash shell: bash
run: | run: |
export PATH=$PATH:$HOME/.local/bin
pio upgrade pio upgrade
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Setup pnpm - name: Setup pnpm
uses: pnpm/action-setup@v4 uses: pnpm/action-setup@v4
with: with:
version: latest version: latest
- name: Install Dependencies - name: Install dependencies, setup devices and run
run: pnpm install shell: bash
run: |
- name: Setup devices git submodule update --init --recursive
run: pnpm run setup cd meshtestic/
pnpm install
- name: Execute end to end tests on connected hardware pnpm run setup
run: pnpm run test pnpm run test

@ -1 +1 @@
Subproject commit 37245b3d612a9272f546bbb092837bafdad46bc2 Subproject commit dcac7e5673005f4d8a2b1f0f6e06877b689d7519

View File

@ -664,7 +664,7 @@ bool GPS::setup()
// As the M10 has no flash, the best we can do to preserve the config is to set it in RAM and BBR. // As the M10 has no flash, the best we can do to preserve the config is to set it in RAM and BBR.
// BBR will survive a restart, and power off for a while, but modules with small backup // BBR will survive a restart, and power off for a while, but modules with small backup
// batteries or super caps will not retain the config for a long power off time. // batteries or super caps will not retain the config for a long power off time.
msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE), _message_SAVE); msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE_10), _message_SAVE_10);
_serial_gps->write(UBXscratch, msglen); _serial_gps->write(UBXscratch, msglen);
if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) { if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) {
LOG_WARN("Unable to save GNSS module configuration.\n"); LOG_WARN("Unable to save GNSS module configuration.\n");

View File

@ -134,6 +134,7 @@ class GPS : private concurrency::OSThread
static const uint8_t _message_GGA[]; static const uint8_t _message_GGA[];
static const uint8_t _message_PMS[]; static const uint8_t _message_PMS[];
static const uint8_t _message_SAVE[]; static const uint8_t _message_SAVE[];
static const uint8_t _message_SAVE_10[];
// VALSET Commands for M10 // VALSET Commands for M10
static const uint8_t _message_VALSET_PM[]; static const uint8_t _message_VALSET_PM[];

View File

@ -323,6 +323,13 @@ const uint8_t GPS::_message_SAVE[] = {
0x17 // deviceMask: BBR, Flash, EEPROM, and SPI Flash 0x17 // deviceMask: BBR, Flash, EEPROM, and SPI Flash
}; };
const uint8_t GPS::_message_SAVE_10[] = {
0x00, 0x00, 0x00, 0x00, // clearMask: no sections cleared
0xFF, 0xFF, 0x00, 0x00, // saveMask: save all sections
0x00, 0x00, 0x00, 0x00, // loadMask: no sections loaded
0x01 // deviceMask: only save to BBR
};
// As the M10 has no flash, the best we can do to preserve the config is to set it in RAM and BBR. // As the M10 has no flash, the best we can do to preserve the config is to set it in RAM and BBR.
// BBR will survive a restart, and power off for a while, but modules with small backup // BBR will survive a restart, and power off for a while, but modules with small backup
// batteries or super caps will not retain the config for a long power off time. // batteries or super caps will not retain the config for a long power off time.
@ -342,36 +349,36 @@ const uint8_t GPS::_message_SAVE[] = {
// has details on low-power modes // has details on low-power modes
/* /*
CFG-PM2 has been replaced by many CFG-PM commands OPERATEMODE E1 2 (0 | 1 | 2)
CFG-PMS has been removed POSUPDATEPERIOD U4 5
ACQPERIOD U4 10
CFG-PM-OPERATEMODE E1 (0 | 1 | 2) -> 1 (PSMOO), because sporadic position updates are required instead of continous tracking <10s GRIDOFFSET U4 0
(PSMCT) CFG-PM-POSUPDATEPERIOD U4 -> 0ms, no self-timed wakup because receiver power mode is controlled via "software standby ONTIME U2 1
mode" by legacy UBX-RXM-PMREQ request CFG-PM-ACQPERIOD U4 -> 0ms, because receiver power mode is controlled via "software standby MINACQTIME U1 0
mode" by legacy UBX-RXM-PMREQ request CFG-PM-ONTIME U4 -> 0ms, optional I guess CFG-PM-EXTINTBACKUP L -> 1, force receiver into MAXACQTIME U1 0
BACKUP mode when EXTINT (should be connected to GPS_EN_PIN) pin is "low" DONOTENTEROFF L 1
WAITTIMEFIX L 1
This is required because the receiver never enters low power mode if microcontroller is in deep-sleep. UPDATEEPH L 1
Maybe the changing UART_RX levels trigger a wakeup but even with UBX-RXM-PMREQ[12] = 0x00 (all external wakeup sources disabled) EXTINTWAKE L 0 no ext ints
the receivcer remains in aquisition state -> potentially a bug EXTINTBACKUP L 0 no ext ints
EXTINTINACTIVE L 0 no ext ints
Workaround: Control the EXTINT pin by the GPS_EN_PIN signal EXTINTACTIVITY U4 0 no ext ints
LIMITPEAKCURRENT L 1
As mentioned in the M10 operational issues down below, power save won't allow the use of BDS B1C.
CFG-SIGNAL-BDS_B1C_ENA L -> 0
// Ram layer config message: // Ram layer config message:
// 01 01 00 00 01 00 D0 20 01 02 00 D0 40 00 00 00 00 03 00 D0 40 00 00 00 00 05 00 D0 30 00 00 0D 00 D0 10 01 // b5 62 06 8a 26 00 00 01 00 00 01 00 d0 20 02 02 00 d0 40 05 00 00 00 05 00 d0 30 01 00 08 00 d0 10 01 09 00 d0 10 01 10 00 d0
// 10 01 8b de
// BBR layer config message: // BBR layer config message:
// 01 02 00 00 01 00 D0 20 01 02 00 D0 40 00 00 00 00 03 00 D0 40 00 00 00 00 05 00 D0 30 00 00 0D 00 D0 10 01 // b5 62 06 8a 26 00 00 02 00 00 01 00 d0 20 02 02 00 d0 40 05 00 00 00 05 00 d0 30 01 00 08 00 d0 10 01 09 00 d0 10 01 10 00 d0
// 10 01 8c 03
*/ */
const uint8_t GPS::_message_VALSET_PM_RAM[] = {0x01, 0x01, 0x00, 0x00, 0x0F, 0x00, 0x31, 0x10, 0x00, 0x01, 0x00, 0xD0, 0x20, 0x01, const uint8_t GPS::_message_VALSET_PM_RAM[] = {0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd0, 0x20, 0x02, 0x02, 0x00, 0xd0, 0x40,
0x02, 0x00, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xD0, 0x40, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0xd0, 0x30, 0x01, 0x00, 0x08, 0x00, 0xd0,
0x00, 0x00, 0x05, 0x00, 0xD0, 0x30, 0x00, 0x00, 0x0D, 0x00, 0xD0, 0x10, 0x01}; 0x10, 0x01, 0x09, 0x00, 0xd0, 0x10, 0x01, 0x10, 0x00, 0xd0, 0x10, 0x01};
const uint8_t GPS::_message_VALSET_PM_BBR[] = {0x01, 0x02, 0x00, 0x00, 0x0F, 0x00, 0x31, 0x10, 0x00, 0x01, 0x00, 0xD0, 0x20, 0x01, const uint8_t GPS::_message_VALSET_PM_BBR[] = {0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0xd0, 0x20, 0x02, 0x02, 0x00, 0xd0, 0x40,
0x02, 0x00, 0xD0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xD0, 0x40, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0xd0, 0x30, 0x01, 0x00, 0x08, 0x00, 0xd0,
0x00, 0x00, 0x05, 0x00, 0xD0, 0x30, 0x00, 0x00, 0x0D, 0x00, 0xD0, 0x10, 0x01}; 0x10, 0x01, 0x09, 0x00, 0xd0, 0x10, 0x01, 0x10, 0x00, 0xd0, 0x10, 0x01};
/* /*
CFG-ITFM replaced by 5 valset messages which can be combined into one for RAM and one for BBR CFG-ITFM replaced by 5 valset messages which can be combined into one for RAM and one for BBR

View File

@ -11,9 +11,6 @@
#include "airtime.h" #include "airtime.h"
#include "buzz.h" #include "buzz.h"
#include "error.h"
#include "power.h"
// #include "debug.h"
#include "FSCommon.h" #include "FSCommon.h"
#include "Led.h" #include "Led.h"
#include "RTC.h" #include "RTC.h"
@ -22,6 +19,8 @@
#include "concurrency/OSThread.h" #include "concurrency/OSThread.h"
#include "concurrency/Periodic.h" #include "concurrency/Periodic.h"
#include "detect/ScanI2C.h" #include "detect/ScanI2C.h"
#include "error.h"
#include "power.h"
#if !MESHTASTIC_EXCLUDE_I2C #if !MESHTASTIC_EXCLUDE_I2C
#include "detect/ScanI2CTwoWire.h" #include "detect/ScanI2CTwoWire.h"
@ -39,7 +38,6 @@
#include "target_specific.h" #include "target_specific.h"
#include <memory> #include <memory>
#include <utility> #include <utility>
// #include <driver/rtc_io.h>
#ifdef ARCH_ESP32 #ifdef ARCH_ESP32
#if !MESHTASTIC_EXCLUDE_WEBSERVER #if !MESHTASTIC_EXCLUDE_WEBSERVER
@ -1106,10 +1104,6 @@ void loop()
{ {
runASAP = false; runASAP = false;
// axpDebugOutput.loop();
// heap_caps_check_integrity_all(true); // FIXME - disable this expensive check
#ifdef ARCH_ESP32 #ifdef ARCH_ESP32
esp32Loop(); esp32Loop();
#endif #endif
@ -1118,9 +1112,6 @@ void loop()
#endif #endif
powerCommandsCheck(); powerCommandsCheck();
// For debugging
// if (rIf) ((RadioLibInterface *)rIf)->isActivelyReceiving();
#ifdef DEBUG_STACK #ifdef DEBUG_STACK
static uint32_t lastPrint = 0; static uint32_t lastPrint = 0;
if (!Throttle::isWithinTimespanMs(lastPrint, 10 * 1000L)) { if (!Throttle::isWithinTimespanMs(lastPrint, 10 * 1000L)) {
@ -1129,22 +1120,13 @@ void loop()
} }
#endif #endif
// TODO: This should go into a thread handled by FreeRTOS.
// handleWebResponse();
service->loop(); service->loop();
long delayMsec = mainController.runOrDelay(); long delayMsec = mainController.runOrDelay();
/* if (mainController.nextThread && delayMsec)
LOG_DEBUG("Next %s in %ld\n", mainController.nextThread->ThreadName.c_str(),
mainController.nextThread->tillRun(millis())); */
// We want to sleep as long as possible here - because it saves power // We want to sleep as long as possible here - because it saves power
if (!runASAP && loopCanSleep()) { if (!runASAP && loopCanSleep()) {
// if(delayMsec > 100) LOG_DEBUG("sleeping %ld\n", delayMsec);
mainDelay.delay(delayMsec); mainDelay.delay(delayMsec);
} }
// if (didWake) LOG_DEBUG("wake!\n");
} }
#endif #endif

View File

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