kopia lustrzana https://gitlab.com/sane-project/backends
ensure target speed is reached
- in case the motor profile table doesn't contain target speed, add it to have accurate scanning resolutionmerge-requests/1/head
rodzic
675285ef8d
commit
fab55c629d
|
@ -1650,7 +1650,7 @@ Motor_Profile *profile;
|
|||
i=0;
|
||||
sum=0;
|
||||
|
||||
/* first step is used unmodified */
|
||||
/* first step is always used unmodified */
|
||||
current=profile->table[0];
|
||||
|
||||
/* loop on profile copying and apply step type */
|
||||
|
@ -1662,6 +1662,14 @@ Motor_Profile *profile;
|
|||
current=profile->table[i]>>step_type;
|
||||
}
|
||||
|
||||
/* ensure last step is required speed in case profile doesn't contain it */
|
||||
if(current!=0 && current<target)
|
||||
{
|
||||
slope[i]=target;
|
||||
sum+=slope[i];
|
||||
i++;
|
||||
}
|
||||
|
||||
/* range checking */
|
||||
if(profile->table[i]==0 && DBG_LEVEL >= DBG_warn && current>target)
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue