Repository navigation
Conversation
Member
|
@swinp thank you very much for this proposal! It's now released in 2.47.0, together with the VS Code extension 1.2.0, based on your idea and with your manifest format ( We made our own implementation instead of merging this PR, to fit some changes we discussed with the extension:
#define THINGER_OTA_CHECK(FIELD) FIELD("PCB_MODEL", "SENSOR_I2C") FIELD("PCB_VERSION", "V2")
#include <ThingerESP32OTA.h>We tested it end to end on a real UNO R4 WiFi: a different field asks for confirmation, cancelling sends nothing, and the same fields update without asking. Closing this one, thanks again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An ESP32 OTA image can be valid and have a new version while targeting the wrong PCB or network interface. Add opt-in compatibility metadata so the VS Code uploader can compare the running device with the candidate image before starting OTA.
Changes
THINGER_OTA_CHECK(FIELD)declaration generates both a versioned manifest in the application binary and theTHINGER_OTA_CHECKoutput resource.ThingerESP32OTAregisters the resource automatically and advertises it through$ota/options.For example,
PCB_VERSION = V2on a device andPCB_VERSION = V3in a candidate become available to the uploader without executing the new firmware. Existing sketches that omit the macro keep their firmware behavior.Validation
esp32devexample variants compile with PlatformIO Espressif32 6.10.0 / Arduino-ESP32 2.0.17.Related to thinger-io/vscode-extension#7.
Companion extension PR: thinger-io/vscode-extension#8.