Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Add DataLog #37

Merged
merged 8 commits into from
Mar 2, 2022
Merged

Add DataLog #37

merged 8 commits into from
Mar 2, 2022

Conversation

auscompgeek
Copy link
Member

No description provided.

@auscompgeek
Copy link
Member Author

I seem to be getting a compile error:

wpiutil/rpy-include/rpygen/wpi__log__RawLogEntry.hpp:15:10: fatal error: rpygen/wpi__log__DataLogEntry.hpp: No such file or directory
   15 | #include <rpygen/wpi__log__DataLogEntry.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@virtuald
Copy link
Member

Fixed some things, but need to go to bed:

  • example needs to be better
  • need to provide a 'get' function for a record which figures out the right type for you
  • py::make_iterator isn't handled by pybind11-stubgen, which is annoying

@PeterJohnson
Copy link
Member

PeterJohnson commented Feb 28, 2022

Note there’s a native Python DataLogReader implementation in the allwpilib repo that could be pulled in instead (and upstream PRs welcome to clean it up). https://github.com/wpilibsuite/allwpilib/blob/main/wpiutil/examples/printlog/datalog.py

@auscompgeek
Copy link
Member Author

In that case I'm fine with leaving out bindings for it, @virtuald thoughts?

@virtuald
Copy link
Member

The bindings I pushed work, they just need some refinement. I should be able to get to it tonight. I'd rather go this route so there's less we have to maintain.

@virtuald
Copy link
Member

virtuald commented Mar 1, 2022

Regarding py::make_iterator's useless type declaration, see pybind/pybind11#1585.

auscompgeek and others added 6 commits March 2, 2022 02:30
- Removed MemoryBuffer, and only provide two ways of creating a reader instead
- TODO: example needs to be better
- TODO: need to provide a 'get' function for a record which figures out the right type for you
- TODO: py::make_iterator isn't handled by pybind11-stubgen, which is annoying
@virtuald virtuald marked this pull request as ready for review March 2, 2022 07:31
virtuald added 2 commits March 2, 2022 02:34
- Add bulk of wpilib printlog example to examples
@virtuald virtuald merged commit e6f68e2 into main Mar 2, 2022
@virtuald virtuald deleted the datalog branch March 2, 2022 07:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants