Skip to content

Commit 33cda1f

Browse files
committed
Merge branch 'dev' into bugfix/ThirsPartyType
2 parents d05ac40 + c25629a commit 33cda1f

33 files changed

+656
-104
lines changed

Diff for: .github/workflows/ci.yml

+170
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
name: 'build direwolf'
2+
3+
on:
4+
# permit to manually trigger the CI
5+
workflow_dispatch:
6+
inputs:
7+
cmake_flags:
8+
description: 'Custom CMAKE flags'
9+
required: false
10+
push:
11+
paths-ignore:
12+
- '.github/**'
13+
pull_request:
14+
paths-ignore:
15+
- '.github/**'
16+
17+
jobs:
18+
build:
19+
name: ${{ matrix.config.name }}
20+
runs-on: ${{ matrix.config.os }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
config:
25+
- {
26+
name: 'Windows Latest MinGW 64bit',
27+
os: windows-latest,
28+
cc: 'x86_64-w64-mingw32-gcc',
29+
cxx: 'x86_64-w64-mingw32-g++',
30+
ar: 'x86_64-w64-mingw32-ar',
31+
windres: 'x86_64-w64-mingw32-windres',
32+
arch: 'x86_64',
33+
build_type: 'Release',
34+
cmake_extra_flags: '-G "MinGW Makefiles"'
35+
}
36+
- {
37+
name: 'Windows 2019 MinGW 32bit',
38+
os: windows-2019,
39+
cc: 'i686-w64-mingw32-gcc',
40+
cxx: 'i686-w64-mingw32-g++',
41+
ar: 'i686-w64-mingw32-ar',
42+
windres: 'i686-w64-mingw32-windres',
43+
arch: 'i686',
44+
build_type: 'Release',
45+
cmake_extra_flags: '-G "MinGW Makefiles"'
46+
}
47+
- {
48+
name: 'macOS latest',
49+
os: macos-latest,
50+
cc: 'clang',
51+
cxx: 'clang++',
52+
arch: 'x86_64',
53+
build_type: 'Release',
54+
cmake_extra_flags: ''
55+
}
56+
- {
57+
name: 'Ubuntu latest Debug',
58+
os: ubuntu-latest,
59+
cc: 'gcc',
60+
cxx: 'g++',
61+
arch: 'x86_64',
62+
build_type: 'Debug',
63+
cmake_extra_flags: ''
64+
}
65+
- {
66+
name: 'Ubuntu 22.04',
67+
os: ubuntu-22.04,
68+
cc: 'gcc',
69+
cxx: 'g++',
70+
arch: 'x86_64',
71+
build_type: 'Release',
72+
cmake_extra_flags: ''
73+
}
74+
- {
75+
name: 'Ubuntu 20.04',
76+
os: ubuntu-20.04,
77+
cc: 'gcc',
78+
cxx: 'g++',
79+
arch: 'x86_64',
80+
build_type: 'Release',
81+
cmake_extra_flags: ''
82+
}
83+
- {
84+
name: 'Ubuntu 18.04',
85+
os: ubuntu-18.04,
86+
cc: 'gcc',
87+
cxx: 'g++',
88+
arch: 'x86_64',
89+
build_type: 'Release',
90+
cmake_extra_flags: ''
91+
}
92+
steps:
93+
- name: checkout
94+
uses: actions/checkout@v2
95+
with:
96+
fetch-depth: 8
97+
- name: dependency
98+
shell: bash
99+
run: |
100+
# this is not perfect but enought for now
101+
if [ "$RUNNER_OS" == "Linux" ]; then
102+
sudo apt-get update
103+
sudo apt-get install libasound2-dev libudev-dev libhamlib-dev gpsd
104+
elif [ "$RUNNER_OS" == "macOS" ]; then
105+
# just to simplify I use homebrew but
106+
# we can use macports (latest direwolf is already available as port)
107+
brew install portaudio hamlib gpsd
108+
elif [ "$RUNNER_OS" == "Windows" ]; then
109+
# add the folder to PATH
110+
echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH
111+
fi
112+
- name: create build environment
113+
run: |
114+
cmake -E make_directory ${{github.workspace}}/build
115+
- name: configure
116+
shell: bash
117+
working-directory: ${{github.workspace}}/build
118+
run: |
119+
if [ "$RUNNER_OS" == "Windows" ]; then
120+
export CC=${{ matrix.config.cc }}
121+
export CXX=${{ matrix.config.cxx }}
122+
export AR=${{ matrix.config.ar }}
123+
export WINDRES=${{ matrix.config.windres }}
124+
fi
125+
cmake $GITHUB_WORKSPACE \
126+
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
127+
-DCMAKE_C_COMPILER=${{ matrix.config.cc }} \
128+
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
129+
-DCMAKE_CXX_FLAGS="-Werror" -DUNITTEST=1 \
130+
${{ matrix.config.cmake_extra_flags }} \
131+
${{ github.event.inputs.cmake_flags }}
132+
- name: build
133+
shell: bash
134+
working-directory: ${{github.workspace}}/build
135+
run: |
136+
if [ "$RUNNER_OS" == "Windows" ]; then
137+
export CC=${{ matrix.config.cc }}
138+
export CXX=${{ matrix.config.cxx }}
139+
export AR=${{ matrix.config.ar }}
140+
export WINDRES=${{ matrix.config.windres }}
141+
fi
142+
cmake --build . --config ${{ matrix.config.build_type }} \
143+
${{ github.event.inputs.cmake_flags }}
144+
- name: test
145+
continue-on-error: true
146+
shell: bash
147+
working-directory: ${{github.workspace}}/build
148+
run: |
149+
ctest -C ${{ matrix.config.build_type }} \
150+
--parallel 2 --output-on-failure \
151+
${{ github.event.inputs.cmake_flags }}
152+
- name: package
153+
shell: bash
154+
working-directory: ${{github.workspace}}/build
155+
run: |
156+
if [ "$RUNNER_OS" == "Windows" ] || [ "$RUNNER_OS" == "macOS" ]; then
157+
make package
158+
fi
159+
- name: archive binary
160+
uses: actions/upload-artifact@v2
161+
with:
162+
name: direwolf_${{ matrix.config.os }}_${{ matrix.config.arch }}_${{ github.sha }}
163+
path: |
164+
${{github.workspace}}/build/direwolf-*.zip
165+
${{github.workspace}}/build/direwolf.conf
166+
${{github.workspace}}/build/src/*
167+
${{github.workspace}}/build/CMakeCache.txt
168+
!${{github.workspace}}/build/src/cmake_install.cmake
169+
!${{github.workspace}}/build/src/CMakeFiles
170+
!${{github.workspace}}/build/src/Makefile

Diff for: .github/workflows/codeql-analysis.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ dev ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ dev ]
20+
schedule:
21+
- cron: '25 8 * * 4'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'cpp', 'python' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v2
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v1
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@v1
57+
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
60+
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
64+
65+
- run: |
66+
mkdir build
67+
cd build
68+
cmake -DUNITTEST=1 ..
69+
make
70+
make test
71+
72+
- name: Perform CodeQL Analysis
73+
uses: github/codeql-action/analyze@v1

Diff for: CHANGES.md

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
### New Features: ###
99

10+
- Additional documentation location to slow down growth of main repository. [https://github.com/wb2osz/direwolf-doc](https://github.com/wb2osz/direwolf-doc)
11+
12+
- New ICHANNEL configuration option to map a KISS client application channel to APRS-IS. Packets from APRS-IS will be presented to client applications as the specified channel. Packets sent, by client applications, to that channel will go to APRS-IS rather than a radio channel. Details in ***Internal-Packet-Routing.pdf***.
1013

1114
- New variable speed option for gen_packets. For example, "-v 5,0.1" would generate packets from 5% too slow to 5% too fast with increments of 0.1. Some implementations might have imprecise timing. Use this to test how well TNCs tolerate sloppy timing.
1215

Diff for: CMakeLists.txt

+9-8
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,16 @@ elseif(APPLE)
167167
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_MACOS_DNSSD")
168168

169169
elseif (WIN32)
170-
if(NOT VS2015 AND NOT VS2017)
171-
message(FATAL_ERROR "You must use Microsoft Visual Studio 2015 or 2017 as compiler")
170+
if(C_MSVC)
171+
if (NOT VS2015 AND NOT VS2017 AND NOT VS2019)
172+
message(FATAL_ERROR "You must use Microsoft Visual Studio 2015, 2017 or 2019 as compiler")
173+
else()
174+
# compile with full multicore
175+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
176+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
177+
set(CUSTOM_SHELL_BIN "")
178+
endif()
172179
endif()
173-
174-
# compile with full multicore
175-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
176-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
177-
178-
set(CUSTOM_SHELL_BIN "")
179180
endif()
180181

181182
if (C_CLANG OR C_GCC)

Diff for: cmake/modules/FindCompiler.cmake

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ elseif(NOT DEFINED C_GCC AND CMAKE_CXX_COMPILER_ID MATCHES "GNU")
55
set(C_GCC 1)
66
elseif(NOT DEFINED C_MSVC AND CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
77
set(C_MSVC 1)
8-
if(MSVC_VERSION GREATER 1910 AND MSVC_VERSION LESS 1919)
8+
if(MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS_EQUAL 1929)
9+
set(VS2019 ON)
10+
elseif(MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919)
911
set(VS2017 ON)
1012
elseif(MSVC_VERSION GREATER 1899 AND MSVC_VERSION LESS 1910)
1113
set(VS2015 ON)

Diff for: src/agwlib.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ static void * tnc_listen_thread (void *arg)
365365
}
366366

367367
/*
368-
* Call to/from fields are 10 bytes but contents must not exceeed 9 characters.
368+
* Call to/from fields are 10 bytes but contents must not exceed 9 characters.
369369
* It's not guaranteed that unused bytes will contain 0 so we
370370
* don't issue error message in this case.
371371
*/

Diff for: src/atest.c

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
#include <string.h>
6969
#include <time.h>
7070
#include <getopt.h>
71+
#include <ctype.h>
7172

7273

7374
#define ATEST_C 1

Diff for: src/audio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ int audio_flush (int a)
15321532
* (3) Call this function, which might or might not wait long enough.
15331533
* (4) Add (1) and (2) resulting in when PTT should be turned off.
15341534
* (5) Take difference between current time and desired PPT off time
1535-
* and wait for additoinal time if required.
1535+
* and wait for additional time if required.
15361536
*
15371537
*----------------------------------------------------------------*/
15381538

Diff for: src/audio.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ struct audio_s {
7272

7373
struct adev_param_s {
7474

75-
/* Properites of the sound device. */
75+
/* Properties of the sound device. */
7676

7777
int defined; /* Was device defined? */
7878
/* First one defaults to yes. */
@@ -102,7 +102,7 @@ struct audio_s {
102102
/* This is the probability, in per cent, of randomly corrupting it. */
103103
/* Normally this is 0. 25 would mean corrupt it 25% of the time. */
104104

105-
int recv_error_rate; /* Similar but the % probablity of dropping a received frame. */
105+
int recv_error_rate; /* Similar but the % probability of dropping a received frame. */
106106

107107
float recv_ber; /* Receive Bit Error Rate (BER). */
108108
/* Probability of inverting a bit coming out of the modem. */

Diff for: src/audio_portaudio.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ int audio_flush (int a)
12601260
* (3) Call this function, which might or might not wait long enough.
12611261
* (4) Add (1) and (2) resulting in when PTT should be turned off.
12621262
* (5) Take difference between current time and desired PPT off time
1263-
* and wait for additoinal time if required.
1263+
* and wait for additional time if required.
12641264
*
12651265
*----------------------------------------------------------------*/
12661266

Diff for: src/audio_win.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static struct audio_s *save_audio_config_p;
8484
*/
8585

8686
/*
87-
* Originally, we had an abitrary buf time of 40 mS.
87+
* Originally, we had an arbitrary buf time of 40 mS.
8888
*
8989
* For mono, the buffer size was rounded up from 3528 to 4k so
9090
* it was really about 50 mS per buffer or about 20 per second.
@@ -1074,7 +1074,7 @@ int audio_flush (int a)
10741074
* (3) Call this function, which might or might not wait long enough.
10751075
* (4) Add (1) and (2) resulting in when PTT should be turned off.
10761076
* (5) Take difference between current time and desired PPT off time
1077-
* and wait for additoinal time if required.
1077+
* and wait for additional time if required.
10781078
*
10791079
*----------------------------------------------------------------*/
10801080

Diff for: src/ax25_link.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ typedef struct ax25_dlsm_s {
347347
// Sometimes the flow chart has SAT instead of SRT.
348348
// I think that is a typographical error.
349349

350-
float t1v; // How long to wait for an acknowlegement before resending.
350+
float t1v; // How long to wait for an acknowledgement before resending.
351351
// Value used when starting timer T1, in seconds.
352352
// "FRACK" parameter in some implementations.
353353
// Typically it might be 3 seconds after frame has been
@@ -6049,7 +6049,7 @@ static void check_need_for_response (ax25_dlsm_t *S, ax25_frame_type_t frame_typ
60496049
*
60506050
* Outputs: S->srt New smoothed roundtrip time.
60516051
*
6052-
* S->t1v How long to wait for an acknowlegement before resending.
6052+
* S->t1v How long to wait for an acknowledgement before resending.
60536053
* Value used when starting timer T1, in seconds.
60546054
* Here it is dynamically adjusted.
60556055
*

Diff for: src/ax25_pad.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -1866,7 +1866,7 @@ packet_t ax25_get_nextp (packet_t this_p)
18661866
*
18671867
* Inputs: this_p - Current packet object.
18681868
*
1869-
* release_time - Time as returned by dtime_now().
1869+
* release_time - Time as returned by dtime_monotonic().
18701870
*
18711871
*------------------------------------------------------------------------------*/
18721872

@@ -2923,7 +2923,9 @@ int ax25_alevel_to_text (alevel_t alevel, char text[AX25_ALEVEL_TO_TEXT_SIZE])
29232923

29242924
snprintf (text, AX25_ALEVEL_TO_TEXT_SIZE, "%d(%+d/%+d)", alevel.rec, alevel.mark, alevel.space);
29252925
}
2926-
else if (alevel.mark == -1 && alevel.space == -1) { /* PSK - single number. */
2926+
else if ((alevel.mark == -1 && alevel.space == -1) || /* PSK */
2927+
(alevel.mark == -99 && alevel.space == -99)) { /* v. 1.7 "B" FM demodulator. */
2928+
// ?? Where does -99 come from?
29272929

29282930
snprintf (text, AX25_ALEVEL_TO_TEXT_SIZE, "%d", alevel.rec);
29292931
}

0 commit comments

Comments
 (0)