Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit c27ae45

Browse files
committed
Fix CI
1 parent 09887d8 commit c27ae45

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ mipidsi = "0.5"
6464
ssd1306 = "0.7"
6565
epd-waveshare = "0.5.0"
6666
async-io = "2"
67-
async-executor = "1"
67+
edge-executor = "0.4"
6868
futures-lite = "1"
6969

7070
[build-dependencies]

src/main.rs

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -596,22 +596,24 @@ fn test_timer(
596596
thread::sleep(Duration::from_secs(3));
597597

598598
info!("About to schedule a periodic timer every five seconds");
599-
let periodic_timer = EspTaskTimerService::new()?.timer(move || {
600-
info!("Tick from periodic timer");
601-
602-
let now = EspSystemTime {}.now();
603-
604-
eventloop.post(&EventLoopMessage::new(now), None).unwrap();
605-
606-
client
607-
.publish(
608-
"rust-esp32-std-demo",
609-
QoS::AtMostOnce,
610-
false,
611-
format!("Now is {now:?}").as_bytes(),
612-
)
613-
.unwrap();
614-
})?;
599+
let periodic_timer = unsafe {
600+
EspTaskTimerService::new()?.timer_nonstatic(move || {
601+
info!("Tick from periodic timer");
602+
603+
let now = EspSystemTime {}.now();
604+
605+
eventloop.post(&EventLoopMessage::new(now), None).unwrap();
606+
607+
client
608+
.publish(
609+
"rust-esp32-std-demo",
610+
QoS::AtMostOnce,
611+
false,
612+
format!("Now is {now:?}").as_bytes(),
613+
)
614+
.unwrap();
615+
})?
616+
};
615617

616618
periodic_timer.every(Duration::from_secs(5))?;
617619

@@ -718,7 +720,7 @@ fn test_mqtt_client() -> Result<EspMqttClient<'static, ConnState<MessageImpl, Es
718720
fn test_tcp_bind_async() -> anyhow::Result<()> {
719721
use std::pin::pin;
720722

721-
use async_executor::LocalExecutor;
723+
use edge_executor::LocalExecutor;
722724

723725
async fn test_tcp_bind(executor: &LocalExecutor<'_>) -> std::io::Result<()> {
724726
/// Echoes messages from the client back to it.

0 commit comments

Comments
 (0)