This commit is contained in:
SpudGunMan
2024-07-31 19:24:44 -07:00
parent 2fc46dba21
commit 4ef939d43c
4 changed files with 55 additions and 13 deletions

View File

@@ -104,7 +104,15 @@ A module allowing a Hamlib compatable radio to connect to the bot, when functipo
[radioMon]
enabled = False
rigControlServerAddress = localhost:4532
# channel to brodcast to can be 2,3
sigWatchBrodcastCh = 2
# minimum SNR as reported by radio via hamlib
signalDetectionThreshold = -10
# hold time for high SNR
signalHoldTime = 10
# the following are combined to reset the monitor
signalCooldown = 5
signalCycleLimit = 5
```
# requirements
can also be installed with `pip install -r requirements.txt`

View File

@@ -74,4 +74,12 @@ repeater_channels =
# using Hamlib rig control will monitor and alert on channel use
enabled = False
rigControlServerAddress = localhost:4532
# brodcast to all nodes on the channel can alsp be = 2,3
sigWatchBrodcastCh = 2
# minimum SNR as reported by radio via hamlib
signalDetectionThreshold = -10
# hold time for high SNR
signalHoldTime = 10
# the following are combined to reset the monitor
signalCooldown = 5
signalCycleLimit = 5

View File

@@ -323,7 +323,7 @@ async def start_rx():
if repeater_enabled:
print(f"System: Repeater Enabled for Channels: {repeater_channels}")
if radio_dectection_enabled:
print(f"System: Radio Detection Enabled using rigctld at {rigControlServerAddress}")
print(f"System: Radio Detection Enabled using rigctld at {rigControlServerAddress} brodcasting to channels: {sigWatchBrodcastCh} for {get_freq_common_name(sigWatchBrodcastCh[0])}")
# Start the receive subscriber using pubsub via meshtastic library
pub.subscribe(onReceive, 'meshtastic.receive')

View File

@@ -42,32 +42,54 @@ def get_freq_common_name(freq):
return "GRMS CH6"
elif freq == 462712500:
return "GRMS CH7"
elif freq == 462737500:
elif freq == 467562500:
return "GRMS CH8"
elif freq == 462762500:
elif freq == 467587500:
return "GRMS CH9"
elif freq == 462787500:
elif freq == 467612500:
return "GRMS CH10"
elif freq == 462812500:
elif freq == 467637500:
return "GRMS CH11"
elif freq == 462837500:
elif freq == 467662500:
return "GRMS CH12"
elif freq == 462862500:
elif freq == 467687500:
return "GRMS CH13"
elif freq == 462887500:
elif freq == 467712500:
return "GRMS CH14"
elif freq == 462912500:
elif freq == 467737500:
return "GRMS CH15"
elif freq == 462937500:
return "GRMS CH16"
elif freq == 462550000:
return "GRMS CH16"
elif freq == 462575000:
return "GMRS CH17"
elif freq == 462600000:
return "GMRS CH18"
elif freq == 462625000:
return "GMRS CH19"
elif freq == 462675000:
return "GMRS CH20"
elif freq == 462670000:
return "GMRS CH21"
elif freq == 462725000:
return "GMRS CH22"
elif freq == 462725500:
return "GMRS CH23"
elif freq == 467575000:
return "GMRS CH24"
elif freq == 467600000:
return "GMRS CH25"
elif freq == 467625000:
return "GMRS CH26"
elif freq == 467650000:
return "GMRS CH27"
elif freq == 467675000:
return "GMRS CH28"
elif freq == 467700000:
return "FRS CH1"
elif freq == 462575000:
return "FRS CH2"
elif freq == 462600000:
return "FRS CH3"
elif freq == 462625000:
return "FRS CH4"
elif freq == 462650000:
return "FRS CH5"
elif freq == 462675000:
@@ -94,6 +116,10 @@ def get_freq_common_name(freq):
return "FRS CH16"
elif freq == 146520000:
return "2M Simplex Calling"
elif freq == 446000000:
return "70cm Simplex Calling"
elif freq == 156800000:
return "Marine CH16"
else:
#return Mhz
freq = freq/1000000