"Without any change in the code the docking work, because certainly the charging contact is here before the bumper."
Thats cool. But maybe try to use hardstop instead of MotorStopFast in mseqDockingStation. Then the mower stops a little faster while hitting the station. My mower must drive a little bit further, if it hits the contacts.
The forward backward was only for my contacs that they better set. But if this works for you - very well.
"I want to understand where and how you stop the charging, i view that it's in the onterminate on the BHT CHARGING but how you start this onterminate. "
At the moment not automatically because I want first test the stability of the software.
You can switch to manual mode.
OR:
Use areaX command, but then the mower drives in the charging station.
Look in UI where the function for this command is.
The userinterface has three or four parts
a) void cmd_help function, where the help text stands.
here you find the line errorHandler.setInfoNoLog(F("area,12 //drive 12m at perimeter and begin mowingrn"));
Now search for area
b) You will find in the bottom of the file
cmdAdd((char *)"area", cmd_cntrGotoAreaX);
Here the commandhandler initialized, that if he gets an command area, it should call the function cmd_cntrGotoAreaX;
No search for cmd_cntrGotoAreaX;
c) And you find the funktion:
void cmd_cntrGotoAreaX(int arg_cnt, char **args)
{
myBehaviour.reset();
long distance = cmdStr2Num(args[1], 10);
myBlackboard.setBehaviour(BH_GOTOAREA);
_controlManuel = false;
//must set after set behaviour, because behaviour resets the BB
myBlackboard.areaTargetDistanceInMeter = distance;
errorHandler.setInfoNoLog(F("Drive to area: %lrn"), distance);
}
d) Only when a showing command is used
void cmd_hideShowing(int arg_cnt, char **args)
this function wil be called when the command h is entered. This disables all showingflags for services and blackboard.
You can start to mow while driving back 1m and rotate 90 degrees.
Or you can drive back rotate 80 degree and driver a curve around the chargingstation. (This should be realised as extra behaviour in BHRoot)
When the perimeter is found, change the behavioiur to goto areaX.
When you are finished this kind of solution, then you understand the programming of the BHT
But in this case, first draw the tree. If you don't want to buy the software, use UMLET. In the past I wanted to transfere the BHT to UMLET that everyone can change it. But no time at the moment.
UMLET is very easy to use.