mirror of
https://github.com/Binary-Coalescence/motorDSM.git
synced 2025-08-04 21:55:40 -05:00
Merged with R3_13_Branch.
This commit is contained in:
@@ -232,11 +232,15 @@ STATIC int set_status(int card, int signal)
|
|||||||
if (motorData == motor_info->position)
|
if (motorData == motor_info->position)
|
||||||
motor_info->no_motion_count++;
|
motor_info->no_motion_count++;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
motor_info->position = motorData;
|
if (motorData >= motor_info->position)
|
||||||
motor_info->encoder_position = motorData;
|
motor_info->status |= RA_DIRECTION;
|
||||||
motor_info->no_motion_count = 0;
|
else
|
||||||
}
|
motor_info->status &= ~RA_DIRECTION;
|
||||||
|
motor_info->position = motorData;
|
||||||
|
motor_info->encoder_position = motorData;
|
||||||
|
motor_info->no_motion_count = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Parse motor velocity? */
|
/* Parse motor velocity? */
|
||||||
/* NEEDS WORK */
|
/* NEEDS WORK */
|
||||||
|
Reference in New Issue
Block a user