Skip to content

Commit 370ef63

Browse files
committed
add define for compile with test env
1 parent ab923bb commit 370ef63

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Diff for: examples/utility/Provisioning_2.0/CSRHandler.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
#define MAX_CSR_REQUEST_INTERVAL 180000
2424
#define MAX_CSR_REQUEST_INTERVAL_ATTEMPTS 15
2525

26+
#ifdef COMPILE_TEST
27+
constexpr char *server = "boards-v2.oniudra.cc";
28+
#else
2629
constexpr char *server = "boards-v2.arduino.cc";
30+
#endif
2731

2832
CSRHandlerClass::CSRHandlerClass() :
2933
_ledFeedback{LEDFeedbackClass::getInstance()},

Diff for: examples/utility/Provisioning_2.0/Provisioning_2.0.ino

+4
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,11 @@ DeviceState handleBeginCloud() {
171171
NetworkConfigurator.enableAgent(ConfiguratorAgent::AgentTypes::BLE, false);
172172
}
173173
// Connect to Arduino IoT Cloud
174+
#ifdef COMPILE_TEST
175+
ArduinoCloud.begin(ArduinoIoTPreferredConnection, false, "mqtts-sa.iot.oniudra.cc");
176+
#else
174177
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
178+
#endif
175179
ArduinoCloud.printDebugInfo();
176180

177181
return DeviceState::RUN;

0 commit comments

Comments
 (0)