morrolinux / mpradio

Morrolinux's Pirate radio (PiFmRDS / PiFmAdv implementation with Bluetooth and mp3 support) - Stream music to your car's FM radio or use it as a Bluetooth speaker via headphone jack
GNU General Public License v3.0
108 stars 17 forks source link

Fixed default frequency last digit drop in settings_provider.cc #6

Closed andrewmzhang closed 7 years ago

andrewmzhang commented 7 years ago

(Not sure if I'm doing this right... no idea of github etiquette) but I have a patch for the issue where when the pirateradio uses the DEFAULTFREQ, 88.8, it doesn't cut off the last 8. Essentially I just padded the result string with a piece of whitespace when using DEFAULTFREQ. That way in getsettings(), the erase line will just delete the whitespace, retaining DEFAULTFREQ properly.

andrewmzhang commented 7 years ago

Hi actually I would like to point out my solution did work (I tested it with and without a config file) it added a whitespace if and only if no configuration file was presented. But I see you fixed it anyways, so good job!