Bugfix: Working on SDR RX
This commit is contained in:
12
bot.py
12
bot.py
@@ -32,7 +32,7 @@ class Bot(commands.Bot):
|
||||
# Init radio parameters
|
||||
self.profile_name = None
|
||||
self.freq = "104700000"
|
||||
self.mode = "wbfm"
|
||||
self.mode = "wfm"
|
||||
self.squelch = 0
|
||||
|
||||
# Init SDR Variables
|
||||
@@ -105,13 +105,13 @@ class Bot(commands.Bot):
|
||||
# Stop the SDR so it can cool off
|
||||
self.stop_sdr()
|
||||
|
||||
@self.command(name='chfreq', help="Use this command to change the frequency the bot is listening to. Note: 'M'"
|
||||
"is required\nExample command: '@ chfreq wbfm 104.7M\n"
|
||||
"Example command: '@ chfreq fm 154.785M",
|
||||
@self.command(name='chfreq', help="Use this command to change the frequency the bot is listening to. "
|
||||
"\nExample command: '@ chfreq wfm 104700000\n"
|
||||
"Example command: '@ chfreq fm 154785000",
|
||||
brief="Changes radio frequency")
|
||||
async def chfreq(ctx, mode: str, freq: str, member: discord.Member = None):
|
||||
# Possible band-types that can be used
|
||||
possible_modes = ['wbfm', 'fm']
|
||||
possible_modes = ['wfm', 'fm']
|
||||
member = member or ctx.author.display_name
|
||||
|
||||
# Check to make sure the frequency input matches the syntax needed
|
||||
@@ -245,7 +245,7 @@ class Bot(commands.Bot):
|
||||
print(f"Starting freq: {self.freq}")
|
||||
|
||||
# Set the settings in GQRX
|
||||
self.GQRXHandler.set_all_settings(str(self.mode), str(self.squelch), str(self.freq))
|
||||
self.GQRXHandler.set_all_settings(self.mode, self.squelch, self.freq)
|
||||
|
||||
# Set the started variable for later checks
|
||||
self.sdr_started = True
|
||||
|
||||
Reference in New Issue
Block a user