added servo

This commit is contained in:
2025-08-23 20:30:17 +02:00
parent d1f03f832b
commit e5c198058d
16 changed files with 198 additions and 24 deletions

View File

@@ -41,7 +41,7 @@ bool MicrorosExecutor::connect() {
if (rclc_node_init_default(&this->node, this->node_name, "", &this->support) != RCL_RET_OK)
return false;
if (rclc_executor_init(&this->executor, &this->support.context, 1, &this->allocator) != RCL_RET_OK)
if (rclc_executor_init(&this->executor, &this->support.context, 32, &this->allocator) != RCL_RET_OK)
return false;
return true;
@@ -67,6 +67,7 @@ rcl_publisher_t* MicrorosExecutor::add_publisher(const rosidl_message_type_suppo
// Append to list
sys_slist_append(&this->publishers_head, &pub_node->node);
printk("registered publisher %s\n", topic_name);
return &pub_node->publisher;
}
@@ -88,5 +89,6 @@ rcl_subscription_t* MicrorosExecutor::add_subscription(const rosidl_message_type
return nullptr;
}
printk("registered subscriber %s\n", topic_name);
return &sub_node->subscription;
}