Commit 6b7a072a authored by Astro's avatar Astro
Browse files

Merge branch 'fix-bhi160' into 'master'

Fix bhi160::SensorDataIter

Closes #7

See merge request !14
parents 62b329ac c422dd98
Pipeline #3638 failed with stage
in 11 minutes and 39 seconds
......@@ -136,8 +136,6 @@ impl<'a, S: SensorType> Iterator for SensorDataIter<'a, S> {
fn next(&mut self) -> Option<Self::Item> {
while self.pos < self.data.n {
self.pos += 1;
let vec = &self.data.buf[self.pos];
if vec.data_type != DATA_TYPE_VECTOR {
writeln!(crate::UART, "Sensor: skip type {}\r", vec.data_type).ok();
......@@ -151,6 +149,8 @@ impl<'a, S: SensorType> Iterator for SensorDataIter<'a, S> {
status: vec.status,
};
self.pos += 1;
return Some(item);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment