mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-24 05:53:10 +00:00
include region code in the BLE HW version string. ie 1.0-US
This commit is contained in:
parent
bd0f35ad83
commit
51b53f406e
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION=0.0.4
|
source bin/version.sh
|
||||||
|
|
||||||
COUNTRIES="US EU CN JP"
|
COUNTRIES="US EU CN JP"
|
||||||
|
|
||||||
@ -11,7 +11,8 @@ SRCBIN=.pio/build/esp32/firmware.bin
|
|||||||
|
|
||||||
for COUNTRY in $COUNTRIES; do
|
for COUNTRY in $COUNTRIES; do
|
||||||
|
|
||||||
COMMONOPTS="-DAPP_VERSION=$VERSION -DHW_VERSION_$COUNTRY -Wall -Wextra -Wno-missing-field-initializers -Isrc -Os -Wl,-Map,.pio/build/esp32/output.map -DAXP_DEBUG_PORT=Serial"
|
HWVERSTR="1.0-$COUNTRY"
|
||||||
|
COMMONOPTS="-DAPP_VERSION=$VERSION -DHW_VERSION_$COUNTRY -DHW_VERSION=$HWVERSTR -Wall -Wextra -Wno-missing-field-initializers -Isrc -Os -Wl,-Map,.pio/build/esp32/output.map -DAXP_DEBUG_PORT=Serial"
|
||||||
|
|
||||||
export PLATFORMIO_BUILD_FLAGS="-DT_BEAM_V10 $COMMONOPTS"
|
export PLATFORMIO_BUILD_FLAGS="-DT_BEAM_V10 $COMMONOPTS"
|
||||||
echo "Building with $PLATFORMIO_BUILD_FLAGS"
|
echo "Building with $PLATFORMIO_BUILD_FLAGS"
|
||||||
@ -25,7 +26,6 @@ for COUNTRY in $COUNTRIES; do
|
|||||||
pio run # -v
|
pio run # -v
|
||||||
cp $SRCBIN release/firmware-HELTEC-$COUNTRY-$VERSION.bin
|
cp $SRCBIN release/firmware-HELTEC-$COUNTRY-$VERSION.bin
|
||||||
cp $SRCMAP release/firmware-HELTEC-$COUNTRY-$VERSION.map
|
cp $SRCMAP release/firmware-HELTEC-$COUNTRY-$VERSION.map
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
zip release/firmware-$VERSION.zip release/firmware-*-$VERSION.bin
|
zip release/firmware-$VERSION.zip release/firmware-*-$VERSION.bin
|
||||||
|
@ -29,11 +29,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// Version
|
// Version
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#define APP_NAME "Meshtastic"
|
|
||||||
|
|
||||||
// If app version is not specified we assume we are not being invoked by the build script
|
// If app version is not specified we assume we are not being invoked by the build script
|
||||||
#ifndef APP_VERSION
|
#ifndef APP_VERSION
|
||||||
#define APP_VERSION 0.0.0 // this def normally comes from build-all.sh
|
#define APP_VERSION 0.0.0 // this def normally comes from build-all.sh
|
||||||
|
#define HW_VERSION 1.0-US // normally comes from build-all.sh and contains the region code
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -240,7 +240,7 @@ void setup()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Hello
|
// Hello
|
||||||
DEBUG_MSG("%s %s\n", str(APP_NAME), xstr(APP_VERSION));
|
DEBUG_MSG("Meshtastic swver=%s, hwver=%s\n", xstr(APP_VERSION), xstr(HW_VERSION));
|
||||||
|
|
||||||
// Don't init display if we don't have one or we are waking headless due to a timer event
|
// Don't init display if we don't have one or we are waking headless due to a timer event
|
||||||
if (wakeCause == ESP_SLEEP_WAKEUP_TIMER)
|
if (wakeCause == ESP_SLEEP_WAKEUP_TIMER)
|
||||||
@ -270,7 +270,7 @@ void initBluetooth()
|
|||||||
// FIXME - we are leaking like crazy
|
// FIXME - we are leaking like crazy
|
||||||
// AllocatorScope scope(btPool);
|
// AllocatorScope scope(btPool);
|
||||||
|
|
||||||
BLEServer *serve = initBLE(getDeviceName(), HW_VENDOR, xstr(APP_VERSION)); // FIXME, use a real name based on the macaddr
|
BLEServer *serve = initBLE(getDeviceName(), HW_VENDOR, xstr(APP_VERSION), xstr(HW_VERSION)); // FIXME, use a real name based on the macaddr
|
||||||
createMeshBluetoothService(serve);
|
createMeshBluetoothService(serve);
|
||||||
|
|
||||||
// Start advertising - this must be done _after_ creating all services
|
// Start advertising - this must be done _after_ creating all services
|
||||||
|
Loading…
Reference in New Issue
Block a user