diff --git a/firmware b/firmware index 3ef3834..32be625 100644 Binary files a/firmware and b/firmware differ diff --git a/firmware.bin b/firmware.bin index 2e16b9c..6bc4618 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index a8dc297..60b598d 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ diff --git a/main.c b/main.c index ea34d94..9b2eb85 100644 --- a/main.c +++ b/main.c @@ -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 diff --git a/version.c b/version.c index b938457..0f9496f 100644 --- a/version.c +++ b/version.c @@ -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