app versioning/deployment
This commit is contained in:
9
source/application/include/version.h
Normal file
9
source/application/include/version.h
Normal file
@@ -0,0 +1,9 @@
|
||||
/* Release number include file */
|
||||
|
||||
#ifndef VERSION_H
|
||||
#define VERSION_H
|
||||
|
||||
#define MAJOR_VERSION "unknown"
|
||||
#define MINOR_VERSION "unknown"
|
||||
#define BUILD_NUMBER "unknown"
|
||||
#endif /* VERSION_H */
|
@@ -11,6 +11,7 @@
|
||||
#include "driver.h"
|
||||
#include "shell.h"
|
||||
#include "drive_ctrl.h"
|
||||
#include "version.h"
|
||||
|
||||
static void *drive_turn_right_cb(const char *param);
|
||||
static void *drive_turn_left_cb(const char *param);
|
||||
@@ -19,6 +20,13 @@ static void *drive_retard_cb(const char *param);
|
||||
static void *drive_halt_cb(const char *param);
|
||||
static void *drive_forward_cb(const char *param);
|
||||
static void *drive_backward_cb(const char *param);
|
||||
static void *app_version(const char *param);
|
||||
|
||||
static struct command drive_forward = {
|
||||
.command = "version",
|
||||
.description = "Get application version.",
|
||||
.command_callback = app_version,
|
||||
};
|
||||
|
||||
static struct command drive_forward = {
|
||||
.command = "f",
|
||||
@@ -150,3 +158,18 @@ static void *drive_backward_cb(const char *param)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *app_version(const char *param)
|
||||
{
|
||||
#if 0
|
||||
char *greeter = "engine_control version: ";
|
||||
|
||||
drv_write(shell_object.shell_device, greeter, strlen(greeter));
|
||||
drv_write(shell_object.shell_device, MAJOR_VERSION, strlen(MAJOR_VERSION));
|
||||
drv_write(shell_object.shell_device, ".", 1);
|
||||
drv_write(shell_object.shell_device, MINOR_VERSION, strlen(MINOR_VERSION));
|
||||
drv_write(shell_object.shell_device, ".", 1);
|
||||
drv_write(shell_object.shell_device, BUILD_NUMBER, strlen(BUILD_NUMBER));
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user