
HC_Gain_scaled = (((HC_GAIN_HIGH - HC_GAIN_LOW) * pot_level)) >> 8; //Average and divide by 256

HC_Gain_scaled += HC_GAIN_LOW;