Hello! I defined my node as publisher of uavcan::equipment::actuator::command. But method pub.init of the lib return “ErrUnknownDataType”. where could there be a mistake?
const int RxQueueSize = 128;
static std::uint32_t BitRate = 1000000;
const unsigned NodeMemoryPoolSize = 1024;
int main(void)
{
USER_AFIO_CAN1_Init();
static uavcan::Node<NodeMemoryPoolSize>& node = getNode();
if (node.setNodeID(9) == 0){
char a = '1';
uint8_t *pa = (uint8_t*)&a;
HAL_UART_Transmit_IT(&huart1, pa, 1);
}
node.setName("my_node");
if (node.start() < 0){ //uavcan::TransferPriority::Default
char a = '2';
uint8_t *pa = (uint8_t*)&a;
HAL_UART_Transmit_IT(&huart1, pa, 1);
}
uavcan::Publisher<uavcan::equipment::actuator::Command>cmd_pub(node);
int uavcan_error = cmd_pub.init();
if(uavcan_error == -ErrUnknownDataType){
char a = '3';
HAL_UART_Transmit_IT(&huart1, (uint8_t*)&a, 1); <--- It is sent(
}