The general logic seems correct. However, the actual IOIO code seems to be
buried under your abstraction layers, so I can't verify beyond that.
As usual, I recommend you to start with a simple toy example to convince
yourself that you understand the IOIO behavior. Then you can start wrapping
things with arbitrarily complicated logic.


On Mon, Mar 3, 2014 at 11:15 AM, Tim Frisch <[email protected]> wrote:

> 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.
>

-- 
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.

Reply via email to