This guide is made assuming you have Raspbian OS and you are member of Anticarium organization.
- Generate your ssh key and add it to github according to this tutorial: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
$ cd ~/Desktop
$ git config --global user.email "you@example.com"
$ git config --global user.name "Your Name"
$ mkdir ./Anticarium_Pi
$ cd ./Anticarium_Pi
$ git clone https://github.com/Anticarium/Anticarium_Pi.git
$ git remote set-url origin git@github.com:Anticarium/Anticarium_Pi.git
$ cd
$ git clone https://github.com/Anticarium/Anticarium_Doc.git
$ cp ~/Desktop/Anticarium_Doc/.clang-format ~/Desktop/Anticarium_Pi/Anticarium_Pi
$ sudo apt install libssl-dev
- Go to https://cmake.org/download/ and download latest CMake source for linux
- Create folder
cmake
in your home directory - Move downloaded file to
cmake
folder - Export
- `$ cd ~/cmake/<your_exported_cmake_source_library>
$ ./bootstrap
$ make
$ sudo make install
- In Anticarium_Pi source folder
wget https://raw.githubusercontent.com/cpp-pm/gate/master/cmake/HunterGate.cmake -O cmake/HunterGate.cmake
$ sudo mousepad /boot/config.txt
- Find the line containing “dtparam=i2c_arm=on” and uncomment it
- Add “,i2c_arm_baudrate=9600” where 9600 is the new speed (9,6 Kbit/s). Note the comma.
- Should look like this:
dtparam=i2c_arm=on,i2c_arm_baudrate=9600
- Save
reboot
$ sudo apt install qt5-default
$ sudo apt install qtcreator
$ sudo apt install clang-format-9
- Using Anticarium_Doc clang format setup in qt, link against this clang-format binary
- Open Qt creator
- Help->About Plugins
- Find
Beautifier
- Check
Beautifier
checkbox - Close dialog and restart QT creator
- In Qt creator Tools->Options->Beautifier->CLang Format
clang-format
executable path:/usr/bin/clang-format-9
- In
Use predefined style
chooseFile
- Go to General Tab
- Check
Enable auto format on file save
- Under
Tool:
selectClangFormat
- Ok
- Put
.clang-format-9
file found in Anticarium_Doc, into your source directory and rename to.clang-format