Beispiel #1
0
void Menu_Init(void)
{
  Disp_Init();                //display init
  Port_Init();                //port init
  Keyboard_Init();            //keyboard init
#ifdef LCD1602
  Meter_Init();               //level meter init
#endif

  if(ESignature != SIGNATURE) //check EEPROM signature, if error, init params:
  {
    for(char i = 0; i < PARAMS; i++)
      Par[i] = ParLim[i][P_NOM];
    ParToEEPROM();                        //params init
    for(char i = 0; i < MODES; i++)
      EScale[i] = SCALE_NOM + AUTO_SCALE; //scales init
  }
  else
  {
    for(char i = 0; i < PARAMS; i++)
      Par[i] = EPar[i];                   //read params from EEPROM
  }
  SetupCounter();
  Count_Start();              //start counter

  DispMenu = MNU_NO;          //no menu
  Hold = 0;                   //no hold mode
  Hide = 0;                   //display not hided
  Menu = MNU_SPLASH;          //go to splash screen menu
}
Beispiel #2
0
static BOOL Meter_OnCreate(HWND hWindow, LPCREATESTRUCT lpCreateStruct)
/***********************************************************************/
{
    LPMETERCONTINFO lpInfo;
    if ( (lpInfo = (LPMETERCONTINFO)AllocX(sizeof(METERCONTINFO), GMEM_ZEROINIT|GMEM_SHARE) ))
    {
        Meter_Init(lpInfo);
        Meter_UpdateText(hWindow, lpInfo);
        SetWindowLong(hWindow, GWL_DATAPTR, (long)lpInfo);
    }
    else
        return FALSE;

    return TRUE;
}