mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-03 12:20:43 +00:00
Merge a17451582b
into bdedd0e1fe
This commit is contained in:
commit
2433718503
29
readmejp.md
Normal file
29
readmejp.md
Normal file
@ -0,0 +1,29 @@
|
||||
## Setup env
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
|
||||
## Test on device
|
||||
|
||||
### Station G2
|
||||
1. Enable Serial Debug:
|
||||
# Edit variants/esp32s3/station-g2/platformio.ini line 22:
|
||||
# Change: -DARDUINO_USB_MODE=0
|
||||
# To: -DARDUINO_USB_MODE=1
|
||||
2. Rebuild and Flash:
|
||||
pio run -e station-g2 -t upload
|
||||
3. Connect Serial:
|
||||
pio device monitor --baud 115200
|
||||
|
||||
|
||||
### Heltec v3
|
||||
|
||||
pio run -e heltec-v3 -t upload
|
||||
|
||||
pio device monitor --baud 115200
|
||||
|
||||
## If protobufs need updating
|
||||
pip install protobuf grpcio-tools
|
||||
|
||||
cd protobufs
|
||||
protoc --experimental_allow_proto3_optional --plugin=protoc-gen-nanopb=../.pio/libdeps/station-g2/Nanopb/generator/protoc-gen-nanopb --nanopb_out="-S.cpp
|
||||
-v:../src/mesh/generated/" -I=../protobufs meshtastic/module_config.proto
|
@ -343,7 +343,7 @@ void StoreForwardModule::sendErrorTextMessage(NodeNum dest, bool want_response)
|
||||
if (this->busy) {
|
||||
str = "S&F - Busy. Try again shortly.";
|
||||
} else {
|
||||
str = "S&F not permitted on the public channel.";
|
||||
str = "Something went wrong with S&F on this custom firmware.";
|
||||
}
|
||||
LOG_WARN("%s", str);
|
||||
memcpy(pr->decoded.payload.bytes, str, strlen(str));
|
||||
@ -396,7 +396,8 @@ ProcessMessage StoreForwardModule::handleReceived(const meshtastic_MeshPacket &m
|
||||
LOG_DEBUG("Legacy Request to send");
|
||||
|
||||
// Send the last 60 minutes of messages.
|
||||
if (this->busy || channels.isDefaultChannel(mp.channel)) {
|
||||
// if (this->busy || channels.isDefaultChannel(mp.channel)) {
|
||||
if (this->busy) {
|
||||
sendErrorTextMessage(getFrom(&mp), mp.decoded.want_response);
|
||||
} else {
|
||||
storeForwardModule->historySend(historyReturnWindow * 60, getFrom(&mp));
|
||||
@ -461,7 +462,8 @@ bool StoreForwardModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp,
|
||||
requests_history++;
|
||||
LOG_INFO("Client Request to send HISTORY");
|
||||
// Send the last 60 minutes of messages.
|
||||
if (this->busy || channels.isDefaultChannel(mp.channel)) {
|
||||
// if (this->busy || channels.isDefaultChannel(mp.channel)) {
|
||||
if (this->busy) {
|
||||
sendErrorTextMessage(getFrom(&mp), mp.decoded.want_response);
|
||||
} else {
|
||||
if ((p->which_variant == meshtastic_StoreAndForward_history_tag) && (p->variant.history.window > 0)) {
|
||||
|
Loading…
Reference in New Issue
Block a user