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:
@@ -26,7 +26,7 @@ The sample can be built for several platforms.
|
||||
QEMU testing
|
||||
************
|
||||
|
||||
The main logic of work can be found at the link
|
||||
The main logic of work can be found at the link
|
||||
https://docs.zephyrproject.org/3.0.0/guides/networking/qemu_setup.html
|
||||
|
||||
Steps to testing
|
||||
@@ -38,7 +38,7 @@ Steps to testing
|
||||
first: cd ~/net-tools && ./loop-socat.sh
|
||||
second: cd ~/net-tools && sudo ./loop-slip-tap.sh
|
||||
3 Configure prj.conf
|
||||
The net-tools creates and uses network 192.0.2.0/24 as `tap0` interface.
|
||||
The net-tools creates and uses network 192.0.2.0/24 as `tap0` interface.
|
||||
Need change prj.conf:
|
||||
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
|
||||
CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.2"
|
||||
|
||||
@@ -47,7 +47,7 @@ static void BACnet_Smart_Sensor_Init_Handler(void *context)
|
||||
Analog_Input_Create(Sensor_Instance);
|
||||
Analog_Input_Name_Set(Sensor_Instance, "Sensor");
|
||||
Analog_Input_Present_Value_Set(Sensor_Instance, 25.0f);
|
||||
LOG_INF("BACnet Device ID: %u", Device_Object_Instance_Number());
|
||||
LOG_INF("BACnet Device ID: %u", Device_Object_Instance_Number());
|
||||
/* start the seconds cyclic timer */
|
||||
mstimer_set(&Sensor_Update_Timer, 1000);
|
||||
srand(sys_rand32_get());
|
||||
@@ -78,9 +78,9 @@ static void BACnet_Smart_Sensor_Task_Handler(void *context)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
LOG_INF("\n*** BACnet Profile B-SS Sample ***\n");
|
||||
LOG_INF("BACnet Stack Version " BACNET_VERSION_TEXT);
|
||||
LOG_INF("BACnet Stack Max APDU: %d", MAX_APDU);
|
||||
LOG_INF("\n*** BACnet Profile B-SS Sample ***\n");
|
||||
LOG_INF("BACnet Stack Version " BACNET_VERSION_TEXT);
|
||||
LOG_INF("BACnet Stack Max APDU: %d", MAX_APDU);
|
||||
bacnet_basic_init_callback_set(BACnet_Smart_Sensor_Init_Handler, NULL);
|
||||
bacnet_basic_task_callback_set(BACnet_Smart_Sensor_Task_Handler, NULL);
|
||||
/* work happens in server module */
|
||||
|
||||
Reference in New Issue
Block a user