so wie das aussieht würde das zu dieser Änderung in der Linetracker.cpp passen, die mit der 318 neu eingeflossen ist.Hat das Jemand auch?
Sieht dann im Extremfall so aus:
https://1drv.ms/v/s!AtaKvFEsWsH5hOMYX0s5P6EE82UktA?e=ZWJcUA
Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Adafruit Grand Central M4 (SAMD51), Enabled, 120 MHz (standard), Small (-Os) (standard), 50 MHz (standard), Arduino, Off"
C:\Users\GV9492\Box Sync\Ardumower\Sunray-1.0.318\sunray\LineTracker.cpp: In function 'void trackLine(bool)':
LineTracker.cpp:212:30: error: no matching function for call to 'Map::nextPoint(bool)'
212 | if (!maps.nextPoint(false)){
| ^
In file included from C:\Users\GV9492\Box Sync\Ardumower\Sunray-1.0.318\sunray\robot.h:26,
from C:\Users\GV9492\Box Sync\Ardumower\Sunray-1.0.318\sunray\LineTracker.cpp:8:
C:\Users\GV9492\Box Sync\Ardumower\Sunray-1.0.318\sunray\map.h:197:10: note: candidate: 'bool Map::nextPoint(bool, float, float)'
197 | bool nextPoint(bool sim,float stateX, float stateY);
| ^~~~~~~~~
C:\Users\GV9492\Box Sync\Ardumower\Sunray-1.0.318\sunray\map.h:197:10: note: candidate expects 3 arguments, 1 provided
exit status 1
no matching function for call to 'Map::nextPoint(bool)'
if (trackerDiffDelta < 0) { //MrTree set rotation direction and do not keep it :)
rotateLeft = true;
rotateRight = false;
} else {
rotateRight = true;
rotateLeft = false;
// allow rotations only near last or next waypoint or if too far away from path
// it might race between rotating mower and targetDist check below
// if we race we still have rotateLeft or rotateRight true
if ( (targetDist < 0.3) || (lastTargetDist < 0.3) || (fabs(distToPath) > 2.5) ||
rotateLeft || rotateRight ) {
if (SMOOTH_CURVES)
angleToTargetFits = (fabs(trackerDiffDelta) / PI * 180.0 < 120);
else
angleToTargetFits = (fabs(trackerDiffDelta) / PI * 180.0 < 20); //MrTree we have more than 20deg difference to point
} else {
// while tracking the mowing line do allow rotations if angle to target increases (e.g. due to gps jumps)
angleToTargetFits = (fabs(trackerDiffDelta)/PI*180.0 < 60);
// angleToTargetFits = true;
}
if ((!angleToTargetFits || !angleToTargetPrecise) && !dockTimer) { //MrTree added !dockTimer, !angleToTargetPrecise
// angular control (if angle to far away, rotate to next waypoint)
if (!angleToTargetFits) angleToTargetPrecise = false;
resetLinearMotionMeasurement(); //MrTree added function call from svol0
linear = 0; //MrTree while turning from >= 20/45 deg difference, linear is 0... still decelerating or accelerating on stepin/out
if (((maps.isDocking()) || (maps.isUndocking())) &&
((maps.trackSlow) && (trackslow_allowed))) {
angular = DOCKANGULARSPEED / 180.0 * PI; //MrTree use DOCKANGULARSPEED in config.h, added trackslowallowed : RTT=29deg/s=0.5 rad/s;
} else {
if (fabs(trackerDiffDelta)/PI*180.0 >= ANGLEDIFF1) angular = ROTATETOTARGETSPEED1 / 180.0 * PI; //MrTree set angular to fast defined in config.h
if (fabs(trackerDiffDelta)/PI*180.0 < ANGLEDIFF1) angular = ROTATETOTARGETSPEED2 / 180.0 * PI; //MrTree slow down turning when near desired angle
if (fabs(trackerDiffDelta)/PI*180.0 <= ANGLEDIFF2) angular = ROTATETOTARGETSPEED3 / 180.0 * PI; //MrTree slow down turning even more when almost at desired angle
}
if (trackerDiffDelta < 0) { //MrTree set rotation direction and do not keep it :)
rotateLeft = true;
rotateRight = false;
} else {
rotateRight = true;
rotateLeft = false;
}
if (rotateLeft) angular *= -1;
if (fabs(trackerDiffDelta)/PI*180.0 < ANGLEPRECISE){
rotateLeft = false; // reset rotate direction
rotateRight = false;
angleToTargetPrecise = true; //MrTree Step out of everything when angle is precise...
angular = 0;
}
if (fabs(CurrSpeed) >= 0.1) angular = 0; //MrTree reset angular if current speed is over given value (still deccelerating)
}
else {
// line control (stanley)