#define GLOBALS_VARIABLE
#include "../App_Headers/includes.h"  
#include "../Library/TimeCtrl.h"
#include "../Library/FT_VehSpeedCalc.h"


void main(void) {
  unsigned char i;

  step_cycle = 0;
  Api_Sys_Init();
  App_State_Init();
  App_Load_Data();
  Format_CAN_Msg();
  APP_Test_Init();
  InitTimeCtrl();
  //SetWheelInfo(309,68);
  //CurVehSpeed = 0;

  for(i = 0; i < TimeSNMax; i++){
      EnableTimeCtrl(i);
  }

  //Api_SetTimer0(100,(ClockType *)&Clock);
  for(;;) {
      pSTB = 0;
            
      __RESET_WATCHDOG();

      Timer_2ms_Task();
      //Timer_10ms_Task();
      
      APP_Button_Proc();
      APP_ICM_Proc();  
      
      App_Can_Proc();
      Api_LCD_Display();
  } 
}
