Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
8a67021
feat: send and receive vSOME/IP data in vehicle controller
LWJ0513 Feb 20, 2025
78759ca
fix: fix typos
LWJ0513 Feb 20, 2025
8bb7bd8
refactor: fix function name
LWJ0513 Feb 20, 2025
4216739
fix: create gear setting function
LWJ0513 Feb 20, 2025
b8fcdf0
refactor: code refactoring
LWJ0513 Feb 20, 2025
22a265e
added: HeadUnit.cpp/.hpp, SpeedClient.cpp/.hpp | updated: CMakeLists.txt
frbeyer1 Feb 20, 2025
d943ec6
fix: fix typo
LWJ0513 Feb 20, 2025
8191dba
[FEAT] : integration fin in IC
SihunLee-1016 Feb 20, 2025
ef124e6
Merge pull request #54 from LWJ0513/vsomeip
SihunLee-1016 Feb 20, 2025
3c122df
fix: include cpp libraries
LWJ0513 Feb 20, 2025
3db06f0
fix: fix typo
LWJ0513 Feb 20, 2025
06e6270
feat: send gear data using vSOME/IP
LWJ0513 Feb 20, 2025
a07147d
Merge pull request #60 from LWJ0513/hu-vsomeip
SihunLee-1016 Feb 20, 2025
48da024
[FEAT] : add data receiving codess
SihunLee-1016 Feb 24, 2025
b27fd97
Rebasing 56 branch
frbeyer1 Feb 24, 2025
04b62db
Merge pull request #59 from FALCON-RACER/56-feat-integration-with-ser…
SihunLee-1016 Feb 24, 2025
139454b
[FEAT] : path edit
SihunLee-1016 Feb 24, 2025
c565eed
testing
frbeyer1 Feb 24, 2025
8fe4279
qt compile setup
frbeyer1 Feb 24, 2025
c72ebe1
qt comiple setup
SihunLee-1016 Feb 24, 2025
95d003a
[FEAT] : gear client class name changed
SihunLee-1016 Feb 24, 2025
28c3b1e
fixing clients
frbeyer1 Feb 24, 2025
bfc2cc2
fixing clients
SihunLee-1016 Feb 24, 2025
8cc5d23
testing
frbeyer1 Feb 24, 2025
b9aed46
config
SihunLee-1016 Feb 24, 2025
7c411c0
Can not load configuration module (2025_02_24)
frbeyer1 Feb 24, 2025
0fe5751
feat: integration
SihunLee-1016 Mar 5, 2025
38de95e
[FEAT]: Use multithread method to receive data in headunit/main.cpp
SihunLee-1016 Mar 5, 2025
1e65f00
feat: connect class and qml
LWJ0513 Mar 6, 2025
0d8296a
feat: update battery data
LWJ0513 Mar 6, 2025
3569152
feat: connect battery data using signal
LWJ0513 Mar 6, 2025
abae249
feat: update gear data
LWJ0513 Mar 6, 2025
e4c7ea0
fix: fixed bug
LWJ0513 Mar 6, 2025
f7128d1
feat: update speed data
LWJ0513 Mar 6, 2025
6838827
refactor: code refactoring
LWJ0513 Mar 6, 2025
935c429
Merge pull request #63 from LWJ0513/update-someip-data
SihunLee-1016 Mar 6, 2025
18a3319
[FEAT] : qml edit
SihunLee-1016 Mar 6, 2025
e0d027f
[FEAT] : battery works
SihunLee-1016 Mar 12, 2025
03241fb
[FEAT] : gear, ambient light added on HU and IC. Test required
SihunLee-1016 Mar 12, 2025
f4b06d2
[FEAT] : battery code edit
SihunLee-1016 Mar 17, 2025
4695b9c
[FEAT] : cmakelist changed excutable
SihunLee-1016 Mar 17, 2025
cdf0e0b
[FEAT] : path update
SihunLee-1016 Mar 17, 2025
64a910d
[FEAT] : cmakelist edit
SihunLee-1016 Mar 17, 2025
48be885
[FEAT] : cmake list vsomeip version changed
SihunLee-1016 Mar 17, 2025
4b1eac7
main edit
SihunLee-1016 Mar 17, 2025
0a73b01
main edit
SihunLee-1016 Mar 17, 2025
5075ece
gear delay edit
SihunLee-1016 Mar 17, 2025
f9a9a8b
can byte check
SihunLee-1016 Mar 17, 2025
877b298
[feat] can data
SihunLee-1016 Mar 17, 2025
e46656f
1
SihunLee-1016 Mar 17, 2025
efe2601
2
SihunLee-1016 Mar 17, 2025
e5c0204
3
SihunLee-1016 Mar 17, 2025
34eae16
4
SihunLee-1016 Mar 17, 2025
173a093
6
SihunLee-1016 Mar 17, 2025
e614bdd
7
SihunLee-1016 Mar 17, 2025
530d544
7
SihunLee-1016 Mar 17, 2025
34afda9
8
SihunLee-1016 Mar 18, 2025
8f27ea4
9
SihunLee-1016 Mar 18, 2025
76b0bee
10
SihunLee-1016 Mar 18, 2025
3a149eb
11
SihunLee-1016 Mar 18, 2025
d301c23
12
SihunLee-1016 Mar 18, 2025
331cc08
13
SihunLee-1016 Mar 18, 2025
f66c617
14
SihunLee-1016 Mar 18, 2025
aeff5c8
14
SihunLee-1016 Mar 18, 2025
f580fff
15
SihunLee-1016 Mar 18, 2025
939b389
16
SihunLee-1016 Mar 18, 2025
6f4b998
123132
SihunLee-1016 Mar 18, 2025
ff587c8
123123
SihunLee-1016 Mar 18, 2025
1ace8f4
123123
SihunLee-1016 Mar 18, 2025
25deeb2
123123
SihunLee-1016 Mar 18, 2025
bf07aed
yaya ture
SihunLee-1016 Mar 18, 2025
288eae9
123123
SihunLee-1016 Mar 18, 2025
063fab0
123123
SihunLee-1016 Mar 18, 2025
49d9073
123123123
SihunLee-1016 Mar 18, 2025
fe8b077
123123123
SihunLee-1016 Mar 18, 2025
0cfdc07
123123
SihunLee-1016 Mar 18, 2025
5d2df96
123123231
SihunLee-1016 Mar 18, 2025
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
35 changes: 33 additions & 2 deletions apps/HeadUnit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,25 @@ project(HeadUnit VERSION 0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(VSOMEIP_CONFIG_FILES "./vsomeip.json")

find_package(Qt6 6.5 REQUIRED COMPONENTS Quick Qml)
find_package(Qt6 REQUIRED COMPONENTS Quick WebEngineWidgets Qml)
find_package(vsomeip3 3.5.3 REQUIRED)
find_package( Boost 1.55 COMPONENTS system thread log REQUIRED)

include_directories(
${Boost_INCLUDE_DIR}
${VSOMEIP_INCLUDE_DIR}
)

qt_standard_project_setup(REQUIRES 6.5)

qt_add_executable(head-unit

main.cpp
HeadUnit.cpp
# SpeedClient.cpp
resources.qrc

shared/utils/envmanager.h
Expand All @@ -22,6 +33,12 @@ qt_add_executable(head-unit

modules/spotify/spotify.h
modules/spotify/spotify.cpp
HeadUnit.h
clients/speed_client/speed_client.cpp
clients/battery_client/battery_client.cpp
clients/gear_data_receiving_client/gear_client.cpp
clients/ambient_sender/alsender.cpp
${VSOMEIP_CONFIG_FILES}
)

qt_add_qml_module(head-unit
Expand All @@ -40,10 +57,18 @@ qt_add_qml_module(head-unit
modules/youtube/Youtube_main.qml

SOURCES
HeadUnit.h
clients/speed_client/speed_client.hpp
clients/battery_client/battery_client.hpp
clients/gear_data_receiving_client/gear_client.hpp
clients/ambient_sender/alsender.hpp
clients/server.hpp
modules/spotify/spotify.h
modules/spotify/spotify.cpp
shared/utils/envmanager.h
shared/utils/envmanager.cpp
shared/utils/someip.cpp
shared/utils/someip.h
DEPENDENCIES
QtQuick
QtQml
Expand All @@ -53,8 +78,14 @@ qt_add_qml_module(head-unit
)


find_package(Qt6 REQUIRED COMPONENTS Quick WebEngineWidgets Qml)
target_link_libraries(head-unit PRIVATE Qt6::Quick Qt6::WebEngineWidgets Qt6::Qml)
target_link_libraries(head-unit
PRIVATE
vsomeip3
${Boost_LIBRARIES}
Qt6::Quick
Qt6::WebEngineWidgets
Qt6::Qml
)
find_package(Qt6 6.5 REQUIRED COMPONENTS Quick Qml Bluetooth)
target_link_libraries(head-unit PRIVATE Qt6::Bluetooth)

Expand Down
72 changes: 72 additions & 0 deletions apps/HeadUnit/HeadUnit.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#include "HeadUnit.h"

HeadUnit::HeadUnit(QObject* parent)
: QObject(parent)
{}

const QString& HeadUnit::currentGear() const
{
return _currentGear;
}

int HeadUnit::ambientLighting()
{
return _ambientLighting;
}

int HeadUnit::speed() const
{
return _speed;
}

int HeadUnit::batteryPercentage() const
{
return _batteryPercentage;
}

bool HeadUnit::chargingState() const
{
return _chargingState;
}

void HeadUnit::setCurrentGear(const QString& gear)
{
if (_currentGear != gear) {
_currentGear = gear;
emit currentGearChanged(gear);
}
}

void HeadUnit::setAmbientLighting(int colorValue)
{
if (_ambientLighting != colorValue) {
_ambientLighting = colorValue;
emit ambientLightingChanged(colorValue);
}
}

void HeadUnit::setSpeed(int speed)
{
if (_speed != speed) {
_speed = speed;
emit speedChanged(speed);
}
}

void HeadUnit::setBatteryPercentage(int batteryPercentage)
{
if (_batteryPercentage != batteryPercentage) {
_batteryPercentage = batteryPercentage;
emit batteryPercentageChanged(batteryPercentage);
}
}

void HeadUnit::setChargingState(bool state)
{
if (_chargingState != state) {
_chargingState = state;
emit chargingStateChanged(state);
}
}


42 changes: 42 additions & 0 deletions apps/HeadUnit/HeadUnit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#pragma once

#include <QObject>

class HeadUnit : public QObject
{
Q_OBJECT
Q_PROPERTY(QString currentGear READ currentGear WRITE setCurrentGear NOTIFY currentGearChanged)
Q_PROPERTY(int ambientLighting READ ambientLighting WRITE setAmbientLighting NOTIFY ambientLightingChanged)
Q_PROPERTY(int speed READ speed WRITE setSpeed NOTIFY speedChanged)
Q_PROPERTY(int batteryPercentage READ batteryPercentage WRITE setBatteryPercentage NOTIFY batteryPercentageChanged)
Q_PROPERTY(int chargingState READ chargingState WRITE setChargingState NOTIFY chargingStateChanged)

public:
explicit HeadUnit(QObject *parent = nullptr);

const QString& currentGear() const;
int ambientLighting();
int speed() const;
int batteryPercentage() const;
bool chargingState() const;

void setAmbientLighting(int colorValue);
void setCurrentGear(const QString& gear);
void setSpeed(int speed);
void setBatteryPercentage(int batteryPercentage);
void setChargingState(bool state);

signals:
void currentGearChanged(const QString& gear);
void ambientLightingChanged(int colorValue);
void speedChanged(int speed);
void batteryPercentageChanged(int batteryPercentage);
void chargingStateChanged(bool state);

private:
QString _currentGear = "P";
int _speed = 0;
int _ambientLighting = 0;
int _batteryPercentage = 100;
bool _chargingState = false;
};
Loading