File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
examples/ArduinoIoTCloud-DeferredOTA Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,14 @@ bool ask_user_via_serial() {
46
46
return false ;
47
47
}
48
48
49
+ bool onOTARequestCallback ()
50
+ {
51
+ /* Select the preferred behaviour changing the called function */
52
+ // return always_deny();
53
+ // return always_allow();
54
+ return ask_user_via_serial ();
55
+ }
56
+
49
57
void setup () {
50
58
/* Initialize serial and wait up to 5 seconds for port to open */
51
59
Serial.begin (9600 );
@@ -61,7 +69,7 @@ void setup() {
61
69
ArduinoCloud.begin (ArduinoIoTPreferredConnection);
62
70
63
71
/* Setup OTA callback */
64
- ArduinoCloud.onOTARequestCb (always_deny );
72
+ ArduinoCloud.onOTARequestCb (onOTARequestCallback );
65
73
66
74
setDebugMessageLevel (DBG_INFO);
67
75
ArduinoCloud.printDebugInfo ();
You can’t perform that action at this time.
0 commit comments