mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-04 20:54:42 +00:00
commit
7cae8dc50f
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
@ -59,14 +59,14 @@ jobs:
|
|||||||
pio upgrade
|
pio upgrade
|
||||||
|
|
||||||
# We now run integration test before other build steps (to quickly see runtime failures)
|
# We now run integration test before other build steps (to quickly see runtime failures)
|
||||||
#- name: Build for native
|
- name: Build for native
|
||||||
# run: platformio run -e native
|
run: platformio run -e native
|
||||||
#- name: Integration test
|
- name: Integration test
|
||||||
# run: |
|
run: |
|
||||||
# .pio/build/native/program &
|
.pio/build/native/program &
|
||||||
# sleep 20 # 5 seconds was not enough
|
sleep 20 # 5 seconds was not enough
|
||||||
# echo "Simulator started, launching python test..."
|
echo "Simulator started, launching python test..."
|
||||||
# python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
||||||
|
|
||||||
# - name: Build for tbeam
|
# - name: Build for tbeam
|
||||||
# run: platformio run -e tbeam
|
# run: platformio run -e tbeam
|
||||||
|
9
bin/test-simulator.sh
Executable file
9
bin/test-simulator.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Starting simulator"
|
||||||
|
.pio/build/native/program &
|
||||||
|
sleep 20 # 5 seconds was not enough
|
||||||
|
|
||||||
|
echo "Simulator started, launching python test..."
|
||||||
|
python3 -c 'from meshtastic.test import testSimulator; testSimulator()'
|
||||||
|
|
@ -2,25 +2,23 @@
|
|||||||
|
|
||||||
You probably don't care about this section - skip to the next one.
|
You probably don't care about this section - skip to the next one.
|
||||||
|
|
||||||
## before next release
|
|
||||||
|
|
||||||
* fix python tool problem with windows and the heartbeat
|
* fix python tool problem with windows and the heartbeat
|
||||||
|
* router mode dropping messages? https://meshtastic.discourse.group/t/router-mode-missing-messages/3329/3
|
||||||
* fix ttgo eink screen
|
* fix ttgo eink screen
|
||||||
* fix this sleep problem: https://meshtastic.discourse.group/t/new-device-release-1-2-30-ready-for-alpha-testing/3272/13?u=geeksville
|
* DONE make native sim not touch hardware
|
||||||
* make native sim not touch hardware
|
* DONE reenable sim in CI builds
|
||||||
* reenable sim in CI builds
|
|
||||||
* figure our wss for mqtt.meshtastic - use cloudflare? 2052 ws, 2053 crypt
|
* figure our wss for mqtt.meshtastic - use cloudflare? 2052 ws, 2053 crypt
|
||||||
* release android APK - fix recent 1.2.28 crash report
|
|
||||||
* turn on setTx(timeout) and state = setDioIrqParams(SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT, SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT); in sx1262 code
|
|
||||||
* pine64 lora module
|
* pine64 lora module
|
||||||
* @havealoha fixedposition not working
|
* @havealoha fixedposition not working
|
||||||
* @luxonn reports that after a while the android app stops showing new messages
|
|
||||||
* ask for vercel access
|
* ask for vercel access
|
||||||
* finish plan for riot.im
|
* finish plan for riot.im
|
||||||
|
* turn on setTx(timeout) and state = setDioIrqParams(SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT, SX126X_IRQ_TX_DONE | SX126X_IRQ_TIMEOUT); in sx1262 code
|
||||||
|
* DONE fix this sleep problem: https://meshtastic.discourse.group/t/new-device-release-1-2-30-ready-for-alpha-testing/3272/13?u=geeksville
|
||||||
* add rak4600 support (with rf95 radio and limited ram)
|
* add rak4600 support (with rf95 radio and limited ram)
|
||||||
|
|
||||||
* Switch to use https://github.com/adafruit/Adafruit_nRF52_Arduino.git when available (see arduino code for examples)
|
* Switch to use https://github.com/adafruit/Adafruit_nRF52_Arduino.git when available (see arduino code for examples)
|
||||||
|
* DONE @luxonn reports that after a while the android app stops showing new messages
|
||||||
|
* DONE release android APK - fix recent 1.2.28 crash report
|
||||||
* DONE remote admin busted?
|
* DONE remote admin busted?
|
||||||
* DONE check android code - @havealoha comments about odd sleep behavior
|
* DONE check android code - @havealoha comments about odd sleep behavior
|
||||||
* ABANDONED test github actions locally on linux
|
* ABANDONED test github actions locally on linux
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[platformio]
|
[platformio]
|
||||||
default_envs = tbeam
|
;default_envs = tbeam
|
||||||
;default_envs = tbeam0.7
|
;default_envs = tbeam0.7
|
||||||
;default_envs = heltec-v2.0
|
;default_envs = heltec-v2.0
|
||||||
;default_envs = tlora-v1
|
;default_envs = tlora-v1
|
||||||
@ -18,7 +18,7 @@ default_envs = tbeam
|
|||||||
;default_envs = lora-relay-v1 # nrf board
|
;default_envs = lora-relay-v1 # nrf board
|
||||||
;default_envs = t-echo
|
;default_envs = t-echo
|
||||||
;default_envs = nrf52840dk-geeksville
|
;default_envs = nrf52840dk-geeksville
|
||||||
;default_envs = native # lora-relay-v1 # nrf52840dk-geeksville # linux # or if you'd like to change the default to something like lora-relay-v1 put that here
|
default_envs = native # lora-relay-v1 # nrf52840dk-geeksville # linux # or if you'd like to change the default to something like lora-relay-v1 put that here
|
||||||
;default_envs = rak4631
|
;default_envs = rak4631
|
||||||
;default_envs = rak4630
|
;default_envs = rak4630
|
||||||
|
|
||||||
@ -425,13 +425,24 @@ lib_deps =
|
|||||||
SparkFun BQ27441 LiPo Fuel Gauge Arduino Library
|
SparkFun BQ27441 LiPo Fuel Gauge Arduino Library
|
||||||
TFT_eSPI
|
TFT_eSPI
|
||||||
|
|
||||||
; The Portduino based sim environment on top of linux
|
; The Portduino based sim environment on top of any host OS, all hardware will be simulated
|
||||||
[env:native]
|
[env:native]
|
||||||
platform = https://github.com/geeksville/platform-native.git
|
platform = https://github.com/geeksville/platform-native.git
|
||||||
src_filter = ${env.src_filter} -<esp32/> -<nimble/> -<nrf52/> -<mesh/http/> -<plugins/esp32>
|
src_filter = ${env.src_filter} -<esp32/> -<nimble/> -<nrf52/> -<mesh/http/> -<plugins/esp32>
|
||||||
|
build_flags = ${arduino_base.build_flags} -O0
|
||||||
|
framework = arduino
|
||||||
|
board = cross_platform
|
||||||
|
lib_deps =
|
||||||
|
${arduino_base.lib_deps}
|
||||||
|
rweather/Crypto
|
||||||
|
|
||||||
|
; The Portduino based sim environment on top of a linux OS and touching linux hardware devices
|
||||||
|
[env:linux]
|
||||||
|
platform = https://github.com/geeksville/platform-native.git
|
||||||
|
src_filter = ${env.src_filter} -<esp32/> -<nimble/> -<nrf52/> -<mesh/http/> -<plugins/esp32>
|
||||||
build_flags = ${arduino_base.build_flags} -O0 -lgpiod
|
build_flags = ${arduino_base.build_flags} -O0 -lgpiod
|
||||||
framework = arduino
|
framework = arduino
|
||||||
board = native
|
board = linux_hardware
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${arduino_base.lib_deps}
|
${arduino_base.lib_deps}
|
||||||
rweather/Crypto
|
rweather/Crypto
|
||||||
|
@ -45,7 +45,7 @@ int32_t StreamAPI::readStream()
|
|||||||
} else if (ptr >= HEADER_LEN - 1) { // we have at least read our 4 byte framing
|
} else if (ptr >= HEADER_LEN - 1) { // we have at least read our 4 byte framing
|
||||||
uint32_t len = (rxBuf[2] << 8) + rxBuf[3]; // big endian 16 bit length follows framing
|
uint32_t len = (rxBuf[2] << 8) + rxBuf[3]; // big endian 16 bit length follows framing
|
||||||
|
|
||||||
console->printf("len %d\n", len);
|
// console->printf("len %d\n", len);
|
||||||
|
|
||||||
if (ptr == HEADER_LEN - 1) {
|
if (ptr == HEADER_LEN - 1) {
|
||||||
// we _just_ finished our 4 byte header, validate length now (note: a length of zero is a valid
|
// we _just_ finished our 4 byte header, validate length now (note: a length of zero is a valid
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "CryptoEngine.h"
|
#include "CryptoEngine.h"
|
||||||
#include "PortduinoGPIO.h"
|
#include "PortduinoGPIO.h"
|
||||||
|
#include "SPIChip.h"
|
||||||
#include "mesh/RF95Interface.h"
|
#include "mesh/RF95Interface.h"
|
||||||
#include "sleep.h"
|
#include "sleep.h"
|
||||||
#include "target_specific.h"
|
#include "target_specific.h"
|
||||||
@ -48,7 +49,7 @@ class PolledIrqPin : public GPIOPin
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
GPIOPin *loraIrq;
|
static GPIOPin *loraIrq;
|
||||||
|
|
||||||
/** apps run under portduino can optionally define a portduinoSetup() to
|
/** apps run under portduino can optionally define a portduinoSetup() to
|
||||||
* use portduino specific init code (such as gpioBind) to setup portduino on their host machine,
|
* use portduino specific init code (such as gpioBind) to setup portduino on their host machine,
|
||||||
@ -58,6 +59,12 @@ void portduinoSetup()
|
|||||||
{
|
{
|
||||||
printf("Setting up Meshtastic on Porduino...\n");
|
printf("Setting up Meshtastic on Porduino...\n");
|
||||||
|
|
||||||
|
#ifdef PORTDUINO_LINUX_HARDWARE
|
||||||
|
SPI.begin(); // We need to create SPI
|
||||||
|
bool usePineLora = !spiChip->isSimulated();
|
||||||
|
if(usePineLora) {
|
||||||
|
printf("Connecting to PineLora board...\n");
|
||||||
|
|
||||||
// FIXME: remove this hack once interrupts are confirmed to work on new pine64 board
|
// FIXME: remove this hack once interrupts are confirmed to work on new pine64 board
|
||||||
// loraIrq = new PolledIrqPin();
|
// loraIrq = new PolledIrqPin();
|
||||||
loraIrq = new LinuxGPIOPin(LORA_DIO1, "ch341", "int", "loraIrq"); // or "err"?
|
loraIrq = new LinuxGPIOPin(LORA_DIO1, "ch341", "int", "loraIrq"); // or "err"?
|
||||||
@ -68,16 +75,29 @@ void portduinoSetup()
|
|||||||
auto busy = new LinuxGPIOPin(SX1262_BUSY, "ch341", "slct", "loraBusy");
|
auto busy = new LinuxGPIOPin(SX1262_BUSY, "ch341", "slct", "loraBusy");
|
||||||
busy->setSilent();
|
busy->setSilent();
|
||||||
gpioBind(busy);
|
gpioBind(busy);
|
||||||
//auto fakeBusy = new SimGPIOPin(SX1262_BUSY, "fakeBusy");
|
|
||||||
//fakeBusy->writePin(LOW);
|
|
||||||
//fakeBusy->setSilent(true);
|
|
||||||
//gpioBind(fakeBusy);
|
|
||||||
|
|
||||||
gpioBind(new LinuxGPIOPin(SX1262_RESET, "ch341", "ini", "loraReset"));
|
gpioBind(new LinuxGPIOPin(SX1262_RESET, "ch341", "ini", "loraReset"));
|
||||||
|
|
||||||
auto loraCs = new LinuxGPIOPin(SX1262_CS, "ch341", "cs0", "loraCs");
|
auto loraCs = new LinuxGPIOPin(SX1262_CS, "ch341", "cs0", "loraCs");
|
||||||
loraCs->setSilent();
|
loraCs->setSilent();
|
||||||
gpioBind(loraCs);
|
gpioBind(loraCs);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
|
||||||
|
{
|
||||||
|
auto fakeBusy = new SimGPIOPin(SX1262_BUSY, "fakeBusy");
|
||||||
|
fakeBusy->writePin(LOW);
|
||||||
|
fakeBusy->setSilent(true);
|
||||||
|
gpioBind(fakeBusy);
|
||||||
|
|
||||||
|
auto cs = new SimGPIOPin(SX1262_CS, "fakeLoraCS");
|
||||||
|
cs->setSilent(true);
|
||||||
|
gpioBind(cs);
|
||||||
|
|
||||||
|
gpioBind(new SimGPIOPin(SX1262_RESET, "fakeLoraReset"));
|
||||||
|
gpioBind(new SimGPIOPin(LORA_DIO1, "fakeLoraIrq"));
|
||||||
|
}
|
||||||
|
|
||||||
// gpioBind((new SimGPIOPin(LORA_RESET, "LORA_RESET")));
|
// gpioBind((new SimGPIOPin(LORA_RESET, "LORA_RESET")));
|
||||||
// gpioBind((new SimGPIOPin(RF95_NSS, "RF95_NSS"))->setSilent());
|
// gpioBind((new SimGPIOPin(RF95_NSS, "RF95_NSS"))->setSilent());
|
||||||
|
Loading…
Reference in New Issue
Block a user