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() {
4646 return false ;
4747}
4848
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+
4957void setup () {
5058 /* Initialize serial and wait up to 5 seconds for port to open */
5159 Serial.begin (9600 );
@@ -61,7 +69,7 @@ void setup() {
6169 ArduinoCloud.begin (ArduinoIoTPreferredConnection);
6270
6371 /* Setup OTA callback */
64- ArduinoCloud.onOTARequestCb (always_deny );
72+ ArduinoCloud.onOTARequestCb (onOTARequestCallback );
6573
6674 setDebugMessageLevel (DBG_INFO);
6775 ArduinoCloud.printDebugInfo ();
You can’t perform that action at this time.
0 commit comments