mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-04 12:44:40 +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) {
|
if (this->busy) {
|
||||||
str = "S&F - Busy. Try again shortly.";
|
str = "S&F - Busy. Try again shortly.";
|
||||||
} else {
|
} 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);
|
LOG_WARN("%s", str);
|
||||||
memcpy(pr->decoded.payload.bytes, str, strlen(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");
|
LOG_DEBUG("Legacy Request to send");
|
||||||
|
|
||||||
// Send the last 60 minutes of messages.
|
// 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);
|
sendErrorTextMessage(getFrom(&mp), mp.decoded.want_response);
|
||||||
} else {
|
} else {
|
||||||
storeForwardModule->historySend(historyReturnWindow * 60, getFrom(&mp));
|
storeForwardModule->historySend(historyReturnWindow * 60, getFrom(&mp));
|
||||||
@ -461,7 +462,8 @@ bool StoreForwardModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp,
|
|||||||
requests_history++;
|
requests_history++;
|
||||||
LOG_INFO("Client Request to send HISTORY");
|
LOG_INFO("Client Request to send HISTORY");
|
||||||
// Send the last 60 minutes of messages.
|
// 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);
|
sendErrorTextMessage(getFrom(&mp), mp.decoded.want_response);
|
||||||
} else {
|
} else {
|
||||||
if ((p->which_variant == meshtastic_StoreAndForward_history_tag) && (p->variant.history.window > 0)) {
|
if ((p->which_variant == meshtastic_StoreAndForward_history_tag) && (p->variant.history.window > 0)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user