Replace ASCII protocol compile time setting with runtime setting

When enabled, the USB CDC interface of the ODrive will
run the ASCII protocol instead of the native protocol.
In that case the native protocol can still be used on
endpoints 0x03, 0x83.
Truly concurrent use is not tested and thus not recommended.
This commit is contained in:
Samuel Sadok
2018-05-14 15:50:01 -07:00
parent 3effe7f5bb
commit caacde7544
6 changed files with 15 additions and 7 deletions
+1
View File
@@ -131,6 +131,7 @@ static inline auto make_obj_tree() {
make_protocol_property("brake_resistance", &board_config.brake_resistance),
// TODO: changing this currently requires a reboot - fix this
make_protocol_property("enable_uart", &board_config.enable_uart),
make_protocol_property("enable_ascii_protocol_on_usb", &board_config.enable_ascii_protocol_on_usb),
make_protocol_property("dc_bus_undervoltage_trip_level", &board_config.dc_bus_undervoltage_trip_level),
make_protocol_property("dc_bus_overvoltage_trip_level", &board_config.dc_bus_overvoltage_trip_level)
),