I have a method linked to a Switch that should be opening and closing
outputs based on a looper class I have created. Here is that method.
digitalIOModeSwitchArray[0]
.setOnCheckedChangeListener(new OnCheckedChangeListener() {
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {
if (isChecked
&& (((MainActivity) getActivity())
.globalLooperRetriever()
.getIOIOBoardInstance().getState() != null)) {
((MainActivity) getActivity())
.globalLooperRetriever()
.closeDigitalInputEXTEND(0);
((MainActivity) getActivity())
.globalLooperRetriever()
.openDigitalOutputEXTEND(0);
} else if (!isChecked
&& (((MainActivity) getActivity())
.globalLooperRetriever()
.getIOIOBoardInstance().getState() != null)) {
((MainActivity) getActivity())
.globalLooperRetriever()
.closeDigitalOutputEXTEND(0);
((MainActivity) getActivity())
.globalLooperRetriever()
.openDigitalInputEXTEND(0);
}
}
});
This should close an input and reopen it as an output or vice versa
depending on if the switch was turned on or off but does not seem to do
such a thing...
--
You received this message because you are subscribed to the Google Groups
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/groups/opt_out.