sforkowany z mirror/meshtastic-firmware
Merge branch 'master' into StoreAndForward
commit
cea35acfa0
|
@ -0,0 +1,50 @@
|
|||
image: python:latest
|
||||
|
||||
variables:
|
||||
# make sure GitLab check out submodules
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
|
||||
stages:
|
||||
- buildall
|
||||
- upload
|
||||
|
||||
build:
|
||||
stage: buildall
|
||||
|
||||
before_script:
|
||||
# we need zip later for packaging
|
||||
- "apt update;apt -y install zip"
|
||||
- "pip install -U platformio"
|
||||
|
||||
script:
|
||||
# clean up residues from previous run
|
||||
- rm -rf release
|
||||
- bin/build-all.sh
|
||||
|
||||
# This is for my local environment, if your runners are tagged differently, modify or remove
|
||||
tags:
|
||||
- dockerized
|
||||
|
||||
# The files which are to be made available in GitLab
|
||||
artifacts:
|
||||
paths:
|
||||
- release/archive/firmware*.zip
|
||||
|
||||
|
||||
upload:
|
||||
image: curlimages/curl:latest
|
||||
|
||||
stage: upload
|
||||
|
||||
script:
|
||||
- |
|
||||
PACKAGE_REGISTRY_URL="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/master"
|
||||
cd release/archive
|
||||
for f in *.zip; do
|
||||
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${f} ${PACKAGE_REGISTRY_URL}/${f}
|
||||
done
|
||||
echo 'Package uploaded!'
|
||||
|
||||
# This is for my local environment, if your runners are tagged differently, modify or remove
|
||||
tags:
|
||||
- dockerized
|
|
@ -46,10 +46,10 @@ shift "$((OPTIND-1))"
|
|||
|
||||
if [ -f "${FILENAME}" ]; then
|
||||
echo "Trying to flash ${FILENAME}, but first erasing and writing system information"
|
||||
$PYTHON -m esptool --baud 921600 erase_flash
|
||||
$PYTHON -m esptool --baud 921600 write_flash 0x1000 system-info.bin
|
||||
$PYTHON -m esptool --baud 921600 write_flash 0x00390000 spiffs-*.bin
|
||||
$PYTHON -m esptool --baud 921600 write_flash 0x10000 ${FILENAME}
|
||||
$PYTHON -m esptool erase_flash
|
||||
$PYTHON -m esptool write_flash 0x1000 system-info.bin
|
||||
$PYTHON -m esptool write_flash 0x00390000 spiffs-*.bin
|
||||
$PYTHON -m esptool write_flash 0x10000 ${FILENAME}
|
||||
else
|
||||
echo "Invalid file: ${FILENAME}"
|
||||
show_help
|
||||
|
|
|
@ -325,7 +325,7 @@ Items after the first final candidate release.
|
|||
- add "store and forward" support for messages, or move to the DB sync model. This would allow messages to be eventually delivered even if nodes are out of contact at the moment.
|
||||
- use variable length Strings in protobufs (instead of current fixed buffers). This would save lots of RAM
|
||||
- use BLEDevice::setPower to lower our BLE transmit power - extra range doesn't help us, it costs amps and it increases snoopability
|
||||
- make a HAM build: just a new frequency list, a bool to say 'never do encryption' and use hte callsign as that node's unique id. -from Girts
|
||||
- make a Ham build: just a new frequency list, a bool to say 'never do encryption' and use the callsign as that node's unique id. -from Girts
|
||||
- don't forward redundant pings or ping responses to the phone, it just wastes phone battery
|
||||
- don't send location packets if we haven't moved significantly
|
||||
- scrub default radio config settings for bandwidth/range/speed
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[platformio]
|
||||
;default_envs = tbeam
|
||||
default_envs = tbeam
|
||||
;default_envs = tbeam0.7
|
||||
;default_envs = heltec-v2.0
|
||||
;default_envs = tlora-v1
|
||||
|
@ -21,7 +21,7 @@
|
|||
;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 = rak4630
|
||||
default_envs = meshtastic-diy-v1
|
||||
;default_envs = meshtastic-diy-v1
|
||||
|
||||
[common]
|
||||
; common is not currently used
|
||||
|
@ -124,7 +124,7 @@ platform_packages =
|
|||
framework-arduinoespressif32@https://github.com/meshtastic/arduino-esp32.git#4cde0f5d412d2695184f32e8a47e9bea57b45276
|
||||
|
||||
; leave this commented out to avoid breaking Windows
|
||||
upload_port = /dev/ttyUSB0
|
||||
;upload_port = /dev/ttyUSB0
|
||||
;monitor_port = /dev/ttyUSB0
|
||||
|
||||
;upload_port = /dev/cu.SLAB_USBtoUART
|
||||
|
|
2
proto
2
proto
|
@ -1 +1 @@
|
|||
Subproject commit c52c8ef99ead88a5edb73891b33247c54d37cb28
|
||||
Subproject commit ec35525ae6042999b2b3de368aff0ebc3fdcf308
|
|
@ -619,11 +619,6 @@ static void drawNodeInfo(OLEDDisplay *display, OLEDDisplayUiState *state, int16_
|
|||
n = nodeDB.getNodeByIndex(nodeIndex);
|
||||
}
|
||||
displayedNodeNum = n->num;
|
||||
|
||||
// We just changed to a new node screen, ask that node for updated state if it's older than 2 minutes
|
||||
if (sinceLastSeen(n) > 120) {
|
||||
service.sendNetworkPing(displayedNodeNum, true);
|
||||
}
|
||||
}
|
||||
|
||||
NodeInfo *node = nodeDB.getNodeByIndex(nodeIndex);
|
||||
|
|
|
@ -110,22 +110,12 @@ static void taskCreateCert(void *parameter)
|
|||
if (createCertResult != 0) {
|
||||
DEBUG_MSG("Creating the certificate failed\n");
|
||||
|
||||
// Serial.printf("Creating the certificate failed. Error Code = 0x%02X, check SSLCert.hpp for details",
|
||||
// createCertResult);
|
||||
// while (true)
|
||||
// delay(500);
|
||||
} else {
|
||||
DEBUG_MSG("Creating the certificate was successful\n");
|
||||
|
||||
DEBUG_MSG("Created Private Key: %d Bytes\n", cert->getPKLength());
|
||||
// for (int i = 0; i < cert->getPKLength(); i++)
|
||||
// Serial.print(cert->getPKData()[i], HEX);
|
||||
// Serial.println();
|
||||
|
||||
DEBUG_MSG("Created Certificate: %d Bytes\n", cert->getCertLength());
|
||||
// for (int i = 0; i < cert->getCertLength(); i++)
|
||||
// Serial.print(cert->getCertData()[i], HEX);
|
||||
// Serial.println();
|
||||
|
||||
prefs.putBytes("PK", (uint8_t *)cert->getPKData(), cert->getPKLength());
|
||||
prefs.putBytes("cert", (uint8_t *)cert->getCertData(), cert->getCertLength());
|
||||
|
|
|
@ -38,18 +38,13 @@ void __attribute__((noreturn)) __assert_func(const char *file, int line, const c
|
|||
|
||||
void getMacAddr(uint8_t *dmac)
|
||||
{
|
||||
ble_gap_addr_t addr;
|
||||
if (sd_ble_gap_addr_get(&addr) == NRF_SUCCESS) {
|
||||
memcpy(dmac, addr.addr, 6);
|
||||
} else {
|
||||
const uint8_t *src = (const uint8_t *)NRF_FICR->DEVICEADDR;
|
||||
dmac[5] = src[0];
|
||||
dmac[4] = src[1];
|
||||
dmac[3] = src[2];
|
||||
dmac[2] = src[3];
|
||||
dmac[1] = src[4];
|
||||
dmac[0] = src[5] | 0xc0; // MSB high two bits get set elsewhere in the bluetooth stack
|
||||
}
|
||||
const uint8_t *src = (const uint8_t *)NRF_FICR->DEVICEADDR;
|
||||
dmac[5] = src[0];
|
||||
dmac[4] = src[1];
|
||||
dmac[3] = src[2];
|
||||
dmac[2] = src[3];
|
||||
dmac[1] = src[4];
|
||||
dmac[0] = src[5] | 0xc0; // MSB high two bits get set elsewhere in the bluetooth stack
|
||||
}
|
||||
|
||||
static void initBrownout()
|
||||
|
|
Ładowanie…
Reference in New Issue