Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aid 013 add example updater #37

Closed
wants to merge 86 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
dd51e23
Refactoring file structure
Apr 3, 2023
bfc2e46
Fixing build system
Apr 4, 2023
3dd6c14
Fixing tests
Apr 4, 2023
dd543ff
Fixing build issues
Apr 4, 2023
d40c3eb
Merged with main
Apr 4, 2023
ce18155
Fixing CI issues
Apr 8, 2023
6e7f316
Alsa logging now goes to glog
Apr 8, 2023
c01a65f
Temp fix for thread termination
Apr 8, 2023
2a7a9a2
Fixing issues with build
Apr 9, 2023
f2c3c1d
Fixing issues with deleted tests
Apr 9, 2023
e11001e
Fixing build issues
Apr 9, 2023
7ac1826
Moving display hmi application into sub-directory
Apr 9, 2023
ed727e4
Fixing issues with updater
Apr 9, 2023
bf32ccf
Fixing fullscreen toggle bug
Apr 9, 2023
974f24d
Fixing cmake issues with sound library alsa
Apr 10, 2023
98808d3
Audio now staord in memory
Apr 10, 2023
3b018a9
Fixing file locationd
Apr 10, 2023
8f5536c
Fixing issue with audio blocking renderer
Apr 10, 2023
1408729
Fixing cmake issues with Windows builds
Apr 12, 2023
9c09499
Merged in updated MediaX library
Apr 30, 2023
58a8aa9
Adding canvas as a widget
Apr 30, 2023
6e8a2eb
Adding new widget for message box
May 4, 2023
d039fa5
Fixing merge issues
May 4, 2023
58f993c
Fixing issues with new widggets
May 6, 2023
a2132c0
Fixing some issues with renderer
May 6, 2023
776fb9c
Adding gflags used in examples
May 6, 2023
454b7b7
Adding gflags used in examples
May 6, 2023
93c72df
Fixing issues with canvas widget
May 6, 2023
dd4a447
Fixing issues with canvas widget
May 6, 2023
ab1a618
Fixing issues with widgets
May 6, 2023
cc21ec2
Added video widget
May 6, 2023
9d02ac0
Added video widget
May 6, 2023
996a499
Fixing CI issues
May 6, 2023
d71fa64
Fixing CI issues
May 6, 2023
85d3acf
Updated to mediax
May 6, 2023
651e502
Fix issue with dependancies and renamed mediax to libmediax in cmake
May 7, 2023
afc92a5
Updated install in cmake
May 7, 2023
63b0d78
Fixing lint and adding githooks
May 7, 2023
5787d66
Renaming git hooks
May 7, 2023
3d43998
Ficing pre-push checks
May 7, 2023
06d8221
Fixing link issues
May 7, 2023
9b5397d
Added pistache
May 9, 2023
9819ba1
Fixing up git hooks
May 9, 2023
5e0e19f
Updating licence
May 9, 2023
ebfe500
Fixing issues with video widget
May 9, 2023
5e23278
Updated SA screen for llive video feeds
May 9, 2023
8c093a8
Fixing issue with SA switching
May 9, 2023
64fcbfd
Fixing dependancies
May 10, 2023
a544a67
Updated SA screen
May 10, 2023
2b8e108
Merge branch 'AID-013_add_example_updater' of github.com:DefenceX/Viv…
May 16, 2023
6a0d47b
Updating stream string
May 16, 2023
452da4c
Fixing some doxygen comments
May 16, 2023
2d3b80d
Fixing some doxygen comments
May 16, 2023
7956be1
Fixing some doxygen comments
May 16, 2023
d801ac5
Fixing some doxygen comments
May 16, 2023
7386c90
Updates
May 17, 2023
a3a9f92
Merged with main
May 17, 2023
b5c0b2f
Merged with main
May 17, 2023
e351823
Merged with main
May 17, 2023
24550da
Fixing doxygen comments
May 17, 2023
103534a
Fixing lint issues
May 17, 2023
99b8720
Fixing centos issue, pipeline
May 17, 2023
24a5065
Fixing centos issue, pipeline
May 17, 2023
5ca2e59
Fixing centos issue, pipeline
May 17, 2023
c774e55
Filling in more doxygen comments
May 17, 2023
a7f7803
Adding gcovr to init script
May 17, 2023
848c480
Adding clang tidy in
May 20, 2023
cbab32d
Fixing video issues
May 20, 2023
9044759
Fixing types and doxygen
May 20, 2023
ad0f59d
Fixing doxygen comments
May 20, 2023
622246c
Fixing MSYS2 build issues
May 22, 2023
898600c
Skip checkos for MSYS2 for now
May 22, 2023
8339e42
Doxygen check added
May 22, 2023
695a52a
Merge branch 'main' into AID-013_add_example_updater
ross-newman May 22, 2023
783d596
Fixing pipleine issues
May 22, 2023
03fa19e
Merge branch 'AID-013_add_example_updater' of github.com:DefenceX/Viv…
May 22, 2023
256911c
Removing pistache as its not cross platform
May 23, 2023
8127ca6
updated README
May 26, 2023
1341a2d
Updating coadacity yaml
May 26, 2023
d69dec0
fixing GTEST library build issue
May 26, 2023
de72e7d
Updated mediax external module
May 26, 2023
e85b340
Fixing sonarcloud
May 26, 2023
cc1d1d4
Fixing mediax install
May 26, 2023
f197fd9
Fixing issue with install locations
May 26, 2023
d010724
Fixing missing includes
May 26, 2023
53c79bf
Fixing missing includes
May 26, 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
3 changes: 3 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[core]
hooksPath = .githooks

