fix encoding of sw version numbers in the BLE device info

pull/6/head
geeksville 2020-02-24 09:12:13 -08:00
rodzic af5e3a0e02
commit bd0f35ad83
4 zmienionych plików z 12 dodań i 3 usunięć

Wyświetl plik

@ -0,0 +1,6 @@
set -e
source bin/version.sh
esptool.py --baud 921600 write_flash 0x10000 release/firmware-HELTEC-US-$VERSION.bin

3
bin/version.sh 100644
Wyświetl plik

@ -0,0 +1,3 @@
export VERSION=0.0.5

Wyświetl plik

@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// 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 APP_VERSION 0.0.0 // this def normally comes from build-all.sh
#endif

Wyświetl plik

@ -240,7 +240,7 @@ void setup()
#endif
// Hello
DEBUG_MSG("%s %s\n", xstr(APP_NAME), str(APP_VERSION));
DEBUG_MSG("%s %s\n", str(APP_NAME), xstr(APP_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, str(APP_VERSION)); // FIXME, use a real name based on the macaddr
BLEServer *serve = initBLE(getDeviceName(), HW_VENDOR, xstr(APP_VERSION)); // FIXME, use a real name based on the macaddr
createMeshBluetoothService(serve);
// Start advertising - this must be done _after_ creating all services