diff --git a/bin/build-nrf52.sh b/bin/build-nrf52.sh index e3a421865..edcc2add2 100755 --- a/bin/build-nrf52.sh +++ b/bin/build-nrf52.sh @@ -21,13 +21,14 @@ rm -f $BUILDDIR/firmware* export APP_VERSION=$VERSION basename=firmware-$1-$VERSION +ota_basename=${basename}-ota pio run --environment $1 -t mtjson # -v cp $BUILDDIR/$basename.elf $OUTDIR/$basename.elf echo "Copying NRF52 dfu (OTA) file" -cp $BUILDDIR/$basename.zip $OUTDIR/$basename.zip +cp $BUILDDIR/$basename.zip $OUTDIR/$ota_basename.zip echo "Copying NRF52 UF2 file" cp $BUILDDIR/$basename.uf2 $OUTDIR/$basename.uf2 diff --git a/bin/platformio-custom.py b/bin/platformio-custom.py index 3fdbffb70..b6560f35b 100644 --- a/bin/platformio-custom.py +++ b/bin/platformio-custom.py @@ -17,6 +17,8 @@ lfsbin = f"{progname.replace('firmware-', 'littlefs-')}.bin" def manifest_gather(source, target, env): out = [] + board_platform = env.BoardConfig().get("platform") + needs_ota_suffix = board_platform == "nordicnrf52" check_paths = [ progname, f"{progname}.elf", @@ -32,8 +34,11 @@ def manifest_gather(source, target, env): for p in check_paths: f = env.File(env.subst(f"$BUILD_DIR/{p}")) if f.exists(): + manifest_name = p + if needs_ota_suffix and p == f"{progname}.zip": + manifest_name = f"{progname}-ota.zip" d = { - "name": p, + "name": manifest_name, "md5": f.get_content_hash(), # Returns MD5 hash "bytes": f.get_size() # Returns file size in bytes } diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index 0fa09df74..f7116e701 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -429,7 +429,9 @@ int32_t PositionModule::runOnce() if (lastGpsSend == 0 || msSinceLastSend >= intervalMs) { if (waitingForFreshPosition) { +#ifdef GPS_DEBUG LOG_DEBUG("Skip initial position send; no fresh position since boot"); +#endif } else if (nodeDB->hasValidPosition(node)) { lastGpsSend = now;