Skip to content

Commit

Permalink
update sdk
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Zachmann <[email protected]>
  • Loading branch information
JanZachmann committed Oct 9, 2024
1 parent f371758 commit 3b89a3a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ actix-server = "2.3"
actix-web = "4.5"
anyhow = "1.0"
async-trait = "0.1"
azure-iot-sdk = { git = "https://github.com/omnect/azure-iot-sdk.git", tag = "0.13.4", features = [
#azure-iot-sdk = { git = "https://github.com/omnect/azure-iot-sdk.git", tag = "0.13.4", features = [
# "module_client",
#] }
azure-iot-sdk = { git = "https://github.com/janzachmann/azure-iot-sdk.git", branch = "main", features = [
"module_client",
] }
cfg-if = "1.0"
Expand Down
8 changes: 4 additions & 4 deletions src/twin/modem_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use anyhow::{Context, Result};
use async_trait::async_trait;
use azure_iot_sdk::client::IotMessage;
use lazy_static::lazy_static;
use log::info;
use log::{debug, info};
use serde_json::json;
use std::{any::Any, env, time::Duration};
use tokio::{
Expand Down Expand Up @@ -152,7 +152,7 @@ mod inner {
}

pub async fn report(&mut self, force: bool) -> Result<()> {
info!("modem info status requested");
debug!("report (force={force})");

let modem_reports = join_all(
self.modem_paths()
Expand Down Expand Up @@ -302,7 +302,7 @@ mod inner {
}

pub async fn report(&self, force: bool) -> Result<()> {
info!("modem info status requested");
debug!("report");

self.ensure()?;

Expand Down Expand Up @@ -385,7 +385,7 @@ impl Feature for ModemInfo {
}

async fn refresh(&mut self) -> Result<()> {
info!("modem_info requested");
info!("refresh");

self.ensure()?;

Expand Down
4 changes: 3 additions & 1 deletion src/twin/network_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use anyhow::{Context, Result};
use async_trait::async_trait;
use azure_iot_sdk::client::IotMessage;
use lazy_static::lazy_static;
use log::{error, warn};
use log::{debug, error, warn};
use serde::Serialize;
use serde_json::json;
use std::{any::Any, env, time::Duration};
Expand Down Expand Up @@ -107,6 +107,8 @@ impl NetworkStatus {
const ID: &'static str = "network_status";

async fn report(&mut self, force: bool) -> Result<()> {
debug!("report (force={force})");

let interfaces = Self::parse_interfaces(&networkd::networkd_interfaces().await?)?;

// only report on change
Expand Down

0 comments on commit 3b89a3a

Please sign in to comment.