Hairo ROBOCON2021 TrackedVehicle moudule library. Ibaraki KOSEN
Dependents: hairobo2021_F446re
Revision 1:132886173bec, committed 2021-12-05
- Comitter:
- st17099ng
- Date:
- Sun Dec 05 01:30:13 2021 +0000
- Parent:
- 0:b5561184f201
- Commit message:
- 12/5; back up commit.
Changed in this revision
TrackedVehicle.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b5561184f201 -r 132886173bec TrackedVehicle.cpp --- a/TrackedVehicle.cpp Fri Nov 26 00:29:28 2021 +0000 +++ b/TrackedVehicle.cpp Sun Dec 05 01:30:13 2021 +0000 @@ -3,8 +3,8 @@ TrackedVehicle::TrackedVehicle(uint16_t rightID, uint16_t leftID) : RightID(rightID), LeftID(leftID), RightMsg(rightID, RightData, 3, CANData, CANStandard), LeftMsg(leftID, LeftData, 3, CANData, CANStandard) { ModuleStatus = INITIAL_STATUS; - CWDuty = CW30_DUTY; - CCWDuty = CCW30_DUTY; + CWDuty = CW50_DUTY; + CCWDuty = CCW50_DUTY; EncoderPulse = 4096; MaxTargetPulse = EncoderPulse + 113; MinTargetPulse = EncoderPulse - 113; @@ -103,10 +103,9 @@ } else if(EncoderPulse < MinTargetPulse ) { /* 超信地右旋回 */ RightMsg.data[DUTY] = CWDuty; - LeftMsg.data[DUTY] = CCWDuty - ; + LeftMsg.data[DUTY] = CCWDuty; - } else { + } else if(EncoderPulse >= MinTargetPulse && EncoderPulse <= MaxTargetPulse){ RightMsg.data[DUTY] = BREAK_DUTY; LeftMsg.data[DUTY] = BREAK_DUTY; }