Exemplo n.º 1
0
 public void setVolumeDown(Config params) {
   boolean executed =
       executeCommand(
           "set volume down",
           params); // executes the developer level command associated with 'set channel' action
   if (executed) {
     if (volume.getValue() != volume.getMin()) {
       volume.setValue(volume.getValue() - 1);
       // TODO: set the TV graphical representation
       // setView(1); //points to the second element in the XML views array (light on image)
       setChanged(true);
     }
   }
 }
Exemplo n.º 2
0
 public void setChannelDown(Config params) {
   boolean executed =
       executeCommand(
           "set channel down",
           params); // executes the developer level command associated with 'set channel' action
   if (executed) {
     if (channel.getValue() != channel.getMin()) {
       channel.setValue(channel.getValue() - 1);
       powered.setValue(
           true); // select a channel turn on the tv automatically. This is for coherence.
       // TODO: set the TV graphical representation
       // setView(1); //points to the second element in the XML views array (light on image)
       setChanged(true);
     }
   }
 }