Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
v05.03.00037 Bug Fixes
Browse files Browse the repository at this point in the history
User Error on copy and paste :(
  • Loading branch information
pops64 committed Oct 17, 2018
1 parent 0c3b538 commit 4feb105
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modDesc.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="39">
<version>5.03.00036</version>
<version>5.03.00037</version>
<author><![CDATA[Courseplay.devTeam]]></author>
<title>
<br>CoursePlay 5</br>
Expand Down
6 changes: 3 additions & 3 deletions mode4.lua
Expand Up @@ -72,7 +72,7 @@ function courseplay:handle_mode4(vehicle, allowedToDrive, workSpeed, refSpeed)
courseplay:startAlignmentCourse( vehicle, vehicle.Waypoints[vehicle.cp.waypointIndex-2], true)
end
end
self.cp.ppc:initialize()
vehicle.cp.ppc:initialize()
end
elseif vehicle.cp.hasUnloadingRefillingCourse and vehicle.cp.abortWork ~= nil then
allowedToDrive = false;
Expand All @@ -83,7 +83,7 @@ function courseplay:handle_mode4(vehicle, allowedToDrive, workSpeed, refSpeed)
if vehicle.cp.abortWork ~= nil then
if vehicle.cp.previousWaypointIndex == vehicle.cp.abortWork and seederFillLevelPct ~= 0 and sprayerFillLevelPct ~= 0 then
courseplay:setWaypointIndex(vehicle, vehicle.cp.abortWork + 2);
self.cp.ppc:initialize()
vehicle.cp.ppc:initialize()
end
local offset = 9;
if vehicle.cp.hasSowingMachine then
Expand Down Expand Up @@ -116,7 +116,7 @@ function courseplay:handle_mode4(vehicle, allowedToDrive, workSpeed, refSpeed)
hasFinishedWork = true;
if vehicle.cp.hasUnloadingRefillingCourse and vehicle.cp.waypointIndex == vehicle.cp.stopWork then --make sure that previousWaypointIndex is stopWork, so the 'waiting points' algorithm in drive() works
courseplay:setWaypointIndex(vehicle, vehicle.cp.stopWork + 1);
self.cp.ppc:initialize()
vehicle.cp.ppc:initialize()
end;
end;

Expand Down
6 changes: 3 additions & 3 deletions mode6.lua
Expand Up @@ -222,7 +222,7 @@ function courseplay:handle_mode6(vehicle, allowedToDrive, workSpeed, lx , lz, re
if vehicle.Waypoints[vehicle.cp.waypointIndex].rev then
print(('%s: set waypointIndex to next forward point'):format(nameNum(workTool)));
courseplay:setWaypointIndex(vehicle, courseplay:getNextFwdPoint(vehicle));
self.cp.ppc:initialize()
vehicle.cp.ppc:initialize()
end;
elseif workTool.emptyState == BaleLoader.EMPTY_WAIT_TO_REDO then
-- print(('%s: set state BaleLoader.CHANGE_EMPTY_REDO'):format(nameNum(workTool)));
Expand Down Expand Up @@ -641,15 +641,15 @@ function courseplay:handle_mode6(vehicle, allowedToDrive, workSpeed, lx , lz, re
courseplay:startAlignmentCourse( vehicle, vehicle.Waypoints[vehicle.cp.waypointIndex-2], true)
end
end
self.cp.ppc:initialize()
vehicle.cp.ppc:initialize()
end
end
-- last point reached restart
if vehicle.cp.abortWork ~= nil then
if (vehicle.cp.previousWaypointIndex == vehicle.cp.abortWork ) and fillLevelPct ~= 100 then
courseplay:setWaypointIndex(vehicle, vehicle.cp.abortWork + 2); -- drive to waypoint after next waypoint
--vehicle.cp.abortWork = nil
self.cp.ppc:initialize()
vehicle.cp.ppc:initialize()
end
local offset = 8
if vehicle.cp.realisticDriving then
Expand Down
2 changes: 1 addition & 1 deletion vehicles.lua
Expand Up @@ -1405,7 +1405,7 @@ function courseplay:setAbortWorkWaypoint(vehicle)
end
end
-- Initialize PPC because of the jump in WPs
self.cp.ppc:initialize()
vehicle.cp.ppc:initialize()
courseplay:debug(string.format('%s: abortWork set (%d)', nameNum(vehicle), vehicle.cp.abortWork), 12);
end;

Expand Down

0 comments on commit 4feb105

Please sign in to comment.