Homepage GitHub

Get union type in python


#1

Hi!

This is rather a simple python question than a pyuavcan question perhaps… But how do I detect the union type of a broadcasted message payload?

Lets say a broadcasted message contains uavcan.protocol.param.Value and the source node has set real_value.

How does the subscriber, inside the callback, parse and detect the type?

/python newbie


#2

I just noticed uavcan.get_active_union_field !!!

=)