Skip to content

feat(flight-visualizer): add basic flight visualizer - #83

Open
PatrykPaluch wants to merge 11 commits into
mainfrom
patrykpalcuh/flight-visualizer
Open

feat(flight-visualizer): add basic flight visualizer#83
PatrykPaluch wants to merge 11 commits into
mainfrom
patrykpalcuh/flight-visualizer

Conversation

@PatrykPaluch

@PatrykPaluch PatrykPaluch commented Aug 22, 2023

Copy link
Copy Markdown
Member

probably part of #74

Note: lora-cli need to be compiled/run from pbak/lora-cli branch and it requires small changes in code - read flight-visualizer README.md

TODO:

  • read stdio
    • bme (temperature, pressure, height)
    • accelerometer (dx, dy, dz, drx, dry, drz, pich, yaw)
    • nmea
  • better 3d (+/-)

Comment thread tools/flight-visualizer/src/data.rs Outdated
}
}

pub struct OffsetVecIter<'a, T>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just use a std::collections::VecDeque (pronounced deck)

if deque.len() == max_len {
    deque.pop_front();
}
deque.push_back(value);

you can wrap it in a CircularBuffer newtype if you want (and reuse VecDeque iterators), but it may be simpler if you simply don't.

Each time I inspected a collection data structure implemented at work I concluded that It was poorly designed and implemented, it introduced a ton of undocumented code that needed maintenance and we simply didn't need it at all. I'd strongly recommend avoiding writing them unless you know you really need them and you know what you are doing. It's really hardy to get those things right.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@PatrykPaluch
PatrykPaluch marked this pull request as draft August 27, 2023 01:42
@Bartosz-Slowik Bartosz-Slowik linked an issue Aug 27, 2023 that may be closed by this pull request
@PatrykPaluch
PatrykPaluch marked this pull request as ready for review September 8, 2023 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simple to read graph.

2 participants