added periodic recalibration code
fixed silly syntax error...
Beta version of auto-calibration code

Several adjustments since first commit on this topic.  Still needs
testing.
Merge branch 'calib' into dev

Much of this has been tested, so I'm merging into dev.  But, the new
function to restart measurements is untested.