|
| | Axis (char axis, volatile Control_t *control) |
| |
| virtual | ~Axis () |
| |
| const ClassIdentifier | getInfo () |
| | Command handlers always have class infos. Works well with ChoosableClass.
|
| |
| const ClassType | getClassType () override |
| |
| virtual std::string | getHelpstring () |
| |
| void | setupTMC4671 () |
| |
| void | setDrvType (uint8_t drvtype) |
| |
| void | setEncType (uint8_t enctype) |
| |
| uint8_t | getDrvType () |
| |
| uint8_t | getEncType () |
| |
| Encoder * | getEncoder () |
| |
| MotorDriver * | getDriver () |
| |
| void | usbSuspend () |
| |
| void | usbResume () |
| |
| void | saveFlash () override |
| |
| void | restoreFlash () override |
| |
| void | prepareForUpdate () |
| |
| void | updateDriveTorque () |
| |
| void | emergencyStop (bool reset) |
| |
| void | setPos (uint16_t val) |
| |
| void | zeroPos () |
| |
| bool | getFfbActive () |
| |
| std::pair< int32_t, float > | scaleEncValue (float angle, uint16_t degrees) |
| |
| float | getEncAngle (Encoder *enc) |
| |
| void | setPower (uint16_t power) |
| |
| void | errorCallback (const Error &error, bool cleared) override |
| |
| void | registerCommands () |
| |
| CommandStatus | command (const ParsedCommand &cmd, std::vector< CommandReply > &replies) |
| |
| int32_t | getLastScaledEnc () |
| |
| void | resetMetrics (float new_pos) |
| |
| void | updateMetrics (float new_pos) |
| |
| int32_t | updateIdleSpringForce () |
| |
| void | setIdleSpringStrength (uint8_t spring) |
| |
| void | setFxStrengthAndFilter (uint8_t val, uint8_t &valToSet, Biquad &filter) |
| |
| void | calculateAxisEffects (bool ffb_on) |
| |
| int32_t | getTorque () |
| |
| int16_t | updateEndstop () |
| |
| int32_t | calculateExpoTorque (int32_t torque) |
| |
| void | startForceFadeIn (float start=0, float fadeTime=0.5) |
| |
| metric_t * | getMetrics () |
| |
| void | setEffectTorque (int32_t torque) |
| |
| bool | updateTorque (int32_t *totalTorque) |
| |
| void | setGearRatio (uint8_t numerator, uint8_t denominator) |
| |
| | PersistentStorage () |
| |
| virtual | ~PersistentStorage () |
| |
| void | restoreFlashDelayed () |
| |
Public Member Functions inherited from CommandHandler |
| | CommandHandler (const char *clsname, uint16_t clsid, uint8_t instance=0) |
| |
| virtual | ~CommandHandler () |
| |
| virtual bool | hasCommands () |
| |
| virtual void | setCommandsEnabled (bool enable) |
| |
| void | registerCommands () |
| |
| virtual CommandStatus | internalCommand (const ParsedCommand &cmd, std::vector< CommandReply > &replies) |
| |
| virtual std::string | getCommandsHelpstring () |
| |
| virtual std::string | getCsvHelpstring () |
| |
| virtual uint8_t | getCommandHandlerInstance () |
| |
| void | broadcastCommandReply (CommandReply reply, uint32_t cmdId, CMDtype type) |
| |
| void | sendCommandReplyAsync (CommandReply reply, uint32_t cmdId, CMDtype type, CommandInterface *interface=nullptr) |
| |
| virtual uint16_t | getCommandHandlerID () |
| |
| virtual CmdHandlerInfo * | getCommandHandlerInfo () |
| |
| virtual bool | isValidCommandId (uint32_t cmdid, uint32_t ignoredFlags=0, uint32_t requiredFlag=0) |
| |
| virtual CmdHandlerCommanddef * | getCommandFromName (const std::string &cmd, uint32_t ignoredFlags=0) |
| |
| virtual CmdHandlerCommanddef * | getCommandFromId (const uint32_t id, uint32_t ignoredFlags=0) |
| |
| template<typename ID> |
| void | registerCommand (const char *cmd, const ID cmdid, const char *help=nullptr, uint32_t flags=0) |
| |
Public Member Functions inherited from ErrorHandler |
| | ErrorHandler () |
| |
| virtual | ~ErrorHandler () |
| |
|
| const float | AXIS_DAMPER_RATIO = INTERNAL_SCALER_DAMPER * INTERNAL_AXIS_DAMPER_SCALER / 255.0 |
| |
| const float | AXIS_INERTIA_RATIO = INTERNAL_SCALER_INERTIA * INTERNAL_AXIS_INERTIA_SCALER / 255.0 |
| |
| AxisFlashAddrs | flashAddrs |
| |
| volatile Control_t * | control |
| |
| AxisConfig | conf |
| |
| std::unique_ptr< MotorDriver > | drv = std::make_unique<MotorDriver>() |
| |
| std::shared_ptr< Encoder > | enc = nullptr |
| |
| bool | outOfBounds = false |
| |
| const Error | outOfBoundsError = Error(ErrorCode::axisOutOfRange,ErrorType::warning,"Axis out of bounds") |
| |
| float | forceFadeTime = 1.0 |
| |
| float | forceFadeCurMult = 1.0 |
| |
| TMC4671Limits | tmclimits |
| |
| float | encoderOffset = 0 |
| |
| uint16_t | degreesOfRotation = 900 |
| |
| uint16_t | lastdegreesOfRotation = degreesOfRotation |
| |
| uint16_t | nextDegreesOfRotation = degreesOfRotation |
| |
| uint16_t | maxSpeedDegS = 0 |
| |
| uint32_t | maxTorqueRateMS = 0 |
| |
| float | speedLimiterP = AXIS_SPEEDLIMITER_P |
| |
| float | speedLimiterI = AXIS_SPEEDLIMITER_I |
| |
| float | spdlimitreducerI = 0 |
| |
| char | axis |
| |
| axis_metric_t | metric |
| |
| float | _lastSpeed = 0 |
| |
| int32_t | effectTorque = 0 |
| |
| int32_t | axisEffectTorque = 0 |
| |
| uint8_t | fx_ratio_i = 204 |
| |
| uint16_t | power = 5000 |
| |
| float | torqueScaler = 0 |
| |
| float | effect_margin_scaler = 0 |
| |
| bool | invertAxis = true |
| |
| uint8_t | endstopStrength = 127 |
| |
| const float | endstopGain = 25 |
| |
| uint8_t | idlespringstrength = 127 |
| |
| int16_t | idlespringclip = 0 |
| |
| float | idlespringscale = 0 |
| |
| bool | motorWasNotReady = true |
| |
| const std::array< biquad_constant_t, 4 > | filterSpeedCst = { {{ 40, 55 }, { 70, 55 }, { 120, 55 }, {180, 55}} } |
| |
| const std::array< biquad_constant_t, 4 > | filterAccelCst = { {{ 40, 30 }, { 55, 30 }, { 70, 30 }, {120, 55}} } |
| |
| const biquad_constant_t | filterDamperCst = {60, 55} |
| |
| const biquad_constant_t | filterFrictionCst = {50, 20} |
| |
| const biquad_constant_t | filterInertiaCst = {20, 20} |
| |
| uint8_t | filterProfileId = 1 |
| |
| const float | filter_f = 1000 |
| |
| const int32_t | intFxClip = 20000 |
| |
| uint8_t | damperIntensity = 30 |
| |
| uint8_t | frictionIntensity = 0 |
| |
| uint8_t | inertiaIntensity = 0 |
| |
| Biquad | speedFilter = Biquad(BiquadType::lowpass, filterSpeedCst[filterProfileId].freq/filter_f, filterSpeedCst[filterProfileId].q/100.0, 0.0) |
| |
| Biquad | accelFilter = Biquad(BiquadType::lowpass, filterAccelCst[filterProfileId].freq/filter_f, filterAccelCst[filterProfileId].q/100.0, 0.0) |
| |
| Biquad | damperFilter = Biquad(BiquadType::lowpass, filterDamperCst.freq/filter_f, filterDamperCst.q / 100.0, 0.0) |
| |
| Biquad | frictionFilter = Biquad(BiquadType::lowpass, filterFrictionCst.freq/filter_f, filterFrictionCst.q / 100.0, 0.0) |
| |
| Biquad | inertiaFilter = Biquad(BiquadType::lowpass, filterInertiaCst.freq/filter_f, filterInertiaCst.q / 100.0, 0.0) |
| |
| GearRatio_t | gearRatio |
| |
| int | expoValInt = 0 |
| |
| float | expo = 1 |
| |
| float | expoScaler = 50 |
| |
|
| static std::vector< PersistentStorage * > & | getFlashHandlers () |
| |
| static void | restoreFlashStartupCb () |
| |
Static Public Member Functions inherited from CommandHandler |
| static void | logSerial (std::string string) |
| | Send a log formatted sequence.
|
| |
| static void | logSerialDebug (std::string string) |
| | Send a log formatted sequence if debug is on.
|
| |
| static bool | logsEnabled () |
| |
| static void | setLogsEnabled (bool enabled) |
| |
| static uint32_t | getClassIdFromName (const char *name) |
| |
| static const char * | getClassNameFromId (const uint32_t id) |
| |
| static CommandHandler * | getHandlerFromHandlerId (const uint16_t cmdhandlerID) |
| |
| static CommandHandler * | getHandlerFromId (const uint16_t id, const uint8_t instance=0xFF) |
| |
| static CommandHandler * | getHandlerFromClassName (const char *name, const uint8_t instance=0xFF) |
| |
| static std::vector< CommandHandler * > | getHandlersFromClassName (const char *name) |
| |
| static std::vector< CommandHandler * > | getHandlersFromId (const uint16_t id) |
| |
| static bool | isInHandlerList (CommandHandler *handler) |
| |
| static std::string | getAllHelpstrings () |
| |
| static std::vector< CommandHandler * > & | getCommandHandlers () |
| |
| template<typename TVal> |
| static CommandStatus | handleGetSet (const ParsedCommand &cmd, std::vector< CommandReply > &replies, TVal &value) |
| |
| template<typename TVal, class cls, class cls1> |
| static CommandStatus | handleGetSetFunc (const ParsedCommand &cmd, std::vector< CommandReply > &replies, TVal &value, void(cls1::*setfunc)(TVal), cls *obj) |
| |
| template<typename TVal, class cls, class cls1, class cls2> |
| static CommandStatus | handleGetFuncSetFunc (const ParsedCommand &cmd, std::vector< CommandReply > &replies, TVal(cls1::*getfunc)(), void(cls2::*setfunc)(TVal), cls *obj) |
| |
| template<typename TVal, class cls, class cls1> |
| static CommandStatus | handleGetFuncSet (const ParsedCommand &cmd, std::vector< CommandReply > &replies, TVal &value, TVal(cls1::*getfunc)(), cls *obj) |
| |
Static Public Member Functions inherited from ErrorHandler |
| static void | addError (const Error &error) |
| |
| static void | clearError (const Error &error) |
| |
| static void | clearError (ErrorCode errorcode) |
| |
| static void | clearTemp () |
| |
| static void | clearAll () |
| |
| static std::span< Error > | getErrors () |
| |
Protected Member Functions inherited from CommandHandler |
| void | setInstance (uint8_t instance) |
| |
| virtual void | addCommandHandler () |
| |
| virtual void | removeCommandHandler () |
| |
Static Protected Member Functions inherited from CommandHandler |
| static std::vector< uint16_t > & | getCommandHandlerIds () |
| |
Static Protected Member Functions inherited from ErrorHandler |
| static void | sortErrors () |
| |
| bool | restoreDelayedFlag = false |
| |
Protected Attributes inherited from CommandHandler |
| bool | commandsEnabled = true |
| |
| std::vector< CmdHandlerCommanddef > | registeredCommands |
| |
| CmdHandlerInfo | cmdHandlerInfo |
| |
| static bool | startupComplete = false |
| |
Static Protected Attributes inherited from ErrorHandler |
| static std::array< Error, ERRORHANDLER_MAXERRORS > | errors |
| |
Definition at line 100 of file Axis.h.