Overview: Before working with System Services, instantiate a SystemServiceClient in the base class, add it to the .AddClients(x,x,x) parameters, and pass it to any classes/methods that may need it. Syntax examples are based on an instantiated SystemServiceClient object named "mySystemServiceClient". This information is an explanation of C# hardware analog and digital IO calls on the OpenPV® S50 & S70. It is only intended to provide examples of the syntax used to access IO ports on OpenPV® targets. |
SetBrightness :
The SetBrightness method is a function of the SystemServiceClient and requires a BrightnessInfo object with one field, Percentage, which is an integer from 0 (black screen) to 100 (full bright).
To set the percentage of brightness directly in the SetBrightness call, a new BrightnessInfo object can be created and initialized within the argument:
mySystemServiceClient.SetBrightness(new BrightnessInfo() { Percentage = 90);
BrightnessInfo:
An example of creating a BrightnessInfo object (myBrightnessInfo) and initializing its Percentage, assigning a different value to the Percentage, and using myBrightnessInfo as the argument to set the display brightness is:
BrightnessInfo myBrightnessInfo = new BrightnessInfo() { Percentage = 50 };
myBrightnessInfo.Percentage = 100;
mySystemServiceClient.SetBrightness(myBrightnessInfo);
Comments
0 comments
Please sign in to leave a comment.