version fixes

This commit is contained in:
OneOfEleven 2023-09-09 13:01:24 +01:00
parent 6670b47340
commit 2dd6791f7a
5 changed files with 22 additions and 3 deletions

BIN
firmware

Binary file not shown.

Binary file not shown.

Binary file not shown.

19
main.c
View File

@ -36,7 +36,13 @@
#include "ui/lock.h"
#include "ui/welcome.h"
static const char Version[] = "UV-K5 Firmware, v0.01 Open Edition\r\n";
#ifdef GIT_HASH
static const char Version[] = "UV-K5 Firmware, Open Edition, OEFW-"GIT_HASH"\r\n";
#else
#include "version.h"
static const char Version1[] = "UV-K5 Firmware, Open Edition, ";
static const char Version2[] = "\r\n";
#endif
void _putchar(char c)
{
@ -60,7 +66,16 @@ void Main(void)
BOARD_Init();
UART_Init();
UART_Send(Version, sizeof(Version));
#ifdef GIT_HASH
UART_Send(Version, sizeof(Version));
#else
{
UART_Send(Version1, sizeof(Version1));
UART_Send(Version, strlen(Version));
UART_Send(Version2, sizeof(Version2));
}
#endif
// Not implementing authentic device checks

View File

@ -1,2 +1,6 @@
const char Version[] = "OEFW-230909";
#ifdef GIT_HASH
const char Version[] = "OEFW-" GIT_HASH;
#else
const char Version[] = "OEFW-230909";
#endif