Skip to content

Commit

Permalink
PIO_ENV (#5239)
Browse files Browse the repository at this point in the history
* add hw_env to packet

needs meshtastic/protobufs#616

* rename to pio_env

* Move to mynodeinfo

* Includy doody

---------

Co-authored-by: Ben Meadors <[email protected]>
  • Loading branch information
caveman99 and thebentern authored Nov 4, 2024
1 parent 89c186e commit 0a82fd2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/platformio-custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ def esp32_create_combined_bin(source, target, env):

prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
verObj = readProps(prefsLoc)
print("Using meshtastic platformio-custom.py, firmware version " + verObj["long"])
print("Using meshtastic platformio-custom.py, firmware version " + verObj["long"] + " on " + env.get("PIOENV"))

# General options that are passed to the C and C++ compilers
projenv.Append(
CCFLAGS=[
"-DAPP_VERSION=" + verObj["long"],
"-DAPP_VERSION_SHORT=" + verObj["short"],
"-DAPP_ENV=" + env.get("PIOENV"),
]
)
1 change: 1 addition & 0 deletions src/mesh/MeshService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "RTC.h"
#include "TypeConversions.h"
#include "main.h"
#include "meshUtils.h"
#include "mesh-pb-constants.h"
#include "modules/NodeInfoModule.h"
#include "modules/PositionModule.h"
Expand Down
1 change: 1 addition & 0 deletions src/mesh/PhoneAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
// If the user has specified they don't want our node to share its location, make sure to tell the phone
// app not to send locations on our behalf.
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_my_info_tag;
strncpy(myNodeInfo.pio_env, optstr(APP_ENV), sizeof(myNodeInfo.pio_env));
fromRadioScratch.my_info = myNodeInfo;
state = STATE_SEND_OWN_NODEINFO;

Expand Down

0 comments on commit 0a82fd2

Please sign in to comment.