45 changes: 45 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/sh -e

# An example hook script to verify what is about to be pushed. Called by "git
# push" after it has checked the remote status, but before anything has been
# pushed. If this script exits with a non-zero status nothing will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
# <local ref> <local oid> <remote ref> <remote oid>
#
# This sample shows how to prevent push of commits where the log message starts
# with "WIP" (work in progress).

remote="$1"
url="$2"

if [ ! -z "$MSYSTEM_CHOST" ]; then
exit 0
fi


$WORKSPACE_ROOT/.githooks/pre-push-doxygen-check
$WORKSPACE_ROOT/.githooks/pre-push-check-linter
$WORKSPACE_ROOT/.githooks/pre-push-check-todo
$WORKSPACE_ROOT/.githooks/pre-push-check-conflict
$WORKSPACE_ROOT/.githooks/pre-push-check-untracked

# --- Safety check
if [ -z "$WORKSPACE_ROOT" ]; then
echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply WORKSPACE_ROOT then run" >&2
echo " WORKSPACE_ROOT=/home/me/repo $0)" >&2
exit 1
fi

cd $WORKSPACE_ROOT/build
ctest --output-on-failure
16 changes: 16 additions & 0 deletions .githooks/pre-push-check-conflict
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color

result=$(grep -n -r --include="*.cc" --include="*.h" --include="*.txt" --include="*.yaml" --include="Doxyfile" --include="*.md" --include="*.sh" "<<<<<<< HEAD" $WORKSPACE_ROOT)

if [ -z "$result" ]
then
echo "${GREEN}No CONFLICTS detected${NC}"
exit 0
else
echo "${RED}Found CONFLICTS that still need resolution:${NC}"
echo "$result"
exit 1
fi
19 changes: 19 additions & 0 deletions .githooks/pre-push-check-linter
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color

max_nolint_count=50
nolint_count=$(grep -sinr NOLINT $WORKSPACE_ROOT/src/ | wc -l)

echo "NOLINT: Number of linter exceptions: ${RED}$nolint_count${NC}"
grep -sinr NOLINT $WORKSPACE_ROOT/src/

if [ $((nolint_count)) -gt $((max_nolint_count)) ]; then
echo " NOLINT: There are too many linter exeptions!"
echo ""
echo "NOLINT: Please resolve them before pushing."
exit 1
fi

exit 0
19 changes: 19 additions & 0 deletions .githooks/pre-push-check-todo
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color

max_todo_count=50
todo_count=$(grep -sinr todo $WORKSPACE_ROOT/src/ | wc -l)

echo "Number of TODOs: ${RED}$todo_count${NC}"
grep -sinr todo $WORKSPACE_ROOT/src/

if [ $((todo_count)) -gt $((max_todo_count)) ]; then
echo "Too many TODOs!"
echo ""
echo "Please resolve them before pushing."
exit 1
fi

exit 0
32 changes: 32 additions & 0 deletions .githooks/pre-push-check-untracked
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/sh

#
# A hook script to verify that a push is not done with untracked source file
#
# To use it, either symlink this script to $your-git-clone/.git/hooks/pre-push
# or include it in your existing pre-push script.
#

# Perl-style regular expression which limits the files we interpret as source files.
# The default pattern here excludes CMakeLists.txt files and any .h/.cpp/.cmake files.
# Extend/adapt this to your needs. Alternatively, set the pattern in your repo via:
# git config hooks.prepush.sourcepattern "$your-pattern"
pattern=$(git config --get hooks.prepush.sourcepattern)
if [ -z "$pattern" ]; then
pattern="(?:(?:^|/)CMakeLists\.txt|\.h|\.cc|\.cmake|\.sh|\.yaml|\.md)$"
fi

files=$(git status -u --porcelain --no-column | sed "s/^?? //" | grep -P "$pattern")
if [ -z "$files" ]; then
exit 0
fi

