detachInterupt() from the inside of the interupt function?

UKHeliBob:
At the start of the ISR

if (weHaveDoneThisEnoughTimes)

{
  return;  //don't execute the code in the ISR
}

Dam, I was to fixed on the problem. This is much better.