Rev 1722 | Rev 1760 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1722 | Rev 1744 | ||
---|---|---|---|
Line 527... | Line 527... | ||
527 | { |
527 | { |
528 | if(!PC_MotortestActive) MotorTest[i] = 0; |
528 | if(!PC_MotortestActive) MotorTest[i] = 0; |
529 | Motor[i].SetPoint = MotorTest[i]; |
529 | Motor[i].SetPoint = MotorTest[i]; |
530 | Motor[i].SetPointLowerBits = 0; |
530 | Motor[i].SetPointLowerBits = 0; |
531 | /* |
531 | /* |
532 | Motor[i].SetPoint = MotorTest[i] / 4; |
532 | Motor[i].SetPoint = MotorTest[i] / 4; // testing the high resolution |
533 | Motor[i].SetPointLowerBits = MotorTest[i] % 4; |
533 | Motor[i].SetPointLowerBits = MotorTest[i] % 4; |
534 | */ |
534 | */ |
535 | } |
535 | } |
536 | if(PC_MotortestActive) PC_MotortestActive--; |
536 | if(PC_MotortestActive) PC_MotortestActive--; |
537 | } |
537 | } |
538 | else FCFlags |= FCFLAG_MOTOR_RUN; |
538 | else FCFlags |= FCFLAG_MOTOR_RUN; |
- | 539 | ||
539 | //Start I2C Interrupt Mode |
540 | if(I2C_TransferActive) |
- | 541 | { |
|
- | 542 | DebugOut.Analog[16]++; // transmission was not finished yet |
|
- | 543 | // I2C_TransferActive = 0; // enable for the next time |
|
- | 544 | } |
|
- | 545 | //else |
|
- | 546 | { |
|
540 | motor_write = 0; |
547 | motor_write = 0; |
- | 548 | //Start I2C Interrupt Mode |
|
541 | I2C_Start(TWI_STATE_MOTOR_TX); |
549 | I2C_Start(TWI_STATE_MOTOR_TX); |
542 | } |
550 | } |
- | 551 | } |
|
Line 543... | Line 552... | ||
543 | 552 | ||
544 | 553 | ||
Line 1703... | Line 1712... | ||
1703 | { |
1712 | { |
1704 | Motor[i].SetPoint = 0; |
1713 | Motor[i].SetPoint = 0; |
1705 | Motor[i].SetPointLowerBits = 0; |
1714 | Motor[i].SetPointLowerBits = 0; |
1706 | } |
1715 | } |
1707 | } |
1716 | } |
- | 1717 | //if(!(CountMilliseconds % 999)) Motor[3].SetPoint = 0; |
|
1708 | } |
1718 | } |