diff --git a/tnc/modem.py b/tnc/modem.py index 3acf6d13..ae8db8b8 100644 --- a/tnc/modem.py +++ b/tnc/modem.py @@ -1251,11 +1251,11 @@ class RF: range_end = range[1] # define the area, we are detecting busy state #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" # If we have a signal, increment our channel_busy delay counter # 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_slot[slot] = True # Limit delay counter to a maximum of 200. The higher this value,