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

Check for missing hardware interfaces that use the gpio tag. #975

Merged
merged 1 commit into from
Mar 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions hardware_interface/src/resource_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,23 @@ void ResourceManager::validate_storage(
}
}
}
for (const auto & gpio : hardware.gpios)
{
for (const auto & state_interface : gpio.state_interfaces)
{
if (!state_interface_exists(gpio.name + "/" + state_interface.name))
{
missing_state_keys.emplace_back(gpio.name + "/" + state_interface.name);
}
}
for (const auto & command_interface : gpio.command_interfaces)
{
if (!command_interface_exists(gpio.name + "/" + command_interface.name))
{
missing_command_keys.emplace_back(gpio.name + "/" + command_interface.name);
}
}
}
}

if (!missing_state_keys.empty() || !missing_command_keys.empty())
Expand Down