MDM166AA: Clock and Clear adjustments.
authorStephaneLenclud
Tue, 10 Feb 2015 15:38:27 +0100
changeset 34892f755c2612
parent 33 fc42477ae80b
child 35 638eb0763e20
MDM166AA: Clock and Clear adjustments.
FutabaMDM166AA.cpp
     1.1 --- a/FutabaMDM166AA.cpp	Mon Feb 09 20:04:47 2015 +0100
     1.2 +++ b/FutabaMDM166AA.cpp	Tue Feb 10 15:38:27 2015 +0100
     1.3 @@ -134,11 +134,12 @@
     1.4  		SendCommandReset();
     1.5  		
     1.6  		//We will need accurate clock data
     1.7 -		iNeedAccurateClockData=true;
     1.8 +		//iNeedAccurateClockData=true;
     1.9  		//Until we get it just use rough time instead
    1.10 -		//We don't set clock data here as it turns on clock display too and cause an unpleasant clock flash
    1.11 -		//Only side effect from not doing this here is that for at most one minute the first time you cold boot your display the time should be wrong.
    1.12 -		//SetClockData();
    1.13 +		//This is needed otherwise the clock won't work for the first minute.
    1.14 +		//It flashes the clock when opening the display but that's no big deal.
    1.15 +		ShowClock();
    1.16 +		SetClockData();
    1.17  
    1.18  		//Turns mast ON
    1.19  		//SetIconNetwork(0,EIconOn);
    1.20 @@ -188,7 +189,7 @@
    1.21      {
    1.22  	//That one also clear the symbols
    1.23      SetAllPixels(0x00);
    1.24 -	SendCommandClear(); //Clear icons too
    1.25 +	//SendCommandClear(); //Clear icons too
    1.26      }
    1.27  
    1.28  /**
    1.29 @@ -436,8 +437,8 @@
    1.30  */
    1.31  void MDM166AA::HideClock()
    1.32  	{
    1.33 -	//TODO: or reset
    1.34 -	Clear();
    1.35 +	SetAllPixels(0x00);
    1.36 +	SwapBuffers();
    1.37  	}
    1.38  
    1.39  /**
    1.40 @@ -710,6 +711,8 @@
    1.41  Address Counter is set by 00H.
    1.42  Dimming is set to 50%.
    1.43  Turn off all icons segments.
    1.44 +
    1.45 +This does not reset our clock settings.
    1.46  */
    1.47  void MDM166AA::SendCommandReset()
    1.48  	{