Rev 1722 | Rev 1760 | Go to most recent revision | Show entire file | Ignore 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 | ||
- | 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 | { |
|
- | 547 | motor_write = 0; |
|
539 | //Start I2C Interrupt Mode |
548 | //Start I2C Interrupt Mode |
540 | motor_write = 0; |
- | |
541 | I2C_Start(TWI_STATE_MOTOR_TX); |
549 | I2C_Start(TWI_STATE_MOTOR_TX); |
- | 550 | } |
|
542 | } |
551 | } |
Line 543... | Line 552... | ||
543 | 552 | ||
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 | } |