Skip to content

Commit

Permalink
Introduce named constant for cycle mode
Browse files Browse the repository at this point in the history
and use it.
  • Loading branch information
gavanderhoorn committed May 20, 2024
1 parent 17cb2d5 commit 13d491f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/MotionControl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ BOOL Ros_MotionControl_StartMotionMode(MOTION_MODE mode)
MP_CYCLE_SEND_DATA sCycleData;
bzero(&sCycleData, sizeof(sCycleData));
bzero(&rData, sizeof(rData));
sCycleData.sCycle = 3; // 3 = Auto; 2 = Cycle; 1 = Step
sCycleData.sCycle = MP_CYCLE_MODE_AUTO;
ret = mpSetCycle(&sCycleData, &rData);
if( (ret != 0) || (rData.err_no != 0) )
{
Expand Down
6 changes: 6 additions & 0 deletions src/MotoPlusExterns.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,10 @@ extern MP_GRP_ID_TYPE mpCtrlGrpNo2GrpId(int grp_no);
#define E_EXRCS_UNDER_ENERGY_SAVING (-20)
#endif

//from the M+ API Function Specifications on mpSetCycle(..) (HW1483602)
#define MP_CYCLE_MODE_STEP 1
#define MP_CYCLE_MODE_1CYCLE 2
#define MP_CYCLE_MODE_AUTO 3


#endif // MOTOROS2_MOTOPLUS_EXTERNS_H

0 comments on commit 13d491f

Please sign in to comment.