Skip to content

Commit 9c0cd14

Browse files
Copilotdorkmo
andcommitted
Fix build error: use rtos::ThisThread with explicit header include
Co-authored-by: dorkmo <[email protected]>
1 parent 08386a6 commit 9c0cd14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

TankAlarm-112025-Client-BluesOpta/TankAlarm-112025-Client-BluesOpta.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include <LittleFileSystem.h>
4646
#include <BlockDevice.h>
4747
#include <mbed.h>
48+
#include "rtos/ThisThread.h"
4849
using namespace mbed;
4950
using namespace std::chrono; // For chrono types (e.g., milliseconds)
5051
using namespace std::chrono_literals; // For chrono duration literals (e.g., 100ms)
@@ -674,7 +675,7 @@ void loop() {
674675
// Sleep to reduce power consumption between loop iterations
675676
// Use Mbed OS thread sleep for power efficiency - allows CPU to enter low-power states during sleep periods
676677
#if defined(ARDUINO_OPTA) || defined(ARDUINO_ARCH_MBED)
677-
mbed::ThisThread::sleep_for(std::chrono::milliseconds(100)); // Thread sleep for 100ms - enables power saving
678+
rtos::ThisThread::sleep_for(std::chrono::milliseconds(100)); // Thread sleep for 100ms - enables power saving
678679
#else
679680
delay(100); // Fallback for non-Mbed platforms
680681
#endif

0 commit comments

Comments
 (0)