ozdemirburak / morse-code-translator

Translate text to Morse code and vice versa, with the option to play Morse code audio.
https://morsecodetranslator.com
MIT License
216 stars 57 forks source link

Add support for Farnsworth speed #15

Closed stidges closed 4 years ago

stidges commented 4 years ago

This PR adds support for the Farnsworth speed, which controls the speed at which intercharacter and interword gaps are sent. This isn't a breaking change because it falls back to the options.unit if it's not specified. As the WPM unit isn't calculated in this library, I've also not included the FWPM calculation either.

Additionally, it fixes incorrect spacing between words. Right now, the library produces 13 dots of silence (intercharacter + interword + intercharacter) between words, instead of the expected 7.

ozdemirburak commented 4 years ago

Looks perfect @stidges. Thanks for the fix.