No announcement yet.

ISwitchB Dissapearing

  • Filter
  • Time
  • Show
Clear All
new posts

  • ISwitchB Dissapearing

    I am using a GEN4 - ULCD- 50DCT-CLB display with Visi Genie and a Teensy 3.5 micro controller. On form 6 of my program I have three ISwitchB's (ISwitchB0, ISwitchB1, and IswitchB2) and one WinButton (WinButton19). The switches are configured to Report Message.

    When ISwitchB0 is switched to the ON position then back to the OFF position, ISwitchB1 partially disappears. If I touch the screen where ISwitchB1 is located the switch reappears but with most of the bezel removed. Moving the position of the switches does not change the behavior. The switches also are spaced far enough apart to not interfere with each other. The same behavior occurs when I try to use 4D slider buttons.

    ISwitchB0 switches a boolean variable which hides or displays two buttons on form 0. If I comment out the genie.WriteObject commands the problem resolves itself. Is there a way to correct this issue?

      if (Event.reportObject.object == GENIE_OBJ_ISWITCHB) {
        if (Event.reportObject.index == 0) {
          manualFlag = !manualFlag;
          if (manualFlag) {
            genie.WriteObject(GENIE_OBJ_4DBUTTON, 0, 0);
            genie.WriteObject(GENIE_OBJ_4DBUTTON, 1, 0);
          else {
            genie.WriteObject(GENIE_OBJ_4DBUTTON, 0, -1);
            genie.WriteObject(GENIE_OBJ_4DBUTTON, 1, -1);
    Thank you in advance for any help.

  • #2

    So the iSwitchB0 is hiding or displaying 2 4DButtons by the looks of it, but you are saying when you disable the 2x 4Dbuttons, the iSwitchB1 partially disappears, and not the 4Dbuttons?
    I assume you actually have the 4Dbuttons in your project? Just be 100% sure the objects you are writing to exist in your application. Do the buttons you tried to hide or show, actually hide or show? but the side effect is also the iSwitchB1 also partially disappears?

    Can you maybe share more of your project, both the Teensy side and the WS4 side? If you don't want to share it public you can raise a Ticket on our website and submit it that way.

    Just a bit hard to get the full context with the snippet of code you have provided.



    • #3
      Good Morning James,

      I do not mind showing the code but it sits at over 1500 lines at this point. Your are correct in that the toggle of ISwitchB0 is supposed to disable/ hide the two 4D buttons on the main screen. It works but it also causes ISwitchB1 to partially disappear as well. I have also noted that by simply touching the ISwitchB0 (as opposed to sliding it) will cause my boolean value to change despite the switch not changing position from "off" to "on". I'll go ahead and submit a ticket with the project codes. Thank you.