Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
e4f0520
updated version info to new exp version
Apr 21, 2023
d26da03
first run using datac13 as signalling mode
Apr 21, 2023
7f9e048
changed codec2 branch for ctest
Apr 21, 2023
df78e11
mode cleanup and sone arq related improvements to new modes
Apr 21, 2023
05290ae
adjusted ctests to new codec2 module structure
Apr 21, 2023
c6fe7d5
adjusted ctests to new codec2 module structure
Apr 21, 2023
7b84044
moved ctest from datac0 to datac13
Apr 21, 2023
1acbbe2
further modem adjustments
Apr 21, 2023
92ed015
updated cmakelists
Apr 21, 2023
397fa19
and another attempt fixing ctests...
Apr 21, 2023
8370d33
and another attempt fixing ctests...
Apr 21, 2023
8561df9
fixed timeouts for util_tnc_ISS.py
Apr 21, 2023
876274a
increased timeout for some tests
Apr 21, 2023
2b15e58
increased timeout for some tests
Apr 21, 2023
53955d4
run github actions only for actual branch
Apr 21, 2023
f45b541
run github actions only for actual branch
Apr 21, 2023
a9f7fa5
revert run ctest with specific branch
Apr 21, 2023
a238503
first working version
Apr 21, 2023
77364fa
set channel busy if receiving c2 frames
Apr 21, 2023
1975eac
increased modem_stats_nr_max
Apr 21, 2023
db2fe28
add frequency to explorer heard stations
Apr 22, 2023
9b9837d
use datc13 for sending testframe
Apr 22, 2023
2b8338c
updated datetime to show date in heard stations
Apr 22, 2023
6802410
Prettified Code!
DJ2LS Apr 22, 2023
a6fc5e1
increased timeouts for channel opener
Apr 22, 2023
6b2accc
Merge remote-tracking branch 'origin/ls-modem' into ls-modem
Apr 22, 2023
0a2ee0e
increased timeouts for busy channel constellation
Apr 22, 2023
0707c64
improved qrv slots
Apr 22, 2023
7de3d63
fixed potential error for searching in temp data buffer
Apr 22, 2023
542c527
increased timeouts for ack/nack/rpt
Apr 22, 2023
fbfc036
implemented slot based busy state for performance testing
Apr 23, 2023
9d9f9c1
codec2 doesnt trigger busy state anymore
Apr 23, 2023
11362c5
test with busy slot detection
Apr 23, 2023
be74162
slot related hot fix
Apr 23, 2023
74f4534
override waiting for channel busy if mode fits to busy slot
Apr 23, 2023
6e9119c
adjusted buffer search area
Apr 24, 2023
2a1ffef
first redesigned code for selective repeat arq
Apr 25, 2023
54b3073
some time related fixes
Apr 25, 2023
c8e7270
some more time related fixes
Apr 25, 2023
334e147
and more and more timing issues...
Apr 25, 2023
f0ac496
fixed a channel timeout
Apr 25, 2023
a0a6bae
updated ctest
DJ2LS Apr 26, 2023
8fc1cc6
pep8 improvements and some cleanup, also potential fix of buffer posi…
DJ2LS Apr 26, 2023
afeea49
revert last commit and fix ctest with bufferposition_burst_start
Apr 26, 2023
e14b16f
added placeholder for dataclasses
Apr 26, 2023
d2c5c93
updated dataclasses
Apr 26, 2023
69749d3
updated dataclasses
Apr 27, 2023
09cf659
updated ctests
Apr 28, 2023
81dc913
updated ctest timning
Apr 28, 2023
c497f41
updated ctest timning
Apr 28, 2023
83f7580
fixed explorer
Apr 28, 2023
24d7a59
fixed explorer
Apr 28, 2023
1d48c91
fixed bug with stuck in loop on last burst if it is getting lost
Apr 30, 2023
e4ce02e
updated version info
Apr 30, 2023
004ebe7
updated datac13 negative test...
May 3, 2023
8b1c17a
updated datac13 test...
May 3, 2023
56bbafb
adjusted timeouts
May 4, 2023
ca36205
moved ctest back to master branch
May 4, 2023
973ee59
updated ctests
May 4, 2023
85e289f
updated ctests
May 4, 2023
c33bf50
added old settings
May 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build_multiplatform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: uraimo/run-on-arch-action@v2
name: Build artifact
id: build
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
shell: bash
run: |
git clone https://github.com/drowe67/codec2.git
cd codec2 && git checkout master # This should be pinned to a release
cd codec2
mkdir -p build_linux && cd build_linux && cmake .. && make

