mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Fix slot based busy detection
This commit is contained in:
parent
93f92ac8b8
commit
21f46e9a7f
|
@ -1251,11 +1251,11 @@ class RF:
|
||||||
range_end = range[1]
|
range_end = range[1]
|
||||||
# define the area, we are detecting busy state
|
# define the area, we are detecting busy state
|
||||||
#dfft = dfft[120:176] if TNC.low_bandwidth_mode else dfft[65:231]
|
#dfft = dfft[120:176] if TNC.low_bandwidth_mode else dfft[65:231]
|
||||||
dfft = dfft[range_start:range_end]
|
slotdfft = dfft[range_start:range_end]
|
||||||
# Check for signals higher than average by checking for "100"
|
# Check for signals higher than average by checking for "100"
|
||||||
# If we have a signal, increment our channel_busy delay counter
|
# If we have a signal, increment our channel_busy delay counter
|
||||||
# so we have a smoother state toggle
|
# so we have a smoother state toggle
|
||||||
if np.sum(dfft[dfft > avg + 15]) >= 400 and not TNC.transmitting:
|
if np.sum(slotdfft[slotdfft > avg + 15]) >= 400 and not TNC.transmitting:
|
||||||
ModemParam.channel_busy = True
|
ModemParam.channel_busy = True
|
||||||
ModemParam.channel_busy_slot[slot] = True
|
ModemParam.channel_busy_slot[slot] = True
|
||||||
# Limit delay counter to a maximum of 200. The higher this value,
|
# Limit delay counter to a maximum of 200. The higher this value,
|
||||||
|
|
Loading…
Reference in a new issue