src/c/main.c
void display_static(){
  // The current time text will be stored in the following 3 strings
  char textLine1[BUFFER_SIZE];
  char textLine2[BUFFER_SIZE];
  char textLine3[BUFFER_SIZE];
  int LineToPutinBold=0;
  // Language settings
  writetimeto3words(mast_hour, mast_min, &LineToPutinBold, textLine1, textLine2, textLine3,settings.LangKey);
   // Set Up and Down animations
  int LBef=strlen(textbefore3);
  int Lnow=strlen(textLine3);
  // Animations
  if (AtInit){
    if (Lnow==0){
      makePopDown();
    }    
  }
  else if(LBef>0 && Lnow==0 ){
    makePopDown();    
  }
  else if(LBef==0 && Lnow > 0 ){
    makePopUp();   
  }
  AtInit=false;
  //Update lines
  if (checkupdate(textbefore1,textLine1)) {
    updateLineStatic(&line1, line1Str, textLine1,1,LineToPutinBold);
  }
  if (checkupdate(textbefore2,textLine2)) {
    updateLineStatic(&line2, line2Str, textLine2,2,LineToPutinBold);
  }
  if (checkupdate(textbefore3,textLine3)) {
    updateLineStatic(&line3, line3Str, textLine3,3,LineToPutinBold);
  }
    // Save
  strcpy(textbefore1, textLine1);
  strcpy(textbefore2, textLine2);
  strcpy(textbefore3, textLine3);
}
////End: Layer formatting//
///// Init: Updating time and date////
// Update screen based on new time
Layer formatting
Init: Updating time and date
Update screen based on new time
Layer formatting Init : Updating time and date Update screen based on new time
void display_static(){
  char textLine1[BUFFER_SIZE];
  char textLine2[BUFFER_SIZE];
  char textLine3[BUFFER_SIZE];
  int LineToPutinBold=0;
  writetimeto3words(mast_hour, mast_min, &LineToPutinBold, textLine1, textLine2, textLine3,settings.LangKey);
  int LBef=strlen(textbefore3);
  int Lnow=strlen(textLine3);
  if (AtInit){
    if (Lnow==0){
      makePopDown();
    }    
  }
  else if(LBef>0 && Lnow==0 ){
    makePopDown();    
  }
  else if(LBef==0 && Lnow > 0 ){
    makePopUp();   
  }
  AtInit=false;
  if (checkupdate(textbefore1,textLine1)) {
    updateLineStatic(&line1, line1Str, textLine1,1,LineToPutinBold);
  }
  if (checkupdate(textbefore2,textLine2)) {
    updateLineStatic(&line2, line2Str, textLine2,2,LineToPutinBold);
  }
  if (checkupdate(textbefore3,textLine3)) {
    updateLineStatic(&line3, line3Str, textLine3,3,LineToPutinBold);
  }
  strcpy(textbefore1, textLine1);
  strcpy(textbefore2, textLine2);
  strcpy(textbefore3, textLine3);
}
void display_static ( ) { char textLine1 [ BUFFER_SIZE ] ; char textLine2 [ BUFFER_SIZE ] ; char textLine3 [ BUFFER_SIZE ] ; int LineToPutinBold = 0 ; writetimeto3words ( mast_hour , mast_min , & LineToPutinBold , textLine1 , textLine2 , textLine3 , settings . LangKey ) ; int LBef = strlen ( textbefore3 ) ; int Lnow = strlen ( textLine3 ) ; if ( AtInit ) { if ( Lnow == 0 ) { makePopDown ( ) ; } } else if ( LBef > 0 && Lnow == 0 ) { makePopDown ( ) ; } else if ( LBef == 0 && Lnow > 0 ) { makePopUp ( ) ; } AtInit = false ; if ( checkupdate ( textbefore1 , textLine1 ) ) { updateLineStatic ( & line1 , line1Str , textLine1 , 1 , LineToPutinBold ) ; } if ( checkupdate ( textbefore2 , textLine2 ) ) { updateLineStatic ( & line2 , line2Str , textLine2 , 2 , LineToPutinBold ) ; } if ( checkupdate ( textbefore3 , textLine3 ) ) { updateLineStatic ( & line3 , line3Str , textLine3 , 3 , LineToPutinBold ) ; } strcpy ( textbefore1 , textLine1 ) ; strcpy ( textbefore2 , textLine2 ) ; strcpy ( textbefore3 , textLine3 ) ; }
End: Layer formatting
Init: Updating time and date
Update screen based on new time
End : Layer formatting Init : Updating time and date Update screen based on new time
// The current time text will be stored in the following 3 strings // Language settings // Set Up and Down animations // Animations //Update lines // Save