Make sure the average energy doesn't end up smaller than the minimum energy
Due to the inaccuracy of the fixed point calculations used, the
result of avgEn * (1 / ahCnt) could end up slightly below the
intended value since (1 / ahCnt) is rounded down (and not
calculated exactly). For a case of avgEn = 36 and ahCnt = 18,
the result was 0 even though it should have been 2.