Strip tabs and trailing white spaces, and fix end of files (#748)
* format: Strip trailing whitespaces
We want to get rid of trailing whitespaces completly as they make just git
noice. Much better to start using automated tools to get rid of them once and
not getting them back again. This way git history will be cleaner and review
easier.
Commit was generated with:
pre-commit run --all-files trailing-whitespace
* format: Files should have exactly one new line end of them
It is good practice that every file has one new line. It is not now days so
mandatory but it also is not nice if file has lot of newlines end of it. We will
use pre-commit which takes automatically care about this so let's fix all.
Commit was generated with:
pre-commit run --all-files end-of-file-fixer
* format: Convert tabs to spaces
Project mostly use spaces over tabs. When mixing tabs and spaces this usually
makes formatting issues and also when changing those in commits it will make lot
of git noise. We will force spaces most of the time and use pre-commit to fix.
Commit was generated with:
pre-commit run --all-files remove-tabs
---------
Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
This commit is contained in:
+9
-10
@@ -5,7 +5,7 @@ for the eight RGB (red-green-blue) LEDs attached to the Blinkt! card.
|
||||
|
||||
## Installation
|
||||
|
||||
The demo uses pigpiod (Pi GPIO Daemon) and developer library. To install
|
||||
The demo uses pigpiod (Pi GPIO Daemon) and developer library. To install
|
||||
and run the daemon at powerup (and immediately):
|
||||
|
||||
$ sudo apt install libpigpio-dev libpigpiod-if-dev pigpiod
|
||||
@@ -14,12 +14,12 @@ and run the daemon at powerup (and immediately):
|
||||
|
||||
## WiFi Power
|
||||
|
||||
If you are using a Raspberry Pi with WiFi, you will likely want
|
||||
If you are using a Raspberry Pi with WiFi, you will likely want
|
||||
to disable WiFi Power saving. Under Raspberry Pi OS, so the following.
|
||||
|
||||
### Startup service in systemd
|
||||
|
||||
To manage to start programs you should use systemd Unit files.
|
||||
To manage to start programs you should use systemd Unit files.
|
||||
|
||||
File name: /etc/systemd/system/wlan0pwr.service
|
||||
|
||||
@@ -44,9 +44,9 @@ In the empty editor insert these statements, save them and quit the editor:
|
||||
Enable the new service with:
|
||||
|
||||
rpi ~$ sudo systemctl enable wlan0pwr.service
|
||||
|
||||
|
||||
## Building the Blinkt! BACnet Application
|
||||
|
||||
|
||||
Build from the root folder:
|
||||
|
||||
$ make blinkt
|
||||
@@ -59,8 +59,8 @@ Run from the bin/ folder:
|
||||
|
||||
## Blinkt! as a Startup service with systemd
|
||||
|
||||
To manage to start programs you should use systemd Unit files.
|
||||
Here is a very simple template you can use to start to solve your problem.
|
||||
To manage to start programs you should use systemd Unit files.
|
||||
Here is a very simple template you can use to start to solve your problem.
|
||||
Create a new service with:
|
||||
|
||||
rpi ~$ sudo systemctl --full --force edit bacnet.service
|
||||
@@ -81,13 +81,12 @@ Enable the new service after the next reboot with:
|
||||
|
||||
rpi ~$ sudo systemctl enable bacnet.service
|
||||
|
||||
Create your bacnet.sh shell script in your home folder (change from pi if
|
||||
Create your bacnet.sh shell script in your home folder (change from pi if
|
||||
that is not your home folder). Use the shell script to set any environment
|
||||
variables that you want, or configuration settings for the bin/bacblinkt
|
||||
variables that you want, or configuration settings for the bin/bacblinkt
|
||||
application such as a specific device ID.
|
||||
|
||||
A simplistic bacnet.sh script will look like this (with stdout/stderr to /dev/null):
|
||||
|
||||
#!/bin/bash
|
||||
/home/pi/bacnet-stack/bin/bacblinkt 9009 > /dev/null 2>&1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user