We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a64be0 commit 6522d73Copy full SHA for 6522d73
src/ota/interface/OTAInterface.cpp
@@ -167,10 +167,10 @@ OTACloudProcessInterface::State OTACloudProcessInterface::idle(Message* msg) {
167
OTACloudProcessInterface::State OTACloudProcessInterface::otaAvailable() {
168
// depending on the policy decided on this device the ota process can start immediately
169
// or wait for confirmation from the user
170
- if((policies & (ApprovalRequired | Approved)) == ApprovalRequired ) {
+ if(getOtaPolicy(ApprovalRequired) && !getOtaPolicy(Approved)) {
171
return OtaAvailable;
172
} else {
173
- policies &= ~Approved;
+ clearOtaPolicy(Approved);
174
return StartOTA;
175
} // TODO add an abortOTA command? in this case delete the context
176
}
0 commit comments