Skip to content
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

Enable correct exporting of char data but with passing CI #99

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

hermankolden
Copy link
Contributor

Same as #95 but with fixed CI since it seems the original author might not fix it

junwoo091400 and others added 2 commits April 17, 2024 15:04
As the data type for saving the char in pyulog was np.int8, the topics
that had fields with characters weren't able to get encoded (with error:
pyulog struct.error: char format requires a bytes object of length 1).

Therefore, this enables manual conversion of np.int8 object into bytes()
with single character, so that struct.pack command works as expected.

Notable example of where this is needed is the "transponder_report"
topic (included in PX4 v1.14)'s callsign[] character array. Before this
fix, the "write_ulog()" function would fail as the struct.pack couldn't
correctly encode the characters stored in int8 type
@bkueng bkueng merged commit d23cb8f into PX4:main Jul 4, 2024
4 checks passed
@hermankolden hermankolden deleted the pr_fix_char_type_export branch July 4, 2024 07: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.

3 participants