added formatting
This commit is contained in:
12
software/apps/slave_node/.vscode/c_cpp_properties.json
vendored
Normal file
12
software/apps/slave_node/.vscode/c_cpp_properties.json
vendored
Normal 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
|
||||
}
|
||||
5
software/apps/slave_node/VERSION
Normal file
5
software/apps/slave_node/VERSION
Normal file
@@ -0,0 +1,5 @@
|
||||
VERSION_MAJOR = 0
|
||||
VERSION_MINOR = 0
|
||||
PATCHLEVEL = 1
|
||||
VERSION_TWEAK = 1
|
||||
EXTRAVERSION = devel
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user