Added comment

This commit is contained in:
Nathan Kellenicki 2020-02-24 21:44:57 -08:00
parent 28fd0b5578
commit 7b0d981327

View File

@ -28,6 +28,12 @@ export class DuploTrainBaseSpeaker extends Device {
}); });
} }
/**
* Play a built-in system tone.
* @method DuploTrainBaseSpeaker#playTone
* @param {number} tone
* @returns {Promise} Resolved upon successful issuance of the command.
*/
public playTone (tone: number) { public playTone (tone: number) {
this.subscribe(Mode.TONE); this.subscribe(Mode.TONE);
this.writeDirect(0x02, Buffer.from([tone])); this.writeDirect(0x02, Buffer.from([tone]));