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

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Nov 19, 2023
1 parent 09887d8 commit c27ae45
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ mipidsi = "0.5"
ssd1306 = "0.7"
epd-waveshare = "0.5.0"
async-io = "2"
async-executor = "1"
edge-executor = "0.4"
futures-lite = "1"

[build-dependencies]
Expand Down
36 changes: 19 additions & 17 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,22 +596,24 @@ fn test_timer(
thread::sleep(Duration::from_secs(3));

info!("About to schedule a periodic timer every five seconds");
let periodic_timer = EspTaskTimerService::new()?.timer(move || {
info!("Tick from periodic timer");

let now = EspSystemTime {}.now();

eventloop.post(&EventLoopMessage::new(now), None).unwrap();

client
.publish(
"rust-esp32-std-demo",
QoS::AtMostOnce,
false,
format!("Now is {now:?}").as_bytes(),
)
.unwrap();
})?;
let periodic_timer = unsafe {
EspTaskTimerService::new()?.timer_nonstatic(move || {
info!("Tick from periodic timer");

let now = EspSystemTime {}.now();

eventloop.post(&EventLoopMessage::new(now), None).unwrap();

client
.publish(
"rust-esp32-std-demo",
QoS::AtMostOnce,
false,
format!("Now is {now:?}").as_bytes(),
)
.unwrap();
})?
};

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

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

use async_executor::LocalExecutor;
use edge_executor::LocalExecutor;

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

0 comments on commit c27ae45

Please sign in to comment.