Skip to content

Commit

Permalink
Add visualization to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsided committed Jul 4, 2024
1 parent c4f1861 commit c312057
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
23 changes: 1 addition & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,4 @@ I'm currently using it for these projects:

At the moment it doesn't do much, but just dumps out the information as it comes:

```text
In: 31688, 30:25077 43:04 mag = (602, -65, 997)
In: 31689, 30:25077 44:04 temp = 30.25 °C
In: 31690, 25:25078 42:04 acc = (0.01171875, -0.0078125, 1.015625)
In: 31691, 25:25079 42:04 acc = (0.015625, -0.00390625, 1.0234375)
In: 31692, 25:25080 42:04 acc = (0.0078125, -0.0078125, 1.0195313)
In: 31693, 25:25081 42:04 acc = (0.01171875, -0.015625, 1.015625)
In: 31694, 25:25082 42:04 acc = (0.0078125, -0.015625, 1.0039063)
In: 31695, 30:25082 43:04 mag = (600, -62, 995)
In: 31696, 30:25082 44:04 temp = 30.25 °C
In: 31697, 25:25083 42:04 acc = (0.01171875, -0.0078125, 1.0078125)
In: 31698, 25:25084 42:04 acc = (0.01171875, -0.01953125, 1.0117188)
In: 31699, 25:25085 42:04 acc = (0.015625, -0.0234375, 1.0039063)
In: 31700, 25:25086 42:04 acc = (0.015625, -0.015625, 1.0117188)
In: 31701, 25:25087 42:04 acc = (0.02734375, -0.00390625, 1.0078125)
In: 31702, 30:25087 43:04 mag = (604, -62, 1000)
In: 31703, 25:25088 42:04 acc = (0.0078125, -0.0078125, 1.0195313)
In: 31704, 30:25088 44:04 temp = 30.25 °C
In: 31705, 25:25089 42:04 acc = (0.00390625, -0.0078125, 1.0195313)
In: 31706, 25:25090 42:04 acc = (0.0078125, -0.015625, 1.0117188)
In: 31707, 25:25091 42:04 acc = (0.0078125, -0.015625, 1.0195313)
```
![](readme/picture.jpg)
Binary file added readme/picture.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/data_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ impl SensorDataBuffer {
let sensor_id = SensorId::from(&frame);
self.inner.enqueue(frame.clone());

// Sensor-specific buffers do not care about identification frames.
if let SensorData::Identification(_ident) = &frame.value {
// Nothing to do here.
return;
};

let mut map = self.by_sensor.write().expect("failed to lock");
map.entry(sensor_id)
.and_modify(|entry| entry.enqueue(frame.clone()))
Expand Down

0 comments on commit c312057

Please sign in to comment.