Harvesting machine capable of automatic adjustment