Now that we have created our Settings Pages, we need to set up Calculation Events for Brightness when the display is in Day Mode and for when the display is in Night Mode.
Set up Calculation Events for Brightness when the display is in Day Mode.
In the Programming Tab, search for Brightness
Select Brightness.Day
Add a Calculation Event
Name it: CE Brightness.Day+5
Enter the expression
IF(Day_Night=1 , MIN(Brightness_Day+5,100),Brightness_Day)
Add another Calculation Event
Name it: CE Brightness.Day-5
Enter the expression
IF(Day_Night=1 , MAX(Brightness_Day-5,0),Brightness_Day)
Set up Calculation Events for Brightness when the display is in Night Mode.
In the Programming Tab, search for Brightness
Select Brightness.Night
Add a Calculation Event
Name it: CE Brightness.Night+5
Enter the expression
IF(Day_Night=2 , MIN(Brightness_Night+5,100),Brightness_Night)
Add another Calculation Event
Name it: CE Brightness.Night-5
Enter the expression
IF(Day_Night=2 , MAX(Brightness_Night-5,0),Brightness_Night)
Now we need to create User Events to be able to increase and decrease Brightness.
UE Brightness Up 5
In the Programming Tab click the +
Select New User Event
Name it: UE Set Brightness Up5
In the Actions tab click the +
Select Central Control Module > Fire Event > CE Brightness.Day+5
Click OK
In the Actions tab click the +
Select Central Control Module > Fire Event > CE Brightness.Night+5
Click OK
In the Actions tab click the +
Select System Manager > Update Backlight > (Empty)
Click OK
UE Brightness Dn 5
In the Programming Tab click the +
Select New User Event
Name it: UE Set Brightness Dn5
In the Actions tab click the +
Select Central Control Module > Fire Event > CE Brightness.Day-5
Click OK
In the Actions tab click the +
Select Central Control Module > Fire Event > CE Brightness.Night-5
Click OK
In the Actions tab click the +
Select System Manager > Update Backlight > (Empty)
Click OK
Now we can fire events to inc/dec brightness values by calling UE Set Brightness Up 5 and
UE Set Brightness Dn 5.
Go back to the Page Designer Tab and select the Settings Layer
In the Default Settings View_Brightness, for the left and right arrows, assign touch actions to fire the events UE Set Brightness Dn5 and UE Set Brightness Up5 that we just created