echo
echo "ERROR: Preventing push with untracked source files:"
echo
echo "$files" | sed "s/^/ /"
echo
echo "Either include these files in your commits, add them to .gitignore"
echo "or stash them with git stash -u."
echo
exit 1
2 changes: 2 additions & 0 deletions .githooks/pre-push-doxygen-check
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
$WORKSPACE_ROOT/scripts/doxygencheck.sh
2 changes: 1 addition & 1 deletion .github/workflows/build-centos-amd64-cyclone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: |
dnf install git cmake gcc-c++ python2-pip rpm-build cairo-devel libXt-devel doxygen graphviz ImageMagick \
libxml2-devel ncurses-devel libXext-devel ffmpeg-devel GeographicLib-devel \
libtool automake autoconf autogen \
libtool automake autoconf autogen gflags \
lttng-ust-devel lttng-ust-devel gtk3-devel -y && \
pip2 install cpplint --user

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-debian-arm64-cyclone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
libxt-dev libxext-dev gtk-doc-tools libswscale-dev libprotobuf-c-dev \
geographiclib-doc libgeographic-dev libgeographic-dev \
autoconf automake libtool curl make g++ unzip lsb-release graphviz \
libtool automake autoconf autogen imagemagick -y && \
libtool automake autoconf autogen imagemagick libgflags-dev libgtkmm-3.0-dev meson -y && \
pip install cpplint --user

- name: CMake and Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-msys2-amd64-cyclone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
msystem: MINGW64
update: true
install: git tree base-devel mingw-w64-x86_64-cmake mingw-w64-x86_64-cairo mingw-w64-x86_64-cairo mingw-w64-x86_64-toolchain mingw-w64-x86_64-gtk3 mingw-w64-x86_64-gcc mingw-w64-x86_64-ffmpeg mingw-w64-x86_64-nsis libtool automake autoconf autogen
install: git base-devel mingw-w64-x86_64-cmake mingw-w64-x86_64-cairo mingw-w64-x86_64-cairo mingw-w64-x86_64-toolchain mingw-w64-x86_64-gtk3 mingw-w64-x86_64-gcc mingw-w64-x86_64-gflags mingw-w64-x86_64-ffmpeg mingw-w64-x86_64-nsis libtool automake autoconf autogen
- name: CMake and Build
run: |
echo 'Running in MSYS2!' && \
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/build-ubuntu-amd64-cyclone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ jobs:

- name: Apt Install
run: |
sudo apt-get --no-install-recommends install automake autogen catch cpplint rpm libgtk-3-dev valgrind libcairo2-dev \
libpango1.0-dev libxt-dev libxml2-dev ncurses-dev libxext-dev gtk-doc-tools libswscale-dev libprotobuf-c-dev \
geographiclib-doc libgeographic-dev libgeographic-dev libprotobuf23 libprotobuf-dev \
protobuf-compiler autoconf automake libtool curl make g++ unzip lsb-release graphviz \
libtool automake autoconf autogen -y
sudo ./scripts/init_build_machine_ubuntu.sh

