-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(flight-visualizer): add basic flight visualizer #83
base: main
Are you sure you want to change the base?
Conversation
tools/flight-visualizer/src/data.rs
Outdated
} | ||
} | ||
|
||
pub struct OffsetVecIter<'a, T> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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.mdTODO: