We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00a2f6b commit 6f51148Copy full SHA for 6f51148
examples/ArduinoIoTCloud-DeferredOTA/ArduinoIoTCloud-DeferredOTA.ino
@@ -46,6 +46,14 @@ bool ask_user_via_serial() {
46
return false;
47
}
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
+
57
void setup() {
58
/* Initialize serial and wait up to 5 seconds for port to open */
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();
0 commit comments