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

Pre Release do volante T14 #4

Merged
merged 96 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
f733d69
FAD-100 pilot of the mockup
Feb 23, 2023
e390d3c
FAD-100 Created a multi class unit test environment
Feb 24, 2023
f313c69
FAD-100 Fixed old stuff, and added a workflow env
Feb 24, 2023
9b40275
FAD-100-Added Test Classes
Feb 25, 2023
4b3d4a2
FAD-100-WithSerialLog and new workflows
Feb 27, 2023
2a971fa
FAD-100-Workflow git clone fix?
Feb 27, 2023
08babb6
FAD-100-Money Machine
Feb 27, 2023
4e747e3
FAD-100-UbuntuLove
Feb 27, 2023
5e19c6a
What about now?
Feb 27, 2023
89b494b
LEts see
Feb 27, 2023
6cbd5e4
Full SO deps
Feb 27, 2023
89c0c57
Test?
Feb 27, 2023
32b0812
Simplified
Feb 27, 2023
e1607a1
Syntax error
Feb 27, 2023
2d231b6
Simplified even further
Feb 27, 2023
d5bb954
Typo
Feb 27, 2023
dd93b29
Ubuntu sucks
Feb 27, 2023
9763504
will the 5 werk?
Feb 27, 2023
d44e94e
With the json dependancy
Feb 27, 2023
cab7bdf
new dependancy
Feb 27, 2023
4aae5a2
FAD-100-generate args
Feb 27, 2023
cf253b6
Merge branch 'FAD-100-codificacao-das-mudancas-rot-codificacao' into …
Feb 27, 2023
0bb6726
Fixed master stuff?
Feb 27, 2023
f796ae3
more dependencies
Feb 27, 2023
9773511
missing code monkeys
Feb 27, 2023
cf5df35
006
Feb 27, 2023
0cf4d98
Sneed's CI/CD
Feb 27, 2023
77ec075
007
Feb 27, 2023
10f58c1
008
Feb 27, 2023
312f0d2
headless mode
Feb 27, 2023
8b58106
Merge branch 'workflow-stuff' into FAD-100-codificacao-das-mudancas-r…
Feb 27, 2023
2042331
Pedro is the reviewer
Feb 27, 2023
645b803
Nightly run
Feb 27, 2023
c908d86
Grabbed myself a linter
Feb 27, 2023
a7a9aae
Fixed Small Issue
Feb 27, 2023
a5b048a
Almost there
Feb 27, 2023
4e60188
Plz werk
Feb 27, 2023
cc3ce7c
Powahhhhh
Feb 27, 2023
0f032a3
Turing Complete AI Big data with ChatGPT
Feb 27, 2023
424b139
Erecting a DISPENSER
Feb 27, 2023
b1e5cb0
Blah
Feb 27, 2023
d04e8b0
man some of these repos should add better documentation
Feb 27, 2023
4285243
Blind guess
Feb 27, 2023
82bbaba
Pleassee
Feb 27, 2023
45f09b0
WOORK
Feb 27, 2023
70e9303
Back to the classics
Feb 27, 2023
21bf29d
Life isnt a highway
Feb 28, 2023
95ee4e8
Chad Overdrive
Feb 28, 2023
b69101d
100 student class edition
Feb 28, 2023
6b9b4f1
;3 edition
Feb 28, 2023
8b961bf
uhhh work?
Feb 28, 2023
d9cc84c
Without exploits plz werk
Feb 28, 2023
495d898
What about NOW
Feb 28, 2023
45644a0
Test
Feb 28, 2023
f3e597a
Revert "Test"
Feb 28, 2023
2374430
CanBoyAdvance
Feb 28, 2023
0291c75
Last Attempt
Feb 28, 2023
2ec928e
FInished Error Logging
Feb 28, 2023
09c9172
Changed the way error logging is done
Mar 1, 2023
c962582
Added Rotations Tests
Mar 1, 2023
15eb413
Merge remote-tracking branch 'origin/FAD-104-bson-store-interaction' …
Mar 1, 2023
05e2bf4
FAD-101-Migrated to 9600
Mar 2, 2023
9fd3c48
Merge branch 'FAD-101-informacao-quanto-a-estabilidade-do-motor-rotac…
Mar 2, 2023
1e9cbf3
Did they finally fix it?
Mar 22, 2023
111ecf5
Its fixed :paroot:
Mar 22, 2023
5426518
Debugging time
Mar 22, 2023
82349a4
Bruh?
Mar 22, 2023
b69eeed
My eye is bothering a lot
Mar 22, 2023
8a52e08
SSH debug
Mar 22, 2023
1507cdc
Added Deps and perms
Mar 22, 2023
eb6d36a
Caching hit requires it to be 100% equal?
Mar 22, 2023
bfad7d7
Implemented Continuous Automatic Testing
Mar 22, 2023
0121f3d
Added pretty badge stuff
Mar 22, 2023
8ca3730
Merge branch 'workflow-stuff' into FAD-99-implementar-rotacoes-e-muda…
Mar 22, 2023
1b825eb
Compiles for arm(Segfault)
Mar 25, 2023
b5ed6fd
FAD-99 Solved a bug
Mar 27, 2023
94b7a74
Problems including stuff due to empty Qt
Mar 27, 2023
c1caaf6
Updated Medals
Mar 27, 2023
7d01f23
FAD-99 In person review
Mar 27, 2023
2840c1b
FAD-99 Solved some issues relating to QFile
Mar 28, 2023
ed9c8c7
FAD-99 Passes Tests
Mar 29, 2023
3428d53
Merge branch 'workflow-stuff' into FAD-99-implementar-rotacoes-e-muda…
Mar 29, 2023
33b19ff
Cleared Some Test Related Warnings
Apr 17, 2023
a2feb06
Removed more warnings
Apr 17, 2023
a67152b
Added the first connection
May 8, 2023
7d6320a
FAD-238 Freeze
May 11, 2023
4579881
FAD-238 Revival free time
Jul 25, 2023
b7cf3d6
Werks
Jul 26, 2023
59f91d5
Changed Stuff
Jul 29, 2023
190927e
Merge branch 'RenameLart' into dev
Jul 29, 2023
4c4325d
Merge branch 'dev' into FAD-238-other-variables-ui-connection
Jul 29, 2023
b13d964
New Stuff!
Sep 5, 2023
4ab274e
Merge branch 'FAD-238-other-variables-ui-connection' into dev
Sep 5, 2023
661e20f
Added parity and increased reliability
Sep 7, 2023
b837ab2
Merge branch 'GeneralImprovements' into dev
Sep 8, 2023
feedafb
Updated README.md
Sep 13, 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
28 changes: 28 additions & 0 deletions .github/workflows/buildQmake_wf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: buildQmake_wf.yml
on:
workflow_call:
inputs:
qmakeflags:
required: false
type: string
binaryfilename:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: qt6-base-dev qt5-qmake qtbase5-dev libqt6serialport6 libqt6serialport6-dev libqt5serialport5 libqt5serialport5-dev nlohmann-json3-dev socat gengetopt
version: 1.0
- name: Build with qmake
run: /usr/bin/qmake VolanteAlphaQT.pro ${{ inputs.qmakeflags }} && make
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ inputs.binaryfilename }}
path: ${{ github.workspace }}/bin/${{ inputs.binaryfilename }}
if-no-files-found: error
9 changes: 9 additions & 0 deletions .github/workflows/deploy_wf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: deploy_wf
on:
push:
branches: [ master, workflow-stuff ]
jobs:
deploy-production:
uses:
./.github/workflows/deploymentProduction_wf.yml
secrets: inherit
11 changes: 11 additions & 0 deletions .github/workflows/deploymentProduction_wf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#A workflow to deploy the application to a banana pi Zero M2
name: deploymentProduction_wf
on: workflow_call
jobs:
build-qt-desktop:
uses: ./.github/workflows/buildQmake_wf.yml
with:
qmakeflags: "CONFIG+=release_armv7Cortex"
binaryfilename: VolanteAlphaQT


