diff --git a/firmware/src/article.rs b/firmware/src/article.rs index b25043a..c98d0c7 100644 --- a/firmware/src/article.rs +++ b/firmware/src/article.rs @@ -1,6 +1,7 @@ use alloc::string::String; /// Article id +/// Equivalent to the Vereinsflieger `articleid` attribute #[allow(clippy::module_name_repetitions)] pub type ArticleId = u32; diff --git a/firmware/src/vereinsflieger/proto_articles.rs b/firmware/src/vereinsflieger/proto_articles.rs index b055536..6f9e595 100644 --- a/firmware/src/vereinsflieger/proto_articles.rs +++ b/firmware/src/vereinsflieger/proto_articles.rs @@ -6,6 +6,7 @@ use alloc::vec::Vec; use core::cell::RefCell; use core::str::FromStr; use embedded_io_async::{BufRead, Write}; +use log::warn; /// `articles/list` request #[derive(Debug)] @@ -57,6 +58,11 @@ impl FromJsonObject for ArticleListResponse { // needed, which heavily reduces memory consumption. let mut articles = context.borrow_mut(); articles.update(article.articleid, article.designation.clone(), price); + } else { + warn!( + "Ignoring article with no valid price ({}): {}", + article.articleid, article.designation + ); } } _ => _ = json.read_any().await?,