Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core.py: Enable correct exporting of char data
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
- Loading branch information