38 changes: 38 additions & 0 deletions .github/workflows/testQTarmv7_wf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: testQTarmv7_wf
on:
workflow_call:
inputs:
suite:
required: false
type: string
jobs:
build-qt-tests-armv7:
uses: ./.github/workflows/buildQmake_wf.yml
with:
qmakeflags: "CONFIG+=\"test release_armv7Cortex\""
binaryfilename: VolanteAlphaQT_testes
test-qt-armv7:
needs: [build-qt-desktop]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fetch artifacts from build-qt-desktop
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
path: bin
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: completed
name: VolanteAlphaQT_testes
# open ssh connection to the server
- name: Setup permissions
run: chmod u+x $GITHUB_WORKSPACE/bin/VolanteAlphaQT_testes
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: qt6-base-dev qt5-qmake qtbase5-dev libqt6serialport6 libqt6serialport6-dev libqt5serialport5 libqt5serialport5-dev nlohmann-json3-dev socat gengetopt
version: 1.0
- name: Run tests
run: cd $GITHUB_WORKSPACE/bin && ./VolanteAlphaQT_testes -platform offscreen


38 changes: 38 additions & 0 deletions .github/workflows/testQTdesktop_wf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: testQTdesktop_wf
on:
workflow_call:
inputs:
suite:
required: false
type: string
jobs:
build-qt-desktop:
uses: ./.github/workflows/buildQmake_wf.yml
with:
qmakeflags: "CONFIG+=test"
binaryfilename: VolanteAlphaQT_testes
test-qt-desktop:
needs: [build-qt-desktop]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fetch artifacts from build-qt-desktop
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
path: bin
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: completed
name: VolanteAlphaQT_testes
# open ssh connection to the server
- name: Setup permissions
run: chmod u+x $GITHUB_WORKSPACE/bin/VolanteAlphaQT_testes
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: qt6-base-dev qt5-qmake qtbase5-dev libqt6serialport6 libqt6serialport6-dev libqt5serialport5 libqt5serialport5-dev nlohmann-json3-dev socat gengetopt
version: 1.0
- name: Run tests
run: cd $GITHUB_WORKSPACE/bin && ./VolanteAlphaQT_testes -platform offscreen


