Skip to content

Commit

Permalink
Implemented commands to control the on-board amplifier
Browse files Browse the repository at this point in the history
  • Loading branch information
wayoda committed Sep 13, 2015
1 parent 4f382ac commit dd057f1
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion rswt.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import serial
import struct

__version__ = '0.1.1'
__version__ = '0.1.2'
__author__ = 'Eberhard Fahle'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015 Eberhard Fahle'
Expand Down Expand Up @@ -386,6 +386,21 @@ def playing(self):
trackList.append(self._lsbToInt(tracks[i]))
return trackList

def amplifierOn(self):
"""Switch the on-board amplifier on.
"""
data=_WT_AMP_POWER
data[4]=0x01
self._wt.write(data)


def amplifierOff(self):
"""Switch the on-board amplifier off.
"""
data=_WT_AMP_POWER
data[4]=0x00
self._wt.write(data)

def _isValidTrackNumber(self,track):
"""Simple test for valid track numbers
"""
Expand Down

0 comments on commit dd057f1

Please sign in to comment.