added formatting

This commit is contained in:
2025-07-08 16:06:11 +02:00
parent bc327acc41
commit 9b7159d5a4
33 changed files with 685 additions and 615 deletions

View File

@@ -0,0 +1,12 @@
{
"configurations": [
{
"name": "Linux",
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
"cStandard": "c99",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-arm"
}
],
"version": 4
}

View File

@@ -0,0 +1,5 @@
VERSION_MAJOR = 0
VERSION_MINOR = 0
PATCHLEVEL = 1
VERSION_TWEAK = 1
EXTRAVERSION = devel

View File

@@ -1,29 +1,31 @@
#include <zephyr/kernel.h>
#include <zephyr/settings/settings.h>
#include <zephyr/logging/log.h>
#include <app_version.h>
#include <lib/fwu.h>
#include <lib/modbus_server.h>
#include <lib/valve.h>
#include <lib/fwu.h>
#include <app_version.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/settings/settings.h>
LOG_MODULE_REGISTER(main, LOG_LEVEL_INF);
int main(void)
{
LOG_INF("Starting Irrigation System Slave Node version %s (Build version %s)", APP_VERSION_STRING, STRINGIFY(APP_BUILD_VERSION));
int main(void) {
int rc;
LOG_INF("Starting Irrigation System Slave Node version %s (Build version %s)",
APP_VERSION_STRING, STRINGIFY(APP_BUILD_VERSION));
if (settings_subsys_init() || settings_load()) {
LOG_ERR("Settings initialization or loading failed");
}
if (settings_subsys_init() || settings_load()) {
LOG_ERR("Settings initialization or loading failed");
}
valve_init();
fwu_init();
valve_init();
fwu_init();
if (modbus_server_init()) {
LOG_ERR("Modbus RTU server initialization failed");
return 0;
}
LOG_INF("Irrigation System Slave Node started successfully");
return 0;
rc = modbus_server_init();
if (rc < 0) {
LOG_ERR("Modbus RTU server initialization failed");
return 0;
}
LOG_INF("Irrigation System Slave Node started successfully");
return 0;
}