5#include "device/motor/j6006.h"
6#include "device/motor/m9025.h"
10inline motor_base& find_motor(std::string_view type,
const std::string& name) {
11 if (type ==
"dji")
return roboctrl::get<dji_motor>(name);
12 if (type ==
"j6006")
return roboctrl::get<j6006>(name);
13 if (type ==
"m9025")
return roboctrl::get<m9025>(name);
14 throw std::invalid_argument(std::format(
"unknown motor type '{}' for {}", type, name));