From dd057f155834efbc8182ef8bd69925a98e5f4878 Mon Sep 17 00:00:00 2001 From: wayoda Date: Sun, 13 Sep 2015 15:42:00 +0200 Subject: [PATCH] Implemented commands to control the on-board amplifier --- rswt.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/rswt.py b/rswt.py index caecd50..31f3dfe 100644 --- a/rswt.py +++ b/rswt.py @@ -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' @@ -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 """