Skip to content

Commit

Permalink
Merge pull request #171 from RobertGawron/feature/muimanual_integrati…
Browse files Browse the repository at this point in the history
…on_v2

Feature/muimanual integration v2
  • Loading branch information
RobertGawron authored Dec 13, 2024
2 parents 7976a3d + 083fd8b commit 7e1f9bf
Show file tree
Hide file tree
Showing 4,983 changed files with 21,031,123 additions and 1,350 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
43 changes: 34 additions & 9 deletions DevOps/Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ RUN apt-get update && apt-get install -y \
clang-tools \
python3 \
python3-pip \
python3-dbg \
graphviz \
doxygen \
wget \
Expand All @@ -38,33 +39,60 @@ RUN apt-get update && apt-get install -y \
python3-pyqt6 \
python3-venv \
llvm-15 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
gdb \
strace \
elfutils \
file \
libxcb-cursor0 \
libxcb-cursor-dev \
libx11-xcb1 \
libxcb-render0 \
libxcb-shm0 \
libxcb-xfixes0 \
libxcb1 \
libxrender1 \
libxkbcommon-x11-0 \
libxcb-icccm4 \
libxcb-keysyms1 \
libxcb-image0 \
libxcb-randr0 \
libxcb-render-util0 \
libxcb-shape0 \
libxcb-sync1 \
libxcb-xinerama0 \
libfontconfig1 \
libfreetype6 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Install Python-based tools in one step
# Create a virtual environment in /workspace/venv
RUN python3 -m venv /workspace/venv

# Activate the virtual environment and install the packages
RUN /workspace/venv/bin/pip install \
RUN /workspace/venv/bin/pip install --upgrade pip && \
/workspace/venv/bin/pip install \
cpplint \
gprof2dot \
coverxygen \
hpp2plantuml
hpp2plantuml \
PyQt6

# Add virtual environment binaries to the PATH
ENV PATH="/workspace/venv/bin:$PATH"

# Set the QT_PLUGIN_PATH environment variable
ENV QT_PLUGIN_PATH="/workspace/venv/lib/python3.12/site-packages/PyQt6/Qt6/plugins"

# Install CMake manually (version 3.22.0)
#RUN apt-get update && \
# RUN apt-get update && \
# wget https://github.com/Kitware/CMake/releases/download/v3.22.0/cmake-3.22.0-linux-x86_64.sh && \
# mkdir /opt/cmake && \
# sh cmake-3.22.0-linux-x86_64.sh --skip-license --prefix=/opt/cmake && \
# ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake && \
# rm cmake-3.22.0-linux-x86_64.sh # Clean up

# Install include-what-you-use from source
#RUN git clone https://github.com/include-what-you-use/include-what-you-use.git /usr/local/src/iwyu && \
# RUN git clone https://github.com/include-what-you-use/include-what-you-use.git /usr/local/src/iwyu && \
# cd /usr/local/src/iwyu && \
# git checkout clang_15 && \
# git pull && \
Expand All @@ -76,9 +104,6 @@ ENV PATH="/workspace/venv/bin:$PATH"
# workaround for cppcheck html generator that needs older version
RUN pip uninstall -y pygments && pip install pygments==2.7.4

RUN pip uninstall -y pygments && \
pip install pygments==2.7.4

RUN mkdir -p /workspace/build
WORKDIR /workspace/build

Expand Down
5 changes: 5 additions & 0 deletions DevOps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ cd /workspace/build/ && cmake .. && make -j24

cd /workspace/Simulation/FirmwarePCSimulator/ && python3 main.py

* all at once:

cd /workspace/build/ && cmake .. && make -j24 && cd /workspace/Simulation/FirmwarePCSimulator/ && python3 main.py


### Troubleshooting:
The simulation is a desktop application that runs in Docker. Docker needs to be configured to display the simulation window. To test this, you can temporarily install some X11 applications and run them:

Expand Down
4 changes: 4 additions & 0 deletions Documentation/Diagrams/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.png
*.jpg
*.jpeg
*.gif
54 changes: 54 additions & 0 deletions Documentation/Diagrams/DisplayClassDiagram.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
@startuml
abstract U8G2
class Display
class St7735DisplayDriver
class "stm32-st7735"
class "CubeMX HAL"
class MUIU8G2
class "User Defined Layouts"
class Hardware

U8G2 <|-- Display

Display *-- St7735DisplayDriver

St7735DisplayDriver ..> "CubeMX HAL" : uses

"stm32-st7735" .up.> St7735DisplayDriver : uses

"CubeMX HAL" --> Hardware : communicates via SPI

MUIU8G2 ..> U8G2 : uses

"User Defined Layouts" ..> MUIU8G2 : uses

"User Defined Layouts" ..> Display : uses

note on link
U8G2 and MUIU8G2 libraries are monochrome by default.
As a workaround, the color can be changed
directly through the Display class.
end note

' Note for "stm32-st7735"
note bottom of "stm32-st7735"
Library from STMicroelectronics
(not the commonly used stm32-st7735 library).
Implements communication with the ST7735 via SPI.
end note

' Note for "CubeMX HAL"
note as CubeMX_NOTE
Generated with CubeMX.
end note
"CubeMX HAL" .right. CubeMX_NOTE

' Note for U8G2 and MUIU8G2
note as U8G2_NOTE
Part of the u8g2 library,
providing GUI and fonts.
end note

MUIU8G2 .left. U8G2_NOTE
U8G2 .left. U8G2_NOTE
@enduml
1 change: 1 addition & 0 deletions Documentation/Diagrams/DisplayClassDiagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions Documentation/Diagrams/DisplaySequenceDiagram.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@startuml

box "MVC pattern"
participant "Controller" as CONTROLLER
participant "View" as VIEW
end box

participant "Device::Display" as DISPLAY
note right of DISPLAY
Device::Display
inherits from U8G2
end note

box "U8G2 library"
participant MUIU8G2
participant U8G2
end box

participant "Driver::St7735DisplayDriver" as DRIVER
box "STM library"
participant "stm32-st7735" as ST7735_LIB
end box

== Initialization ==

CONTROLLER --> DISPLAY : onInitialize
DISPLAY --> DRIVER : onInitialize
DISPLAY --> U8G2 : u8g2_Setup_st7735

DRIVER --> ST7735_LIB : Initialize hardware (TBD)
CONTROLLER --> VIEW: onInitialize
== Start ==

CONTROLLER --> DISPLAY : onStart
DISPLAY --> DRIVER : onStart
DRIVER --> ST7735_LIB : Configure settings (TBD)

CONTROLLER --> U8G2 : begin
CONTROLLER --> MUIU8G2 : begin

== Main Loop ==

VIEW --> MUIU8G2 : draw
MUIU8G2 --> U8G2 : u8x8_d_st7735
U8G2 --> DISPLAY : u8x8_d_st7735
DISPLAY --> DRIVER : drawBitmap
DRIVER --> ST7735_LIB : Send Data (TBD)

@enduml
Loading

0 comments on commit 7e1f9bf

Please sign in to comment.