Passing in max distance parameter for ping object.

distance is in cm.