- name: CMake and Build
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ jobs:
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
sarif_file: results.sarif
11 changes: 2 additions & 9 deletions .github/workflows/sonarcloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,14 @@ jobs:
run: sudo apt-get update
- name: Apt Install
run: |
sudo apt-get --no-install-recommends install catch cpplint rpm libgtk-3-dev valgrind libcairo2-dev \
libpango1.0-dev libxt-dev libxml2-dev ncurses-dev libxext-dev libswscale-dev libprotobuf-c-dev \
geographiclib-doc libgeographic-dev libgeographic-dev libprotobuf23 libprotobuf-dev \
protobuf-compiler autoconf automake libtool curl make g++ unzip lsb-release tree graphviz gcovr \
lttng-tools lttng-modules-dkms liblttng-ust-dev liblttng-ctl-dev \
libtool automake autoconf autogen -y
sudo ./scripts/init_build_machine_ubuntu.sh
- name: Run build-wrapper
run: |
tree -L 3 -d
cmake -S . -B build
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build ./build/ --config Release
- name: Run tests to generate coverage statistics
run: |
./build/bin/test_log
cd ./build && ctest
- name: Collect coverage into one XML report
run: |
gcovr --sonarqube > coverage.xml
Expand All @@ -46,5 +40,4 @@ jobs:
sonar-scanner \
--define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" \
--define sonar.coverageReportPaths=coverage.xml \
--define sonar.cfamily.cache.enabled=false \
--define sonar.python.version=3
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ CPackConfig*
CPackSourceConfig.cmake
dds/libdds.a
gva-tools/gva-tool
hmi-display/hmi-display
hmi-display/log.txt
src/log.txt
include/
libbusiness_logic.a
libtest_catch.a
Expand Down
13 changes: 7 additions & 6 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@
"${workspaceFolder}/**",
"/usr/include/cairo",
"${workspaceFolder}",
"${workspaceFolder}/hmi-display",
"${workspaceFolder}/src",
"${workspaceFolder}/build/external/libnmea/src",
"${workspaceFolder}/hmi-display/common",
"${workspaceFolder}/hmi-display/src/widgets",
"${workspaceFolder}/hmi-display/src/widgets/table",
"${workspaceFolder}/src/common",
"${workspaceFolder}/src/hmicore/widgets",
"${workspaceFolder}/src/hmicore/widgets/table",
"/usr/include/gtk-3.0",
"/usr/include/glib-2.0",
"/usr/lib/x86_64-linux-gnu/glib-2.0/include",
"/usr/include/pango-1.0",
"/usr/include/harfbuzz",
"/usr/include/gdk-pixbuf-2.0",
"/usr/include/atk-1.0",
"${workspaceFolder}/hmi-display",
"${workspaceFolder}/build/external/install/usr/local/include"
"${workspaceFolder}/src",
"${workspaceFolder}/build/external/install/usr/local/include",
"${workspaceFolder}/src"
],
"defines": [],
"compilerPath": "/usr/bin/g++",
Expand Down
45 changes: 28 additions & 17 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,13 @@
"doxdocgen.cpp.tparamTemplate": "\\tparam {param} ",
// File copyright documentation tag. Array of strings will be converted to one line per element. Can template {year}.
"doxdocgen.file.copyrightTag": [
"MIT License",
"",
"Copyright (c) {year} Ross Newman (ross.newman@defencex.com.au)",
" Copyright (c) 2023, DefenceX PTY LTD",
" This file is part of the VivoeX project developed by DefenceX.",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and",
"associated documentation files (the 'Software'), to deal in the Software without restriction,",
"including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,",
"and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,",
"subject to the following conditions:",
" Licensed under the Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)",
" License. See the LICENSE file in the project root for full license details.",
"",
"The above copyright notice and this permission notice shall be included in all copies or substantial",
"portions of the Software.",
"THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT",
"LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN",
"NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ",
"WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE",
"SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
""
],
// The order to use for the file comment. Values can be used multiple times. Valid values are shown in default ",setting.
Expand All @@ -63,7 +53,7 @@
// Version number for the file.
"doxdocgen.file.versionTag": "\\version 0.1",
// Set the e-mail address of the author. Replaces {email}.
"doxdocgen.generic.authorEmail": "ross.newman@defencex.com.au",
"doxdocgen.generic.authorEmail": "enquiries@defencex.ai",
// Set the name of the author. Replaces {author}.
"doxdocgen.generic.authorName": "Ross Newman",
// Set the style of the author tag and your name. Can template {author} and {email}.
Expand Down Expand Up @@ -216,20 +206,29 @@
"slist": "cpp",
"scoped_allocator": "cpp",
"typeindex": "cpp",
"valarray": "cpp"
"valarray": "cpp",
"source_location": "cpp",
"__nullptr": "cpp",
"__bit_reference": "cpp",
"__hash_table": "cpp",
"__string": "cpp",
"__tree": "cpp"
},
"cSpell.words": [
"alarmson",
"Alsa",
"automake",
"Buildroot",
"CBRN",
"Colourspace",
"cpack",
"cpplint",
"ctest",
"cyclonedds",
"DDDS",
"defattr",
"defencex",
"depayloader",
"DESTDIR",
"devel",
"enduml",
Expand All @@ -240,6 +239,8 @@
"gint",
"GLOG",
"graphviz",
"HMICORE",
"HMIDISPLAY",
"Layouter",
"ldconfig",
"libcairo",
Expand Down Expand Up @@ -284,6 +285,7 @@
"rpmdir",
"rpmfilename",
"RTPS",
"Rtpvraw",
"samplerate",
"sfinfo",
"skinparam",
Expand Down Expand Up @@ -311,6 +313,14 @@
"connectionId": "defencex",
"projectKey": "DefenceX_vivoe-lite"
},
"terminal.integrated.env.linux": {
"WORKSPACE_ROOT": "${workspaceFolder}",
"PATH": "${env:PATH}:${workspaceFolder}/scripts"
},
"terminal.integrated.env.windows": {
"WORKSPACE_ROOT": "${workspaceFolder}",
"PATH": "${env:PATH}:${workspaceFolder}/scripts"
},
"sonarlint.output.showAnalyzerLogs": true,
"sonarlint.output.showVerboseLogs": true,
"sonarlint.trace.server": "off",
Expand All @@ -325,5 +335,6 @@
]
}
},
"terminal.integrated.defaultProfile.windows": "MINGW64 / MSYS2"
"terminal.integrated.defaultProfile.windows": "MINGW64 / MSYS2",
"C_Cpp.clang_format_style": "{ BasedOnStyle: Google, ColumnLimit: 120 }"
}
Loading
Loading