powerstatus, chargestatus events and commands
Hi there,
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #31595d}
span.s1 {font-variant-ligatures: no-common-ligatures; color: #000000}
span.s2 {font-variant-ligatures: no-common-ligatures; color: #4f8187}
span.s3 {font-variant-ligatures: no-common-ligatures}
span.s4 {font-variant-ligatures: no-common-ligatures; color: #703daa}
span.s5 {font-variant-ligatures: no-common-ligatures; color: #3e1e81}
span.s6 {font-variant-ligatures: no-common-ligatures; color: #272ad8}
How would I go about determining the status of the powerstatus or chargestatus events when using programCommandsToRunOnEventAsync? For example to achieve something like the following, to either turn the led on, or have different colors
[_device.settings.powerStatus programCommandsToRunOnEventAsync:^{
if (power status is 1)
[_device.led setLEDColorAsync:[UIColor greenColor] withIntensity:1.0];
else
[_device.led setLEDColorAsync:[UIColor redColor] withIntensity:1.0];
}];
It would seem as though there should be a readPowerStatusAsync somewhere, but it seems to be missing, or is there another way to determine the status inside the event?
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #31595d}
span.s1 {font-variant-ligatures: no-common-ligatures; color: #000000}
span.s2 {font-variant-ligatures: no-common-ligatures; color: #4f8187}
span.s3 {font-variant-ligatures: no-common-ligatures}
span.s4 {font-variant-ligatures: no-common-ligatures; color: #703daa}
span.s5 {font-variant-ligatures: no-common-ligatures; color: #3e1e81}
span.s6 {font-variant-ligatures: no-common-ligatures; color: #272ad8}
This discussion has been closed.
Comments