10 changes: 10 additions & 0 deletions .github/workflows/test_wf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: test_wf
on:
push:
branches: [ master, workflow-stuff ]
jobs:
test-qt-desktop:
uses:
./.github/workflows/testQTdesktop_wf.yml
secrets: inherit

7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ CMakeLists.txt.user*
*.dll
*.exe

**args.c
**args.h

bin
build
*.code-workspace
*.code-workspace
serialLog**.txt
**.log
.vscode
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Volante Alpha
# Volante Alpha -> [![main_wf](https://github.com/FSLART/volante_alpha_qt/actions/workflows/main_wf.yml/badge.svg?branch=master)](https://github.com/FSLART/volante_alpha_qt/actions/workflows/main_wf.yml)

[![test_wf](https://github.com/FSLART/volante_alpha_qt/actions/workflows/test_wf.yml/badge.svg?branch=master)](https://github.com/FSLART/volante_alpha_qt/actions/workflows/test_wf.yml) [![deploy_wf](https://github.com/FSLART/volante_alpha_qt/actions/workflows/deploy_wf.yml/badge.svg?branch=master)](https://github.com/FSLART/volante_alpha_qt/actions/workflows/deploy_wf.yml)

Bem vindo!

Este repo tem o propósito de uma implementação do software que será usado tanto para o volante do T14 para fazer alguns testes, como no futuro para modelos mais recentes. A sua implementação atualmente encontra-se em QT 6.0 com base nas bibliotecas nativas em C++. Para compilar o projeto necessitarás de qMake(uma implementação inspirada no software Cmake e make) existindo cerca de 4 ambientes, estes sendo: **Profile, Debug, Release e Testing**

## v1.0.0

Apesar de não ter havido versionamento pois o desenvolvimento foi apressado e houveram prioridades este release é exclusivamente para as variáveis do T-14 e não deve ser usado para outros veiculos pois terão variaveis de controlo diferente às usadas.

# Ambientes

Deverás usar o software qtcreator já que ajuda a executar o qmake e o make com todo o make eyecandy para poderes fazer debugging e dar set up automatico de alguns ambientes listados acima. Três dos quatro ambientes são criados automaticamente pelo qtcreator, mas um deles (Testing) terá de ser criado manualmente no qtcreator, pois não vem por defeito.
Expand Down Expand Up @@ -43,7 +49,7 @@ test{

Se mudares a linha e tua responsabilidade mudares as alterações de volta antes de fazeres um commit. O .pro nao deve ser ignorado pois causa a que toda a gente tenha de manualmente criar o ficheiro. Ignorar isto pode causar problemas futuros.

---------
---

# Dependencias

Expand All @@ -59,6 +65,8 @@ Para o BSON irás precisar de uma biblioteca json, especificamente:
https://github.com/nlohmann/json
Poderás usar a seguinte package com o pacman ``nlohmann-json``. Foi usada a versão `nlohmann-json-3.11.2-1-any` para o desenvolvimento

Para testes terás de instalar gengetopt e socat.

# Manutenção do README

Se notares que o .readme está bastante desatualizado e pertences à equipa deves chatear uma pessoa apropriada. A partida no futuro existerá um manual tanto para utilizadores como para developers.
Expand Down
106 changes: 85 additions & 21 deletions VolanteAlphaQT.pro
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
######################################################################
# Automatically generated by qmake (3.1) Wed Feb 8 13:19:20 2023
######################################################################
defines += __LART_T14__

QT += core gui widgets serialport
QT += core gui widgets serialport

TEMPLATE = app
TARGET = VolanteAlphaQT
Expand All @@ -21,38 +22,101 @@ RCC_DIR = build
# Please consult the documentation of the deprecated API in order to know
# how to port your code away from it.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

# Input
HEADERS += src/contarotacoes.h \
src/mainwindow.h \
src/store.h

HEADERS += \
#Constants Macros Aux stuff
src/references/bson_var.h \
#UI and other non operational stuff
src/flabel.h \
src/contarotacoes.h \
src/contamudancas.h \
src/mainwindow.h \
#Biz Logic
src/store.h

SOURCES += src/contarotacoes.cpp \
src/main.cpp \
src/mainwindow.cpp \
src/store.cpp
SOURCES += \
#Constants Macros Aux stuff
#UI and other non operational stuff
src/flabel.cpp \
src/contarotacoes.cpp \
src/contamudancas.cpp \
src/main.cpp \
src/mainwindow.cpp \
#Biz Logic
src/store.cpp

FORMS += src/mainwindow.ui

TRANSLATIONS += src/VolanteAlphaQT_1_en_US.ts

test{
message(A configurar a build de testes...)

message(A configurar a build de testes...)

TARGET = VolanteAlphaQT_testes
TARGET = VolanteAlphaQT_testes
# run command before compiling
#go to
system(gengetopt --input=./test/args.ggo --output-dir=./test -F args)

QT += testlib
SOURCES -= src/main.cpp

HEADERS += \
test/tst_contarotacoes.h \
test/tst_serialport.h
QT += testlib
SOURCES -= src/main.cpp
SOURCES += test/main.cpp

HEADERS += \
test/args.h \
test/aux.h \
test/tst_contarotacoes.h \
test/tst_contamudancas.h \
test/tst_serialport.h \
test/tst_flabels.h

SOURCES += \
test/tst_contarotacoes.cpp \
test/tst_serialport.cpp


SOURCES += \
test/args.c \
test/aux.cpp \
test/tst_flabels.cpp \
test/tst_contarotacoes.cpp \
test/tst_contamudancas.cpp \
test/tst_serialport.cpp
}
release_armv7Cortex{
QT =
CONFIG -= debug ltcg
defines += __LART_DEPLOY__

CROSS_COMPILER_NAME = "arm-linux-gnueabihf"
#DEFINES += CROSS_COMPILER_NAME=\"$$CROSS_COMPILER_NAME"

QMAKE_CC = $$CROSS_COMPILER_NAME-gcc
QMAKE_CXX = $$CROSS_COMPILER_NAME-g++

QMAKE_LINK = $$CROSS_COMPILER_NAME-ld.gold
QMAKE_LINK_SHLIB = $$CROSS_COMPILER_NAME-ld.gold
QMAKE_LIBS_EGL = -lEGL -lGLESv2
QMAKE_LIBS_OPENVG = -lEGL -lOpenVG -lGLESv2
QMAKE_INCDIR_BCM_HOST = $$[QT_SYSROOT]/opt/vc/include
QMAKE_LIBDIR_BCM_HOST = $$[QT_SYSROOT]/opt/vc/lib
QMAKE_LIBS += -I$$[QT_SYSROOT]/usr/include/nlohmann
QMAKE_LIBS_BCM_HOST = -lbcm_host

QT_ARMV7_COMPILER_VERSION = $$system($$QMAKE_CXX -dumpversion)
DEFINES += QT_ARMV7_COMPILER_VERSION=\"$$QT_ARMV7_COMPILER_VERSION\"
QT_ARMV7_SO_LOCATION = /usr/lib/gcc/$$CROSS_COMPILER_NAME/$$QT_ARMV7_COMPILER_VERSION/qt
DEFINES += QT_ARMV7_SO_LOCATION=$$QT_ARMV7_SO_LOCATION
# TODO: This is strange... check if theres something more adequate
QMAKE_CXXFLAGS *= -I/usr/include/nlohmann -I$$QT_ARMV7_SO_LOCATION
QMAKE_CXXFLAGS *= -mfloat-abi=hard -mfpu=neon -mthumb -mthumb-interwork -mcpu=cortex-a7 -mtune=cortex-a7 -mabi=aapcs-linux -mhard-float -mno-unaligned-access -fPIC
QMAKE_LFLAGS_RELEASE *= -shared -mfloat-abi=hard -mfpu=neon -mthumb -mthumb-interwork -mcpu=cortex-a7 -mtune=cortex-a7 -mabi=aapcs-linux -mhard-float -mno-unaligned-access -O2 -flto=4 -fno-fat-lto-objects -fuse-linker-plugin -fuse-ld=bfd
QMAKE_LFLAGS_RELEASE -= -Wl,-O1


# spaggeti code...
message($$QMAKE_LIBS)
QMAKE_LIBS -= -lpthread
QMAKE_LIBS += -L$$QT_ARMV7_SO_LOCATION/libpthread.so.0 -L$$QT_ARMV7_SO_LOCATION/libQt5Widgets.so -L$$QT_ARMV7_SO_LOCATION/libQt5Gui.so -L$$QT_ARMV7_SO_LOCATION/libQt5SerialPort.so -L$$QT_ARMV7_SO_LOCATION/libQt5Core.so


}
Loading