include region code in the BLE HW version string. ie 1.0-US

pull/6/head
geeksville 2020-02-24 09:22:34 -08:00
rodzic bd0f35ad83
commit 51b53f406e
3 zmienionych plików z 6 dodań i 7 usunięć

Wyświetl plik

@ -2,7 +2,7 @@
set -e
VERSION=0.0.4
source bin/version.sh
COUNTRIES="US EU CN JP"
@ -11,7 +11,8 @@ SRCBIN=.pio/build/esp32/firmware.bin
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"
echo "Building with $PLATFORMIO_BUILD_FLAGS"
@ -25,7 +26,6 @@ for COUNTRY in $COUNTRIES; do
pio run # -v
cp $SRCBIN release/firmware-HELTEC-$COUNTRY-$VERSION.bin
cp $SRCMAP release/firmware-HELTEC-$COUNTRY-$VERSION.map
done
zip release/firmware-$VERSION.zip release/firmware-*-$VERSION.bin

Wyświetl plik

@ -29,11 +29,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Version
// -----------------------------------------------------------------------------
#define APP_NAME "Meshtastic"
// If app version is not specified we assume we are not being invoked by the build script
#ifndef APP_VERSION
#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

Wyświetl plik

@ -240,7 +240,7 @@ void setup()
#endif
// 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
if (wakeCause == ESP_SLEEP_WAKEUP_TIMER)
@ -270,7 +270,7 @@ void initBluetooth()
// FIXME - we are leaking like crazy
// 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);
// Start advertising - this must be done _after_ creating all services