The following codes are in function HAL_updateAdcBias().
// update the current bias
for(cnt=0;cnt<HAL_getNumCurrentSensors(handle);cnt++)
{
bias = HAL_getBias(handle,HAL_SensorType_Current,cnt);
bias += OFFSET_getOffset(obj->offsetHandle_I[cnt]);
HAL_setBias(handle,HAL_SensorType_Current,cnt,bias);
}
// update the voltage bias
for(cnt=0;cnt<HAL_getNumVoltageSensors(handle);cnt++)
{
bias = HAL_getBias(handle,HAL_SensorType_Voltage,cnt);
bias += OFFSET_getOffset(obj->offsetHandle_V[cnt]);
HAL_setBias(handle,HAL_SensorType_Voltage,cnt,bias);
}
What are the differences between bias and offset?
Besides, since motor currents are bipolar, the bias is well understood, but for voltage which has only single polar, why does voltage need bias?