mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 17:42:48 +00:00
Merge branch 'master' into MESSAGES
This commit is contained in:
commit
84a9d95b1f
27
.github/ISSUE_TEMPLATE/feature.yml
vendored
Normal file
27
.github/ISSUE_TEMPLATE/feature.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
name: Feature Request
|
||||||
|
description: Request a new feature
|
||||||
|
title: "[Feature Request]: "
|
||||||
|
labels: ["enhancement"]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for your request this will not gurantee that we will implement it, but it will be reviewed.
|
||||||
|
- type: dropdown
|
||||||
|
id: soc
|
||||||
|
attributes:
|
||||||
|
label: Platform
|
||||||
|
description: What device platform will support your feature?
|
||||||
|
multiple: true
|
||||||
|
options:
|
||||||
|
- NRF52
|
||||||
|
- ESP32
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: body
|
||||||
|
attributes:
|
||||||
|
label: Description
|
||||||
|
description: Please provide details about your enhancement.
|
||||||
|
validations:
|
||||||
|
required: true
|
10
.github/workflows/main_matrix.yml
vendored
10
.github/workflows/main_matrix.yml
vendored
@ -127,7 +127,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: firmware-native-${{ steps.version.outputs.version }}.zip
|
name: firmware-native-${{ steps.version.outputs.version }}.zip
|
||||||
path: |
|
path: |
|
||||||
release/meshtasticd_linux_amd64
|
|
||||||
release/device-*.sh
|
release/device-*.sh
|
||||||
release/device-*.bat
|
release/device-*.bat
|
||||||
|
|
||||||
@ -180,7 +179,7 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
|
|
||||||
- name: Move files up
|
- name: Move files up
|
||||||
run: mv -b -t ./ ./*tbeam-2*/littlefs*.bin ./*tbeam-2*/bleota.bin ./**/firmware*.bin ./*t-echo*/Meshtastic_nRF52_factory_erase.uf2 ./**/firmware-*.uf2 ./**/firmware-*-ota.zip ./**/*.elf ./**/meshtasticd_linux_amd64 ./*native*/*device-*.sh ./*native*/*device-*.bat
|
run: mv -b -t ./ ./*tbeam-2*/littlefs*.bin ./*tbeam-2*/bleota.bin ./**/firmware*.bin ./*t-echo*/Meshtastic_nRF52_factory_erase.uf2 ./**/firmware-*.uf2 ./**/firmware-*-ota.zip ./**/*.elf ./*native*/*device-*.sh ./*native*/*device-*.bat
|
||||||
|
|
||||||
- name: Repackage in single firmware zip
|
- name: Repackage in single firmware zip
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
@ -190,7 +189,6 @@ jobs:
|
|||||||
./*.bin
|
./*.bin
|
||||||
./*.uf2
|
./*.uf2
|
||||||
./firmware-*-ota.zip
|
./firmware-*-ota.zip
|
||||||
./meshtasticd_linux_amd64
|
|
||||||
./device-*.sh
|
./device-*.sh
|
||||||
./device-*.bat
|
./device-*.bat
|
||||||
retention-days: 90
|
retention-days: 90
|
||||||
@ -210,7 +208,7 @@ jobs:
|
|||||||
chmod +x ./output/device-update.sh
|
chmod +x ./output/device-update.sh
|
||||||
|
|
||||||
- name: Zip firmware
|
- name: Zip firmware
|
||||||
run: zip -j -r ./firmware-${{ steps.version.outputs.version }}.zip ./output
|
run: zip -j -9 -r ./firmware-${{ steps.version.outputs.version }}.zip ./output
|
||||||
|
|
||||||
- name: Repackage in single elfs zip
|
- name: Repackage in single elfs zip
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
@ -259,7 +257,7 @@ jobs:
|
|||||||
chmod +x ./output/device-update.sh
|
chmod +x ./output/device-update.sh
|
||||||
|
|
||||||
- name: Zip firmware
|
- name: Zip firmware
|
||||||
run: zip -j -r ./firmware-${{ steps.version.outputs.version }}.zip ./output
|
run: zip -j -9 -r ./firmware-${{ steps.version.outputs.version }}.zip ./output
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
@ -267,7 +265,7 @@ jobs:
|
|||||||
path: ./elfs
|
path: ./elfs
|
||||||
|
|
||||||
- name: Zip Elfs
|
- name: Zip Elfs
|
||||||
run: zip -j -r ./debug-elfs-${{ steps.version.outputs.version }}.zip ./elfs
|
run: zip -j -9 -r ./debug-elfs-${{ steps.version.outputs.version }}.zip ./elfs
|
||||||
|
|
||||||
# For diagnostics
|
# For diagnostics
|
||||||
- name: Show artifacts
|
- name: Show artifacts
|
||||||
|
@ -29,6 +29,10 @@ echo "Copying ESP32 bin file"
|
|||||||
SRCBIN=.pio/build/$1/firmware.factory.bin
|
SRCBIN=.pio/build/$1/firmware.factory.bin
|
||||||
cp $SRCBIN $OUTDIR/$basename.bin
|
cp $SRCBIN $OUTDIR/$basename.bin
|
||||||
|
|
||||||
|
echo "Copying ESP32 update bin file"
|
||||||
|
SRCBIN=.pio/build/$1/firmware.bin
|
||||||
|
cp $SRCBIN $OUTDIR/$basename-update.bin
|
||||||
|
|
||||||
echo "Building Filesystem for ESP32 targets"
|
echo "Building Filesystem for ESP32 targets"
|
||||||
pio run --environment tbeam -t buildfs
|
pio run --environment tbeam -t buildfs
|
||||||
cp .pio/build/tbeam/littlefs.bin $OUTDIR/littlefs-$VERSION.bin
|
cp .pio/build/tbeam/littlefs.bin $OUTDIR/littlefs-$VERSION.bin
|
||||||
|
@ -10,7 +10,7 @@ echo.
|
|||||||
echo -h Display this help and exit
|
echo -h Display this help and exit
|
||||||
echo -p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
echo -p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
||||||
echo -P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: %PYTHON%)
|
echo -P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: %PYTHON%)
|
||||||
echo -f FILENAME The .bin file to flash. Custom to your device type and region.
|
echo -f FILENAME The *update.bin file to flash. Custom to your device type.
|
||||||
goto EOF
|
goto EOF
|
||||||
|
|
||||||
:GETOPTS
|
:GETOPTS
|
||||||
@ -28,7 +28,7 @@ IF "__%FILENAME%__" == "____" (
|
|||||||
)
|
)
|
||||||
IF EXIST %FILENAME% (
|
IF EXIST %FILENAME% (
|
||||||
echo Trying to flash update %FILENAME%
|
echo Trying to flash update %FILENAME%
|
||||||
%PYTHON% -m esptool --baud 115200 write_flash 0x00 %FILENAME%
|
%PYTHON% -m esptool --baud 115200 write_flash 0x10000 %FILENAME%
|
||||||
) else (
|
) else (
|
||||||
echo "Invalid file: %FILENAME%"
|
echo "Invalid file: %FILENAME%"
|
||||||
goto HELP
|
goto HELP
|
||||||
|
@ -11,7 +11,7 @@ Flash image file to device, leave existing system intact."
|
|||||||
-h Display this help and exit
|
-h Display this help and exit
|
||||||
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
-p ESPTOOL_PORT Set the environment variable for ESPTOOL_PORT. If not set, ESPTOOL iterates all ports (Dangerrous).
|
||||||
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
-P PYTHON Specify alternate python interpreter to use to invoke esptool. (Default: "$PYTHON")
|
||||||
-f FILENAME The .bin file to flash. Custom to your device type and region.
|
-f FILENAME The *update.bin file to flash. Custom to your device type.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ shift "$((OPTIND-1))"
|
|||||||
|
|
||||||
if [ -f "${FILENAME}" ]; then
|
if [ -f "${FILENAME}" ]; then
|
||||||
echo "Trying to flash update ${FILENAME}."
|
echo "Trying to flash update ${FILENAME}."
|
||||||
$PYTHON -m esptool --baud 115200 write_flash 0x00 ${FILENAME}
|
$PYTHON -m esptool --baud 115200 write_flash 0x10000 ${FILENAME}
|
||||||
else
|
else
|
||||||
echo "Invalid file: ${FILENAME}"
|
echo "Invalid file: ${FILENAME}"
|
||||||
show_help
|
show_help
|
||||||
|
@ -115,11 +115,11 @@ void MeshModule::callPlugins(const MeshPacket &mp, RxSource src)
|
|||||||
// no one should have already replied!
|
// no one should have already replied!
|
||||||
assert(!currentReply);
|
assert(!currentReply);
|
||||||
|
|
||||||
if (mp.decoded.want_response || (isDecoded && mp.want_ack)) {
|
if (mp.decoded.want_response) {
|
||||||
printPacket("Packet on wrong channel, returning error", &mp);
|
printPacket("packet on wrong channel, returning error", &mp);
|
||||||
currentReply = pi.allocErrorResponse(Routing_Error_NOT_AUTHORIZED, &mp);
|
currentReply = pi.allocErrorResponse(Routing_Error_NOT_AUTHORIZED, &mp);
|
||||||
} else
|
} else
|
||||||
printPacket("Packet on wrong channel, but it didn't require a response or ACK", &mp);
|
printPacket("packet on wrong channel, but can't respond", &mp);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ProcessMessage handled = pi.handleReceived(mp);
|
ProcessMessage handled = pi.handleReceived(mp);
|
||||||
@ -156,12 +156,12 @@ void MeshModule::callPlugins(const MeshPacket &mp, RxSource src)
|
|||||||
pi.currentRequest = NULL;
|
pi.currentRequest = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mp.decoded.want_response || mp.want_ack) && toUs) {
|
if (mp.decoded.want_response && toUs) {
|
||||||
if (currentReply) {
|
if (currentReply) {
|
||||||
printPacket("Sending response", currentReply);
|
printPacket("Sending response", currentReply);
|
||||||
service.sendToMesh(currentReply);
|
service.sendToMesh(currentReply);
|
||||||
currentReply = NULL;
|
currentReply = NULL;
|
||||||
} else if(mp.decoded.want_response && mp.from != ourNodeNum) {
|
} else if(mp.from != ourNodeNum) {
|
||||||
// Note: if the message started with the local node we don't want to send a no response reply
|
// Note: if the message started with the local node we don't want to send a no response reply
|
||||||
|
|
||||||
// No one wanted to reply to this requst, tell the requster that happened
|
// No one wanted to reply to this requst, tell the requster that happened
|
||||||
|
@ -138,6 +138,11 @@ bool AdminModule::handleReceivedProtobuf(const MeshPacket &mp, AdminMessage *r)
|
|||||||
nodeDB.factoryReset();
|
nodeDB.factoryReset();
|
||||||
reboot(DEFAULT_REBOOT_SECONDS);
|
reboot(DEFAULT_REBOOT_SECONDS);
|
||||||
break;
|
break;
|
||||||
|
} case AdminMessage_nodedb_reset_tag: {
|
||||||
|
DEBUG_MSG("Initiating node-db reset\n");
|
||||||
|
nodeDB.resetNodes();
|
||||||
|
reboot(DEFAULT_REBOOT_SECONDS);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case AdminMessage_begin_edit_settings_tag: {
|
case AdminMessage_begin_edit_settings_tag: {
|
||||||
DEBUG_MSG("Beginning transaction for editing settings\n");
|
DEBUG_MSG("Beginning transaction for editing settings\n");
|
||||||
|
33
variants/m5stack_coreink/Speaker.cpp
Normal file
33
variants/m5stack_coreink/Speaker.cpp
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#include "Speaker.h"
|
||||||
|
|
||||||
|
TONE::TONE(void) {
|
||||||
|
_volume = 5;
|
||||||
|
_begun = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TONE::begin() {
|
||||||
|
_begun = true;
|
||||||
|
ledcSetup(TONE_PIN_CHANNEL, 0, 13);
|
||||||
|
ledcAttachPin(PIN_BUZZER, TONE_PIN_CHANNEL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TONE::end() {
|
||||||
|
mute();
|
||||||
|
ledcDetachPin(PIN_BUZZER);
|
||||||
|
_begun = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TONE::tone(uint16_t frequency) {
|
||||||
|
if(!_begun) begin();
|
||||||
|
ledcWriteTone(TONE_PIN_CHANNEL, frequency);
|
||||||
|
ledcWrite(TONE_PIN_CHANNEL, 0x400 >> _volume);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TONE::setVolume(uint8_t volume) {
|
||||||
|
_volume = 11 - volume;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TONE::mute() {
|
||||||
|
ledcWriteTone(TONE_PIN_CHANNEL, 0);
|
||||||
|
digitalWrite(PIN_BUZZER, 0);
|
||||||
|
}
|
30
variants/m5stack_coreink/Speaker.h
Normal file
30
variants/m5stack_coreink/Speaker.h
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#ifndef _SPEAKER_H_
|
||||||
|
#define _SPEAKER_H_
|
||||||
|
|
||||||
|
#include "configuration.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
#include "esp32-hal-dac.h"
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
class TONE {
|
||||||
|
public:
|
||||||
|
TONE(void);
|
||||||
|
|
||||||
|
void begin();
|
||||||
|
void end();
|
||||||
|
void mute();
|
||||||
|
void tone(uint16_t frequency);
|
||||||
|
void setVolume(uint8_t volume);
|
||||||
|
|
||||||
|
private:
|
||||||
|
uint8_t _volume;
|
||||||
|
bool _begun;
|
||||||
|
bool speaker_on;
|
||||||
|
};
|
||||||
|
#endif
|
@ -1,18 +1,26 @@
|
|||||||
[env:m5stack-coreink]
|
[env:m5stack-coreink]
|
||||||
extends = esp32_base
|
extends = esp32_base
|
||||||
board = m5stack-coreink
|
board = m5stack-coreink
|
||||||
|
build_src_filter =
|
||||||
|
${esp32_base.build_src_filter}
|
||||||
|
+<../variants/m5stack_coreink>
|
||||||
build_flags =
|
build_flags =
|
||||||
${esp32_base.build_flags} -D M5_COREINK -I variants/m5stack_coreink
|
${esp32_base.build_flags} -I variants/m5stack_coreink
|
||||||
;-D RADIOLIB_VERBOSE
|
;-D RADIOLIB_VERBOSE
|
||||||
-Ofast
|
-Ofast
|
||||||
-D__MCUXPRESSO
|
-D__MCUXPRESSO
|
||||||
-DEPD_HEIGHT=200
|
-DEPD_HEIGHT=200
|
||||||
-DEPD_WIDTH=200
|
-DEPD_WIDTH=200
|
||||||
|
-DUSER_SETUP_LOADED
|
||||||
|
-DM5_COREINK
|
||||||
-DM5STACK
|
-DM5STACK
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
zinggjm/GxEPD2@^1.4.9
|
zinggjm/GxEPD2@^1.4.9
|
||||||
lewisxhe/PCF8563_Library@^1.0.1
|
lewisxhe/PCF8563_Library@^1.0.1
|
||||||
|
lib_ignore =
|
||||||
|
m5stack-coreink
|
||||||
|
monitor_filters = esp32_exception_decoder
|
||||||
board_build.f_cpu = 240000000L
|
board_build.f_cpu = 240000000L
|
||||||
upload_protocol = esptool
|
upload_protocol = esptool
|
||||||
upload_port = /dev/ttyACM*
|
upload_port = /dev/ttyACM0
|
||||||
|
@ -1,34 +1,40 @@
|
|||||||
#define I2C_SDA 21 //-1
|
#define I2C_SDA 21
|
||||||
#define I2C_SCL 22 //-1
|
#define I2C_SCL 22
|
||||||
|
|
||||||
//#define LED_PIN 10
|
// LED?
|
||||||
|
#define LED_INVERTED 0
|
||||||
|
#define LED_PIN 10
|
||||||
|
|
||||||
#include "pcf8563.h"
|
#include "pcf8563.h"
|
||||||
// PCF8563 RTC Module
|
// PCF8563 RTC Module
|
||||||
#define PCF8563_RTC 0x51
|
#define PCF8563_RTC 0x51
|
||||||
|
#define HAS_RTC 1
|
||||||
#define BUTTON_NEED_PULLUP
|
|
||||||
#define BUTTON_PIN 5
|
|
||||||
|
|
||||||
//Wheel
|
//Wheel
|
||||||
// Down 37
|
// Down 37
|
||||||
// Push 38
|
// Push 38
|
||||||
// Up 39
|
// Up 39
|
||||||
|
|
||||||
// Top Physical Button 5
|
// Top Physical Button 5
|
||||||
|
|
||||||
|
#define BUTTON_NEED_PULLUP
|
||||||
|
#define BUTTON_PIN 5
|
||||||
|
|
||||||
|
//BUZZER
|
||||||
|
#define PIN_BUZZER 2
|
||||||
|
#define TONE_PIN_CHANNEL 0
|
||||||
|
|
||||||
#undef RF95_SCK
|
#undef RF95_SCK
|
||||||
#undef RF95_MISO
|
#undef RF95_MISO
|
||||||
#undef RF95_MOSI
|
#undef RF95_MOSI
|
||||||
#undef RF95_NSS
|
#undef RF95_NSS
|
||||||
#define USE_RF95
|
#define USE_RF95
|
||||||
|
|
||||||
#define RF95_SCK 18 //13
|
#define RF95_SCK 18
|
||||||
#define RF95_MISO 34 //26
|
#define RF95_MISO 34
|
||||||
#define RF95_MOSI 23 //25
|
#define RF95_MOSI 23
|
||||||
#define RF95_NSS 14
|
#define RF95_NSS 14
|
||||||
#define LORA_DIO0 25 //32 now moved from ext port
|
#define LORA_DIO0 25
|
||||||
#define LORA_RESET 26 //33 now moved from ext port
|
#define LORA_RESET 26
|
||||||
#define LORA_DIO1 RADIOLIB_NC
|
#define LORA_DIO1 RADIOLIB_NC
|
||||||
#define LORA_DIO2 RADIOLIB_NC
|
#define LORA_DIO2 RADIOLIB_NC
|
||||||
|
|
||||||
@ -39,12 +45,10 @@
|
|||||||
#define USE_EINK
|
#define USE_EINK
|
||||||
//https://docs.m5stack.com/en/core/coreink
|
//https://docs.m5stack.com/en/core/coreink
|
||||||
//https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/coreink/coreink_sch.pdf
|
//https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/coreink/coreink_sch.pdf
|
||||||
#define PIN_EINK_EN -1
|
#define PIN_EINK_EN -1 // N/C
|
||||||
#define PIN_EINK_CS 9 // EPD_CS
|
#define PIN_EINK_CS 9 // EPD_CS
|
||||||
#define PIN_EINK_BUSY 4 // EPD_BUSY
|
#define PIN_EINK_BUSY 4 // EPD_BUSY
|
||||||
#define PIN_EINK_DC 15 // EPD_D/C
|
#define PIN_EINK_DC 15 // EPD_D/C
|
||||||
#define PIN_EINK_RES -1 // Connected to GPIO0 but no needed !!!! maybe causing issue ?
|
#define PIN_EINK_RES -1 // Connected but not needed
|
||||||
#define PIN_EINK_SCLK 18 // EPD_SCLK
|
#define PIN_EINK_SCLK 18 // EPD_SCLK
|
||||||
#define PIN_EINK_MOSI 23 // EPD_MOSI
|
#define PIN_EINK_MOSI 23 // EPD_MOSI
|
||||||
|
|
||||||
#define HAS_RTC 1
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[VERSION]
|
[VERSION]
|
||||||
major = 2
|
major = 2
|
||||||
minor = 0
|
minor = 0
|
||||||
build = 5
|
build = 6
|
||||||
|
Loading…
Reference in New Issue
Block a user