Dear All,
I would like to know if it is possible to mix different Q formats with the if statements, for example:
#define VPV_MIN _IQ7(15.0)
Gui_Vpv = _IQ20mpy(pv_meas_vol_avg>>4,_IQ20(PV_VOL_SENSE_MAX));
if(Gui_Vpv > VPV_MIN)
{
}
When i run that code, I always get a true condition in the if statement. I got that fixed by giving to VPV_MIN the same Q format of Gui_Vpv, so the question is, Can I use different Q Formats with the if()? If I can, Is there a bug with the IQmath library?
Thank you
Diego