24#ifndef TAPROOT_DJI_MOTOR_TERMINAL_SERIAL_HANDLER_HPP_
25#define TAPROOT_DJI_MOTOR_TERMINAL_SERIAL_HANDLER_HPP_
38class DjiMotorTxHandler;
42 static constexpr char HEADER[] =
"motorinfo";
50 modm::IOStream& outputStream,
51 bool streamingEnabled)
override;
58 static constexpr char USAGE[] =
59 "Usage: motorinfo <[-H] | [all] | [motor [mid]] [can [cid]]>\n"
61 " - [-H] prints usage\n"
62 " - [all] prints all motor info\n"
63 " Or specifiy a motor id and/or can id, where\n"
64 " - [mid] is the id of a motor, in [1, 8]\n"
65 " - [cid] is some the can id, in [1, 2]\n";
69 bool motorIdValid =
false;
71 bool canBusValid =
false;
73 bool printAll =
false;
75 bool printInfo(modm::IOStream& outputStream);
77 void getMotorInfoToString(
const DjiMotor*
motor, modm::IOStream& outputStream);
79 void printAllMotorInfo(getMotorByIdFunc func, modm::IOStream& outputStream);
Definition drivers.hpp:70
Definition terminal_serial.hpp:59
Definition dji_motor_terminal_serial_handler.hpp:40
mockable void init()
Definition dji_motor_terminal_serial_handler.cpp:44
static constexpr char HEADER[]
Definition dji_motor_terminal_serial_handler.hpp:42
void terminalSerialStreamCallback(modm::IOStream &outputStream) override
Definition dji_motor_terminal_serial_handler.cpp:39
DjiMotorTerminalSerialHandler(Drivers *drivers)
Definition dji_motor_terminal_serial_handler.hpp:44
bool terminalSerialCallback(char *inputLine, modm::IOStream &outputStream, bool streamingEnabled) override
Definition dji_motor_terminal_serial_handler.cpp:46
Definition dji_motor_tx_handler.hpp:74
Definition dji_motor.hpp:71
Definition brushlessutils.cpp:4
MotorId
Definition dji_motor_ids.hpp:38
Definition ballistics.cpp:29
tap::Drivers Drivers
Definition drivers.hpp:11
fang::Drivers & drivers
Definition robot_singleton.cpp:45
#define mockable
Wrap class functions that are not already virtual in this function if you wish to mock them.
Definition util_macros.hpp:38