- name: run ctests
Expand Down
36 changes: 18 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@ add_test(NAME tnc_irs_iss
# python3 test_chat_text.py")
# set_tests_properties(chat_text PROPERTIES PASS_REGULAR_EXPRESSION "errors: 0")

add_test(NAME datac0_frames
add_test(NAME datac13_frames
COMMAND sh -c "export LD_LIBRARY_PATH=${CODEC2_BUILD_DIR}/src;
export PYTHONPATH=../tnc;
cd ${CMAKE_CURRENT_SOURCE_DIR}/test;
python3 test_datac0.py")
set_tests_properties(datac0_frames PROPERTIES PASS_REGULAR_EXPRESSION "errors: 0")
python3 test_datac13.py")
set_tests_properties(datac13_frames PROPERTIES PASS_REGULAR_EXPRESSION "errors: 0")

add_test(NAME datac0_frames_negative
add_test(NAME datac13_frames_negative
COMMAND sh -c "export LD_LIBRARY_PATH=${CODEC2_BUILD_DIR}/src;
export PYTHONPATH=../tnc;
cd ${CMAKE_CURRENT_SOURCE_DIR}/test;
python3 test_datac0_negative.py")
set_tests_properties(datac0_frames_negative PROPERTIES PASS_REGULAR_EXPRESSION "errors: 0")
python3 test_datac13_negative.py")
set_tests_properties(datac13_frames_negative PROPERTIES PASS_REGULAR_EXPRESSION "errors: 0")

add_test(NAME helper_routines
COMMAND sh -c "export LD_LIBRARY_PATH=${CODEC2_BUILD_DIR}/src;
Expand All @@ -87,7 +87,7 @@ add_test(NAME py_highsnr_stdio_P_P_multi
PATH=$PATH:${CODEC2_BUILD_DIR}/src;
cd ${CMAKE_CURRENT_SOURCE_DIR}/test;
python3 test_highsnr_stdio_P_P_multi.py")
set_tests_properties(py_highsnr_stdio_P_P_multi PROPERTIES PASS_REGULAR_EXPRESSION "DATAC0: ${BURSTS}/${FRAMESPERBURST} DATAC1: ${BURSTS}/${FRAMESPERBURST} DATAC3: ${BURSTS}/${FRAMESPERBURST}")
set_tests_properties(py_highsnr_stdio_P_P_multi PROPERTIES PASS_REGULAR_EXPRESSION "DATAC13: ${BURSTS}/${FRAMESPERBURST} DATAC1: ${BURSTS}/${FRAMESPERBURST} DATAC3: ${BURSTS}/${FRAMESPERBURST}")

add_test(NAME py_highsnr_stdio_P_P_datacx
COMMAND sh -c "export LD_LIBRARY_PATH=${CODEC2_BUILD_DIR}/src;
Expand Down Expand Up @@ -124,35 +124,35 @@ add_test(NAME highsnr_stdio_P_C_single
COMMAND sh -c "export LD_LIBRARY_PATH=${CODEC2_BUILD_DIR}/src;
PATH=$PATH:${CODEC2_BUILD_DIR}/src;
cd ${CMAKE_CURRENT_SOURCE_DIR}/test;
python3 util_tx.py --mode datac0 --delay 500 --framesperburst ${FRAMESPERBURST} --bursts ${BURSTS} |
python3 util_tx.py --mode datac13 --delay 500 --framesperburst ${FRAMESPERBURST} --bursts ${BURSTS} |
sox -t .s16 -r 48000 -c 1 - -t .s16 -r 8000 -c 1 - |
freedv_data_raw_rx datac0 - - --framesperburst ${FRAMESPERBURST} | hexdump -C")
freedv_data_raw_rx datac13 - - --framesperburst ${FRAMESPERBURST} | hexdump -C")
set_tests_properties(highsnr_stdio_P_C_single PROPERTIES PASS_REGULAR_EXPRESSION "HELLO WORLD")

add_test(NAME highsnr_stdio_C_P_single
COMMAND sh -c "export LD_LIBRARY_PATH=${CODEC2_BUILD_DIR}/src;
PATH=$PATH:${CODEC2_BUILD_DIR}/src;
cd ${CMAKE_CURRENT_SOURCE_DIR}/test;
freedv_data_raw_tx datac0 --testframes ${TESTFRAMES} --bursts ${BURSTS} --framesperburst ${FRAMESPERBURST} /dev/zero - |
freedv_data_raw_tx datac13 --testframes ${TESTFRAMES} --bursts ${BURSTS} --framesperburst ${FRAMESPERBURST} /dev/zero - |
sox -t .s16 -r 8000 -c 1 - -t .s16 -r 48000 -c 1 - |
python3 util_rx.py --mode datac0 --framesperburst ${FRAMESPERBURST} --bursts ${BURSTS}")
python3 util_rx.py --mode datac13 --framesperburst ${FRAMESPERBURST} --bursts ${BURSTS}")
set_tests_properties(highsnr_stdio_C_P_single PROPERTIES PASS_REGULAR_EXPRESSION "RECEIVED BURSTS: ${BURSTS} RECEIVED FRAMES: ${FRAMESPERBURST}")

add_test(NAME highsnr_stdio_P_P_single
COMMAND sh -c "export LD_LIBRARY_PATH=${CODEC2_BUILD_DIR}/src;
PATH=$PATH:${CODEC2_BUILD_DIR}/src;
cd ${CMAKE_CURRENT_SOURCE_DIR}/test;
python3 util_tx.py --mode datac0 --delay 500 --framesperburst ${FRAMESPERBURST} --bursts ${BURSTS} |
python3 util_rx.py --debug --mode datac0 --framesperburst ${FRAMESPERBURST} --bursts ${BURSTS}")
python3 util_tx.py --mode datac13 --delay 500 --framesperburst ${FRAMESPERBURST} --bursts ${BURSTS} |
python3 util_rx.py --debug --mode datac13 --framesperburst ${FRAMESPERBURST} --bursts ${BURSTS}")
set_tests_properties(highsnr_stdio_P_P_single PROPERTIES PASS_REGULAR_EXPRESSION "RECEIVED BURSTS: ${BURSTS} RECEIVED FRAMES: ${FRAMESPERBURST}")

add_test(NAME highsnr_stdio_P_P_multi
COMMAND sh -c "export LD_LIBRARY_PATH=${CODEC2_BUILD_DIR}/src;
PATH=$PATH:${CODEC2_BUILD_DIR}/src;
cd ${CMAKE_CURRENT_SOURCE_DIR}/test;
python3 util_multimode_tx.py --delay 500 --framesperburst ${FRAMESPERBURST} --bursts ${BURSTS} |
python3 util_multimode_rx.py --framesperburst ${FRAMESPERBURST} --bursts ${BURSTS} --timeout 20")
set_tests_properties(highsnr_stdio_P_P_multi PROPERTIES PASS_REGULAR_EXPRESSION "DATAC0: ${BURSTS}/${FRAMESPERBURST} DATAC1: ${BURSTS}/${FRAMESPERBURST} DATAC3: ${BURSTS}/${FRAMESPERBURST}")
python3 util_multimode_rx.py --framesperburst ${FRAMESPERBURST} --bursts ${BURSTS} --timeout 60")
set_tests_properties(highsnr_stdio_P_P_multi PROPERTIES PASS_REGULAR_EXPRESSION "DATAC13: ${BURSTS}/${FRAMESPERBURST} DATAC1: ${BURSTS}/${FRAMESPERBURST} DATAC3: ${BURSTS}/${FRAMESPERBURST}")

# These tests can't run on GitHub actions as we don't have a virtual sound card
if(NOT DEFINED ENV{GITHUB_RUN_ID})
Expand All @@ -179,7 +179,7 @@ add_test(NAME highsnr_virtual3_P_P_multi
PATH=$PATH:${CODEC2_BUILD_DIR}/src;
cd ${CMAKE_CURRENT_SOURCE_DIR}/test;
./test_virtual_mm.sh")
set_tests_properties(highsnr_virtual3_P_P_multi PROPERTIES PASS_REGULAR_EXPRESSION "DATAC0: 2/4 DATAC1: 2/4 DATAC3: 2/4")
set_tests_properties(highsnr_virtual3_P_P_multi PROPERTIES PASS_REGULAR_EXPRESSION "DATAC13: 2/4 DATAC1: 2/4 DATAC3: 2/4")

# let Python do audio I/O via pyaudio callback mode
add_test(NAME highsnr_virtual4_P_P_single_callback
Expand All @@ -203,15 +203,15 @@ add_test(NAME highsnr_virtual5_P_P_multi_callback
PATH=$PATH:${CODEC2_BUILD_DIR}/src;
cd ${CMAKE_CURRENT_SOURCE_DIR}/test;
./test_virtual4a.sh")
set_tests_properties(highsnr_virtual5_P_P_multi_callback PROPERTIES PASS_REGULAR_EXPRESSION "DATAC0: 2/4 DATAC1: 2/4 DATAC3: 2/4")
set_tests_properties(highsnr_virtual5_P_P_multi_callback PROPERTIES PASS_REGULAR_EXPRESSION "DATAC13: 2/4 DATAC1: 2/4 DATAC3: 2/4")

# let Python do audio I/O via pyaudio callback mode with code outside of callback
add_test(NAME highsnr_virtual5_P_P_multi_callback_outside
COMMAND sh -c "export LD_LIBRARY_PATH=${CODEC2_BUILD_DIR}/src;
PATH=$PATH:${CODEC2_BUILD_DIR}/src;
cd ${CMAKE_CURRENT_SOURCE_DIR}/test;
./test_virtual4b.sh")
set_tests_properties(highsnr_virtual5_P_P_multi_callback_outside PROPERTIES PASS_REGULAR_EXPRESSION "DATAC0: 2/4 DATAC1: 2/4 DATAC3: 2/4")
set_tests_properties(highsnr_virtual5_P_P_multi_callback_outside PROPERTIES PASS_REGULAR_EXPRESSION "DATAC13: 2/4 DATAC1: 2/4 DATAC3: 2/4")

endif()

4 changes: 2 additions & 2 deletions gui/preload-chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ window.addEventListener("DOMContentLoaded", () => {
command: "msg",
dxcallsign: dxcallsign,
mode: 255,
frames: 1,
frames: 5,
data: data_with_attachment,
checksum: file_checksum,
uuid: uuid,
Expand Down Expand Up @@ -1443,7 +1443,7 @@ update_chat = function (obj) {
command: "msg",
dxcallsign: doc.dxcallsign,
mode: 255,
frames: 1,
frames: 5,
data: data_with_attachment,
checksum: doc.checksum,
uuid: doc.uuid,
Expand Down
16 changes: 10 additions & 6 deletions gui/preload-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1612,6 +1612,7 @@ ipcRenderer.on("action-update-reception-status", (event, arg) => {
var time_left = "<strong>" + time_left + " || Speed/min: ";

// SET BYTES PER MINUTE

if (typeof data.bytesperminute == "undefined") {
var arq_bytes_per_minute = 0;
} else {
Expand All @@ -1626,7 +1627,7 @@ ipcRenderer.on("action-update-reception-status", (event, arg) => {
var arq_bytes_per_minute_compressed = Math.round(
arq_bytes_per_minute * compress
);

console.log(arq_bytes_per_minute);
time_left +=
formatBytes(arq_bytes_per_minute, 1) +
" (comp: " +
Expand Down Expand Up @@ -2188,11 +2189,14 @@ function updateHeardStations(arg) {

//https://stackoverflow.com/a/847196
timestampRaw = arg.stations[i]["timestamp"];
var date = new Date(timestampRaw * 1000);
var hours = date.getHours();
var minutes = "0" + date.getMinutes();
var seconds = "0" + date.getSeconds();
var datetime = hours + ":" + minutes.substr(-2) + ":" + seconds.substr(-2);

var datetime = new Date(timestampRaw * 1000).toLocaleString(
navigator.language
);
//var hours = date.getHours();
//var minutes = "0" + date.getMinutes();
//var seconds = "0" + date.getSeconds();
//var datetime = hours + ":" + minutes.substr(-2) + ":" + seconds.substr(-2);

var timestamp = document.createElement("td");
var timestampText = document.createElement("span");
Expand Down
1 change: 1 addition & 0 deletions gui/sock.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ client.on("data", function (socketdata) {
dbfs_level: data["audio_dbfs"],
fft: data["fft"],
channel_busy: data["channel_busy"],
channel_busy_slot: data["channel_busy_slot"],
scatter: data["scatter"],
info: data["info"],
rx_buffer_length: data["rx_buffer_length"],
Expand Down
4 changes: 2 additions & 2 deletions test/001_highsnr_stdio_audio/test_virtual3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ check_alsa_loopback
# make sure all child processes are killed when we exit
trap 'jobs -p | xargs -r kill' EXIT

python3 util_callback_rx.py --mode datac0 --frames 2 --bursts 3 --audiodev -2 --debug &
python3 util_callback_rx.py --mode datac13 --frames 2 --bursts 3 --audiodev -2 --debug &
rx_pid=$!
#sleep 1
python3 util_tx.py --mode datac0 --frames 2 --bursts 3 --audiodev -2
python3 util_tx.py --mode datac13 --frames 2 --bursts 3 --audiodev -2
wait ${rx_pid}
2 changes: 1 addition & 1 deletion test/ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def receive():

# time.sleep(DELAY_BETWEEN_BURSTS)

# WAIT UNTIL WE RECEIVD AN ACK/DATAC0 FRAME
# WAIT UNTIL WE RECEIVD AN ACK/datac13 FRAME
while ACK_TIMEOUT >= time.time():
time.sleep(0.01)

Expand Down
30 changes: 15 additions & 15 deletions test/test_datac0.py → test/test_datac13.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Can be invoked from CMake, pytest, coverage or directly.

Uses util_datac0.py in separate process to perform the data transfer.
Uses util_datac13.py in separate process to perform the data transfer.

@author: N2KIQ
"""
Expand All @@ -28,9 +28,9 @@
import structlog

try:
import test.util_datac0 as util
import test.util_datac13 as util
except ImportError:
import util_datac0 as util
import util_datac13 as util


STATIONS = ["AA2BB", "ZZ9YY"]
Expand All @@ -48,11 +48,11 @@ def parameters() -> dict:
connect_data = {"type": "arq", "command": "connect", "dxcallsign": "ZZ9YY-0"}
stop_data = {"type": "arq", "command": "stop_transmission", "dxcallsign": "ZZ9YY-0"}

beacon_timeout = 6
cq_timeout = 8
ping_timeout = 5
connect_timeout = 10
stop_timeout = 5
beacon_timeout = 1
ping_timeout = 1
cq_timeout = 1
connect_timeout = 1
stop_timeout = 1

beacon_tx_check = '"beacon":"transmitting"'
cq_tx_check = '"qrv":"received"'
Expand Down Expand Up @@ -192,13 +192,13 @@ def analyze_results(station1: list, station2: list, call_list: list):
pytest.param("beacon", marks=pytest.mark.flaky(reruns=2)),
pytest.param("ping", marks=pytest.mark.flaky(reruns=2)),
pytest.param("cq", marks=pytest.mark.flaky(reruns=20)),
# pytest.param("cq", marks=pytest.mark.xfail(reason="Too unstable for CI")),
pytest.param("stop", marks=pytest.mark.flaky(reruns=0)),
#pytest.param("cq", marks=pytest.mark.xfail(reason="Too unstable for CI")),
pytest.param("stop", marks=pytest.mark.flaky(reruns=2)),
],
)
def test_datac0(frame_type: str, tmp_path):
log_handler.setup_logging(filename=tmp_path / "test_datac0", level="DEBUG")
log = structlog.get_logger("test_datac0")
def test_datac13(frame_type: str, tmp_path):
log_handler.setup_logging(filename=tmp_path / "test_datac13", level="DEBUG")
log = structlog.get_logger("test_datac13")

s1_data = []
s2_data = []
Expand Down Expand Up @@ -227,7 +227,7 @@ def recv_from_pipes(s1_rx, s1_pipe, s2_rx, s2_pipe) -> list:
from_s2, s2_send = multiprocessing.Pipe()
proc = [
multiprocessing.Process(
target=util.t_datac0_1,
target=util.t_datac13_1,
args=(
s1_send,
STATIONS[0],
Expand All @@ -238,7 +238,7 @@ def recv_from_pipes(s1_rx, s1_pipe, s2_rx, s2_pipe) -> list:
daemon=True,
),
multiprocessing.Process(
target=util.t_datac0_2,
target=util.t_datac13_2,
args=(
s2_send,
STATIONS[1],
Expand Down
21 changes: 12 additions & 9 deletions test/test_datac0_negative.py → test/test_datac13_negative.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Negative tests for datac0 frames.
Negative tests for datac13 frames.

@author: kronenpj
"""
Expand All @@ -20,9 +20,9 @@
import structlog

try:
import test.util_datac0_negative as util
import test.util_datac13_negative as util
except ImportError:
import util_datac0_negative as util
import util_datac13_negative as util


STATIONS = ["AA2BB", "ZZ9YY"]
Expand Down Expand Up @@ -162,10 +162,13 @@ def analyze_results(station1: list, station2: list, call_list: list):


# @pytest.mark.parametrize("frame_type", ["beacon", "connect", "ping"])
@pytest.mark.parametrize("frame_type", ["ping", "stop"])
def test_datac0_negative(frame_type: str, tmp_path):
log_handler.setup_logging(filename=tmp_path / "test_datac0", level="DEBUG")
log = structlog.get_logger("test_datac0")
@pytest.mark.parametrize("frame_type", [
"ping",
pytest.param("stop", marks=pytest.mark.flaky(reruns=10))
])
def test_datac13_negative(frame_type: str, tmp_path):
log_handler.setup_logging(filename=tmp_path / "test_datac13", level="DEBUG")
log = structlog.get_logger("test_datac13")

s1_data = []
s2_data = []
Expand Down Expand Up @@ -194,7 +197,7 @@ def recv_from_pipes(s1_rx, s1_pipe, s2_rx, s2_pipe) -> list:
from_s2, s2_send = multiprocessing.Pipe()
proc = [
multiprocessing.Process(
target=util.t_datac0_1,
target=util.t_datac13_1,
args=(
s1_send,
STATIONS[0],
Expand All @@ -205,7 +208,7 @@ def recv_from_pipes(s1_rx, s1_pipe, s2_rx, s2_pipe) -> list:
daemon=True,
),
multiprocessing.Process(
target=util.t_datac0_2,
target=util.t_datac13_2,
args=(
s2_send,
STATIONS[1],
Expand Down
6 changes: 3 additions & 3 deletions test/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@

import helpers
import pytest
import static
from static import ARQ, AudioParam, Beacon, Channel, Daemon, HamlibParam, ModemParam, Station, Statistics, TCIParam, TNC


@pytest.mark.parametrize("callsign", ["AA1AA", "DE2DE", "E4AWQ-4"])
def test_check_callsign(callsign: str):
"""
Execute test to demonstrate how to create and verify callsign checksums.
"""
static.SSID_LIST = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
Station.ssid_list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]

t_callsign_bytes = helpers.callsign_to_bytes(callsign)
t_callsign = helpers.bytes_to_callsign(t_callsign_bytes)
Expand All @@ -41,7 +41,7 @@ def test_callsign_to_bytes(callsign: str):
"""
Execute test to demonsrate symmetry when converting callsigns to and from byte arrays.
"""
static.SSID_LIST = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
Station.ssid_list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]

t_callsign_crc = helpers.get_crc_24(bytes(callsign, "UTF-8"))
t_callsign_bytes = helpers.callsign_to_bytes(callsign)
Expand Down
4 changes: 2 additions & 2 deletions test/test_highsnr_stdio_C_P_datacx.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def t_HighSNR_C_P_DATACx(
bursts: int, frames_per_burst: int, testframes: int, mode: str
):
"""
Test a high signal-to-noise ratio path with DATAC0.
Test a high signal-to-noise ratio path with datac13.

:param bursts: Number of bursts
:type bursts: str
Expand Down Expand Up @@ -152,7 +152,7 @@ def t_HighSNR_C_P_DATACx(
@pytest.mark.parametrize("bursts", [BURSTS])
@pytest.mark.parametrize("frames_per_burst", [FRAMESPERBURST])
@pytest.mark.parametrize("testframes", [TESTFRAMES])
@pytest.mark.parametrize("mode", ["datac0", "datac1", "datac3"])
@pytest.mark.parametrize("mode", ["datac13", "datac1", "datac3"])
def test_HighSNR_C_P_DATACx(
bursts: int, frames_per_burst: int, testframes: int, mode: str
):
Expand Down
Loading