       set_switch_config(gt_io ? 0b0000110000 : 0b0000001111);
     }
 
-    gt_out(GT_ALL, gt);
+    if(gt_io)
+    {
+      gt_out(GT_ALL, gt);
+    }
+    else
+    {
+      if(gt_read(GT1))
+      {
+        gt_state |= 1U;
+      }
+      else
+      {
+        gt_state &= ~1U;
+      }
+      if(gt_read(GT2))
+      {
+        gt_state |= 2U;
+      }
+      else
+      {
+        gt_state &= ~2U;
+      }
+    }
   }
 
  private:

  function = new DU_Test_Function();
  interface = new DU_Test_Interface();

  calibration_value = 0;
  gt = false;
  gt_io = false;

    }
    else if(b == DUINO_Encoder::Held)
    {
      gt = true;
    }
    else if(b == DUINO_Encoder::Released)
    {
      gt = false;
    }

    // handle encoder spin
