feat(app): Integrate application versioning
This commit introduces application versioning, exposing version information through the Modbus server and logging it at startup. - Add to provide version information - Update to log the application version at startup - Update to expose firmware version via Modbus - Add file association for in
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <lib/modbus_server.h>
|
||||
#include <lib/valve.h>
|
||||
#include <lib/fwu.h>
|
||||
#include <app_version.h>
|
||||
|
||||
#include <zephyr/usb/usb_device.h>
|
||||
|
||||
@@ -135,10 +136,10 @@ static int input_reg_rd(uint16_t addr, uint16_t *reg)
|
||||
*reg = fwu_get_last_chunk_crc();
|
||||
break;
|
||||
case REG_INPUT_FIRMWARE_VERSION_MAJOR_MINOR:
|
||||
*reg = (0 << 8) | 0;
|
||||
*reg = (APP_VERSION_MAJOR << 8) | APP_VERSION_MINOR;
|
||||
break;
|
||||
case REG_INPUT_FIRMWARE_VERSION_PATCH:
|
||||
*reg = 2;
|
||||
*reg = APP_PATCHLEVEL;
|
||||
break;
|
||||
default:
|
||||
*reg = 0;
|
||||
|
||||
@@ -52,7 +52,6 @@ void valve_init(void)
|
||||
|
||||
LOG_INF("Valve initialized: max_open=%us, max_close=%us", max_opening_time_s, max_closing_time_s);
|
||||
}
|
||||
}
|
||||
|
||||
void valve_open(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user