In ecpiww.c in Log2File() on line:
sprintf(param, "./add2vz.sh %d %ld ", meterindex+1, (long int)metervalue*1000);
It typecasts metervalue before the scaling is done. A value of 140.1 is typecast to long int 140, and only then scaled to become 140000. but it should be 140100.
Fix this by scaling first then typecasting:
sprintf(param, "./add2vz.sh %d %ld ", meterindex+1, (long int)(metervalue*1000));
In
ecpiww.cinLog2File()on line:It typecasts
metervaluebefore the scaling is done. A value of 140.1 is typecast tolong int140, and only then scaled to become 140000. but it should be 140100.Fix this by scaling first then typecasting: