3.4.6 mcRpcI_MechanicalAngleGet
C
/* Get mechanical angle */
float32_t mcRpcI_MechanicalAngleGet( const tmcRpc_ModuleData_s * const pModule )
Summary
Get the mechanical angle.
Description
This function is used to read the mechanical angle from the rotor position calculation module's state structure.
Precondition
None.
Parameters
Param | Description |
---|---|
pModule | A pointer to the rotor position calculation module data structure. |
Returns
Returns the mechanical angle as a float32
.
Example
// Define the rotor position calculation module data structure tmcRpc_ModuleData_s mcRpcI_ModuleData_gds; float32_t mechAngle; /* Get mechanical angle */ mechAngle = mcRpcI_MechanicalAngleGet(&mcRpcI_ModuleData_gds);
Remarks
None.