/*********************************************************************
*                     SEGGER Microcontroller GmbH                    *
*        Solutions for real time microcontroller applications        *
**********************************************************************
*                                                                    *
*        (c) 1996 - 2022  SEGGER Microcontroller GmbH                *
*                                                                    *
*        Internet: www.segger.com    Support:  support@segger.com    *
*                                                                    *
**********************************************************************
----------------------------------------------------------------------
File        : ID_SCREEN_BUC_SYS_Slots.c
Purpose     : AppWizard managed file, function content could be changed
---------------------------END-OF-HEADER------------------------------
*/

#include "Application.h"
#include "../Generated/Resource.h"
#include "../Generated/ID_SCREEN_BUC_SYS.h"

/*** Begin of user code area ***/
/*** End of user code area ***/

/*********************************************************************
*
*       Public code
*
**********************************************************************
*/
/*********************************************************************
*
*       cbID_SCREEN_BUC_SYS
*/
void cbID_SCREEN_BUC_SYS(WM_MESSAGE * pMsg) {
  GUI_USE_PARA(pMsg);
}

/*********************************************************************
*
*       ID_SCREEN_BUC_SYS__APPW_NOTIFICATION_INITDIALOG
*/
void ID_SCREEN_BUC_SYS__APPW_NOTIFICATION_INITDIALOG(APPW_ACTION_ITEM * pAction, WM_HWIN hScreen, WM_MESSAGE * pMsg, int * pResult) {
  GUI_USE_PARA(pAction);
  GUI_USE_PARA(hScreen);
  GUI_USE_PARA(pMsg);
  GUI_USE_PARA(pResult);
}

/*********************************************************************
*
*       ID_SCREEN_BUC_SYS__APPW_NOTIFICATION_MOTION
*/
void ID_SCREEN_BUC_SYS__APPW_NOTIFICATION_MOTION(APPW_ACTION_ITEM * pAction, WM_HWIN hScreen, WM_MESSAGE * pMsg, int * pResult) {
				if(BUC_Sys_Self_Master_Flag==0 && Parameter_UDP_Pkt_from_BUC_Received==1)
				{
					APPW_SetValue(ID_SCREEN_BUC_SYS, ID_SLIDER_MASTER_ENABLE_DISABLE, udp_Self_Master_Enable_Disable_Status);
				}
  GUI_USE_PARA(pAction);
  GUI_USE_PARA(hScreen);
  GUI_USE_PARA(pMsg);
  GUI_USE_PARA(pResult);
}

/*********************************************************************
*
*       ID_SCREEN_BUC_SYS__ID_SLIDER_MASTER_ENABLE_DISABLE__WM_NOTIFICATION_VALUE_CHANGED__ID_SLIDER_MASTER_ENABLE_DISABLE__APPW_JOB_SETVALUE
*/
void ID_SCREEN_BUC_SYS__ID_SLIDER_MASTER_ENABLE_DISABLE__WM_NOTIFICATION_VALUE_CHANGED__ID_SLIDER_MASTER_ENABLE_DISABLE__APPW_JOB_SETVALUE(APPW_ACTION_ITEM * pAction, WM_HWIN hScreen, WM_MESSAGE * pMsg, int * pResult) {

	BUC_Sys_Self_Master_Flag=1;
	BUC_Sys_Self_Master_Value_counter = APPW_GetValue(ID_SCREEN_BUC_SYS, ID_SLIDER_MASTER_ENABLE_DISABLE, NULL);
	//PRINTF("\n\r BUC_Sys_Self_Master_Value_counter =%d",BUC_Sys_Self_Master_Value_counter);
  GUI_USE_PARA(pAction);
  GUI_USE_PARA(hScreen);
  GUI_USE_PARA(pMsg);
  GUI_USE_PARA(pResult);
}

/*********************************************************************
*
*       ID_SCREEN_BUC_SYS__ID_BUTTON_BUC_REBOOT__WM_NOTIFICATION_CLICKED
*/
void ID_SCREEN_BUC_SYS__ID_BUTTON_BUC_REBOOT__WM_NOTIFICATION_CLICKED(APPW_ACTION_ITEM * pAction, WM_HWIN hScreen, WM_MESSAGE * pMsg, int * pResult) {
	BUC_Sys_Reboot_Flag=1;
	BUC_Sys_Reboot_Value=1;
  GUI_USE_PARA(pAction);
  GUI_USE_PARA(hScreen);
  GUI_USE_PARA(pMsg);
  GUI_USE_PARA(pResult);
}

/*********************************************************************
*
*       ID_SCREEN_BUC_SYS__ID_BUTTON_REFRESH_SYSTEM__WM_NOTIFICATION_CLICKED
*/
void ID_SCREEN_BUC_SYS__ID_BUTTON_REFRESH_SYSTEM__WM_NOTIFICATION_CLICKED(APPW_ACTION_ITEM * pAction, WM_HWIN hScreen, WM_MESSAGE * pMsg, int * pResult) {

	if(BUC_Sys_Self_Master_Flag==0 && Parameter_UDP_Pkt_from_BUC_Received==1)
	{
		APPW_SetValue(ID_SCREEN_BUC_SYS, ID_SLIDER_MASTER_ENABLE_DISABLE, udp_Self_Master_Enable_Disable_Status);
	}

  GUI_USE_PARA(pAction);
  GUI_USE_PARA(hScreen);
  GUI_USE_PARA(pMsg);
  GUI_USE_PARA(pResult);
}

/*********************************************************************
*
*       ID_SCREEN_BUC_SYS__ID_BUTTON_BACK_BUC_SYS__WM_NOTIFICATION_CLICKED
*/
void ID_SCREEN_BUC_SYS__ID_BUTTON_BACK_BUC_SYS__WM_NOTIFICATION_CLICKED(APPW_ACTION_ITEM * pAction, WM_HWIN hScreen, WM_MESSAGE * pMsg, int * pResult) {
  GUI_USE_PARA(pAction);
  GUI_USE_PARA(hScreen);
  GUI_USE_PARA(pMsg);
  GUI_USE_PARA(pResult);
}

/*********************************************************************
*
*       ID_SCREEN_BUC_SYS__ID_BUTTON_HOME_SYS__WM_NOTIFICATION_CLICKED
*/
void ID_SCREEN_BUC_SYS__ID_BUTTON_HOME_SYS__WM_NOTIFICATION_CLICKED(APPW_ACTION_ITEM * pAction, WM_HWIN hScreen, WM_MESSAGE * pMsg, int * pResult) {
  GUI_USE_PARA(pAction);
  GUI_USE_PARA(hScreen);
  GUI_USE_PARA(pMsg);
  GUI_USE_PARA(pResult);
}

/*************************** End of file ****************************/
