-
Notifications
You must be signed in to change notification settings - Fork 10
module_read_channels
Vladimir edited this page Feb 14, 2020
·
2 revisions
Relay relay = ...
int status = relay.ReadChannels();
The lower 8 bits reflect the status of the corresponding channels. For example, how to get state of channels #1 & #8:
int status = this.ReadChannels();
int channel = 1;
bool state1 = (status & (1 << (channel - 1))) != 0;
channel = 8;
bool state8 = (status & (1 << (channel - 1))) != 0;