mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-30 03:13:51 +00:00
Merge branch 'master' of github.com:meshtastic/firmware
This commit is contained in:
commit
25a9ee8eb6
12
.github/workflows/main_matrix.yml
vendored
12
.github/workflows/main_matrix.yml
vendored
@ -2,14 +2,14 @@ name: CI
|
|||||||
on:
|
on:
|
||||||
# # Triggers the workflow on push but only for the master branch
|
# # Triggers the workflow on push but only for the master branch
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master, develop]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "**.md"
|
- "**.md"
|
||||||
- "version.properties"
|
- "version.properties"
|
||||||
|
|
||||||
# Note: This is different from "pull_request". Need to specify ref when doing checkouts.
|
# Note: This is different from "pull_request". Need to specify ref when doing checkouts.
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
branches: [master]
|
branches: [master, develop]
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "**.md"
|
- "**.md"
|
||||||
#- "**.yml"
|
#- "**.yml"
|
||||||
@ -170,7 +170,7 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
release/*.bin
|
release/*.bin
|
||||||
release/*.elf
|
release/*.elf
|
||||||
retention-days: 90
|
retention-days: 30
|
||||||
|
|
||||||
build-nrf52:
|
build-nrf52:
|
||||||
strategy:
|
strategy:
|
||||||
@ -229,7 +229,7 @@ jobs:
|
|||||||
release/*.uf2
|
release/*.uf2
|
||||||
release/*.elf
|
release/*.elf
|
||||||
release/*.zip
|
release/*.zip
|
||||||
retention-days: 90
|
retention-days: 30
|
||||||
|
|
||||||
build-rpi2040:
|
build-rpi2040:
|
||||||
strategy:
|
strategy:
|
||||||
@ -283,7 +283,7 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
release/*.uf2
|
release/*.uf2
|
||||||
release/*.elf
|
release/*.elf
|
||||||
retention-days: 90
|
retention-days: 30
|
||||||
|
|
||||||
build-native:
|
build-native:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -342,7 +342,7 @@ jobs:
|
|||||||
release/meshtasticd_linux_amd64
|
release/meshtasticd_linux_amd64
|
||||||
release/device-*.sh
|
release/device-*.sh
|
||||||
release/device-*.bat
|
release/device-*.bat
|
||||||
retention-days: 90
|
retention-days: 30
|
||||||
|
|
||||||
after-checks:
|
after-checks:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
FROM debian:bullseye-slim AS builder
|
||||||
|
RUN apt-get update
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install wget python3 g++ zip python3-venv git vim
|
||||||
|
RUN wget https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py -O get-platformio.py; chmod +x get-platformio.py
|
||||||
|
RUN python3 get-platformio.py
|
||||||
|
RUN git clone https://github.com/meshtastic/firmware --recurse-submodules
|
||||||
|
RUN cd firmware
|
||||||
|
RUN chmod +x ./firmware/bin/build-native.sh
|
||||||
|
RUN . ~/.platformio/penv/bin/activate; cd firmware; sh ./bin/build-native.sh
|
||||||
|
|
||||||
|
FROM frolvlad/alpine-glibc
|
||||||
|
WORKDIR /root/
|
||||||
|
COPY --from=builder /firmware/release/meshtasticd_linux_amd64 ./
|
||||||
|
RUN apk --update add --no-cache g++
|
||||||
|
CMD ["./meshtasticd_linux_amd64"]
|
5
docker-compose.yml
Normal file
5
docker-compose.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
meshtastic-device:
|
||||||
|
build: .
|
@ -1 +1 @@
|
|||||||
Subproject commit a0fe9ec8614cd27af7691869ccbd20c39e48a086
|
Subproject commit 6b46e42a656dd3aab74c373e79b70e699eeac834
|
@ -15,11 +15,11 @@
|
|||||||
* -------------------------------------------
|
* -------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint printWPL(char *buf, const Position &pos, const char *name)
|
uint32_t printWPL(char *buf, const Position &pos, const char *name)
|
||||||
{
|
{
|
||||||
uint len = sprintf(buf, "$GNWPL,%07.2f,%c,%08.2f,%c,%s", pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N', pos.longitude_i * 1e-5, pos.longitude_i < 0 ? 'W' : 'E', name);
|
uint32_t len = sprintf(buf, "$GNWPL,%07.2f,%c,%08.2f,%c,%s", pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N', pos.longitude_i * 1e-5, pos.longitude_i < 0 ? 'W' : 'E', name);
|
||||||
uint chk = 0;
|
uint32_t chk = 0;
|
||||||
for (uint i = 1; i < len; i++) {
|
for (uint32_t i = 1; i < len; i++) {
|
||||||
chk ^= buf[i];
|
chk ^= buf[i];
|
||||||
}
|
}
|
||||||
len += sprintf(buf + len, "*%02X\r\n", chk);
|
len += sprintf(buf + len, "*%02X\r\n", chk);
|
||||||
@ -50,9 +50,9 @@ uint printWPL(char *buf, const Position &pos, const char *name)
|
|||||||
* -------------------------------------------
|
* -------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
uint printGGA(char *buf, const Position &pos)
|
uint32_t printGGA(char *buf, const Position &pos)
|
||||||
{
|
{
|
||||||
uint len = sprintf(buf, "$GNGGA,%06u.%03u,%07.2f,%c,%08.2f,%c,%u,%02u,%04u,%04d,%c,%04d,%c,%d,%04d",
|
uint32_t len = sprintf(buf, "$GNGGA,%06u.%03u,%07.2f,%c,%08.2f,%c,%u,%02u,%04u,%04d,%c,%04d,%c,%d,%04d",
|
||||||
pos.time / 1000,
|
pos.time / 1000,
|
||||||
pos.time % 1000,
|
pos.time % 1000,
|
||||||
pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N',
|
pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N',
|
||||||
@ -67,8 +67,8 @@ uint printGGA(char *buf, const Position &pos)
|
|||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
uint chk = 0;
|
uint32_t chk = 0;
|
||||||
for (uint i = 1; i < len; i++) {
|
for (uint32_t i = 1; i < len; i++) {
|
||||||
chk ^= buf[i];
|
chk ^= buf[i];
|
||||||
}
|
}
|
||||||
len += sprintf(buf + len, "*%02X\r\n", chk);
|
len += sprintf(buf + len, "*%02X\r\n", chk);
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
uint printWPL(char *buf, const Position &pos, const char *name);
|
uint32_t printWPL(char *buf, const Position &pos, const char *name);
|
||||||
uint printGGA(char *buf, const Position &pos);
|
uint32_t printGGA(char *buf, const Position &pos);
|
||||||
|
@ -317,7 +317,13 @@ ErrorCode RadioLibInterface::send(MeshPacket *p)
|
|||||||
void RadioLibInterface::handleReceiveInterrupt()
|
void RadioLibInterface::handleReceiveInterrupt()
|
||||||
{
|
{
|
||||||
uint32_t xmitMsec;
|
uint32_t xmitMsec;
|
||||||
assert(isReceiving);
|
|
||||||
|
// when this is called, we should be in receive mode - if we are not, just jump out instead of bombing. Possible Race Condition?
|
||||||
|
if (!isReceiving) {
|
||||||
|
DEBUG_MSG("*** WAS_ASSERT *** handleReceiveInterrupt called when not in receive mode\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
isReceiving = false;
|
isReceiving = false;
|
||||||
|
|
||||||
// read the number of actually received bytes
|
// read the number of actually received bytes
|
||||||
|
@ -501,7 +501,7 @@ typedef PB_BYTES_ARRAY_T(256) MeshPacket_encrypted_t;
|
|||||||
typedef struct _MeshPacket {
|
typedef struct _MeshPacket {
|
||||||
/* The sending node number.
|
/* The sending node number.
|
||||||
Note: Our crypto implementation uses this field as well.
|
Note: Our crypto implementation uses this field as well.
|
||||||
See [crypto](/docs/developers/firmware/encryption) for details.
|
See [crypto](/docs/about/overview/encryption) for details.
|
||||||
FIXME - really should be fixed32 instead, this encoding only hurts the ble link though. */
|
FIXME - really should be fixed32 instead, this encoding only hurts the ble link though. */
|
||||||
uint32_t from;
|
uint32_t from;
|
||||||
/* The (immediatSee Priority description for more details.y should be fixed32 instead, this encoding only
|
/* The (immediatSee Priority description for more details.y should be fixed32 instead, this encoding only
|
||||||
@ -529,7 +529,7 @@ typedef struct _MeshPacket {
|
|||||||
needs to be unique for a few minutes (long enough to last for the length of
|
needs to be unique for a few minutes (long enough to last for the length of
|
||||||
any ACK or the completion of a mesh broadcast flood).
|
any ACK or the completion of a mesh broadcast flood).
|
||||||
Note: Our crypto implementation uses this id as well.
|
Note: Our crypto implementation uses this id as well.
|
||||||
See [crypto](/docs/developers/firmware/encryption) for details.
|
See [crypto](/docs/about/overview/encryption) for details.
|
||||||
FIXME - really should be fixed32 instead, this encoding only
|
FIXME - really should be fixed32 instead, this encoding only
|
||||||
hurts the ble link though. */
|
hurts the ble link though. */
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
|
@ -263,8 +263,8 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r
|
|||||||
#ifdef BUTTON_PIN
|
#ifdef BUTTON_PIN
|
||||||
gpio_wakeup_enable((gpio_num_t)BUTTON_PIN, GPIO_INTR_LOW_LEVEL); // when user presses, this button goes low
|
gpio_wakeup_enable((gpio_num_t)BUTTON_PIN, GPIO_INTR_LOW_LEVEL); // when user presses, this button goes low
|
||||||
#endif
|
#endif
|
||||||
#ifdef RF95_IRQ_GPIO
|
#ifdef RF95_IRQ
|
||||||
gpio_wakeup_enable((gpio_num_t)RF95_IRQ_GPIO, GPIO_INTR_HIGH_LEVEL); // RF95 interrupt, active high
|
gpio_wakeup_enable((gpio_num_t)RF95_IRQ, GPIO_INTR_HIGH_LEVEL); // RF95 interrupt, active high
|
||||||
#endif
|
#endif
|
||||||
#ifdef PMU_IRQ
|
#ifdef PMU_IRQ
|
||||||
// wake due to PMU can happen repeatedly if there is no battery installed or the battery fills
|
// wake due to PMU can happen repeatedly if there is no battery installed or the battery fills
|
||||||
|
Loading…
Reference in New Issue
Block a user