In circle OS 1.7 the battery display never change, even a few seconds before shut down.
In fact Vbatt function does not report VBatt but the value at AD input wich is 1/2 Vbatt.
that is about 1500mV.
In the display function, 2000 is substracted from Vbatt, so result give a negative number wich is stored in an unsigned var.
so the next test ( >20 ) is always true and displayed is always 20, so full battery.
in draw.c
 BatState = UTIL_GetBat();
 ...
      widthBat    = ( 2 * ( BatState - 2000 ) ) / 70 ;
      if( widthBat > 20 )         {         widthBat = 20;         }
Fixed in V2.0 ?
					Last edited by jacques (2008-09-10 13:33:03)