Ejemplo n.º 1
0
    def disarmTrackCB(self, msg):
        """Called when a /live/disarm message is received.

        Messages:
        /live/disarm     (int track)   Disarms track number track
        """
        if len(msg) == 3:
            track = msg[2]
            LiveUtils.disarmTrack(track)
Ejemplo n.º 2
0
    def armTrackCB(self, msg, source):
        """Called when a /live/arm message is received.

        Messages:
        /live/arm     (int track)   (int armed/disarmed)     Arms track number track
        """
        track = msg[2]
        
        if len(msg) == 4:
            if msg[3] == 1:
                LiveUtils.armTrack(track)
            else:
                LiveUtils.disarmTrack(track)
        # Return arm status        
        elif len(msg) == 3:
            status = LiveUtils.getTrack(track).arm
            self.oscEndpoint.send("/live/arm", (track, int(status)))     
Ejemplo n.º 3
0
    def armTrackCB(self, msg, source):
        """Called when a /live/arm message is received.

        Messages:
        /live/arm     (int track)   (int armed/disarmed)     Arms track number track
        """
        track = msg[2]

        if len(msg) == 4:
            if msg[3] == 1:
                LiveUtils.armTrack(track)
            else:
                LiveUtils.disarmTrack(track)
        # Return arm status
        elif len(msg) == 3:
            status = LiveUtils.getTrack(track).arm
            self.oscEndpoint.send("/live/arm", (track, int(status)))