添加错误代码
This commit is contained in:
@@ -96,7 +96,7 @@ void moter_down(void (*fun)(void *t),void *t)
|
||||
s->fun_in_end=fun;
|
||||
s->t=t;
|
||||
}
|
||||
moter_start(0,MOTER_MAX_COUNT-s->count);
|
||||
moter_start(0,s->max_count-s->count);
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>ص<EFBFBD>
|
||||
@@ -177,8 +177,13 @@ int init_moter(void)
|
||||
pwm->set_irq_fun(pwm,end_irq,s);
|
||||
s->pwm=pwm;
|
||||
s->stat=INITING;
|
||||
s->count=MOTER_MAX_COUNT;
|
||||
s->max_count=MOTER_MAX_COUNT;
|
||||
if((par->moter_max_count>25000)||(par->moter_max_count<1000))
|
||||
{
|
||||
s->max_count=MOTER_MAX_COUNT;
|
||||
}else{
|
||||
s->max_count=par->moter_max_count;
|
||||
}
|
||||
s->count=s->max_count;
|
||||
s->event=rt_event_create("moter_e",RT_IPC_FLAG_FIFO);
|
||||
s->inited=1;
|
||||
s->run=1;
|
||||
|
Reference in New Issue
Block a user