Build strings for hardware type

This commit is contained in:
David Kuder 2023-04-16 23:18:38 -04:00
parent 55d2dfa988
commit 1bfe6296b6
3 changed files with 18 additions and 11 deletions

View File

@ -2,3 +2,16 @@
#define BUILDID 0x0171
#define BUILDSTR " 3 Apr 2023 Build 0171"
#ifdef ANALOG_GS
#define HWSTRING " V2 Analog GS Rev1"
#define HWBYTE 'G'
#define HWREV '1'
#elif defined(ANALOG_WIFI)
#define HWSTRING " V2 Analog WiFi Rev1"
#define HWBYTE 'W'
#define HWREV '1'
#else
#define HWSTRING " V2 Analog LC Rev1"
#define HWBYTE 'L'
#define HWREV '1'
#endif

View File

@ -726,16 +726,10 @@ void DELAYED_COPY_CODE(config_handler)() {
case 'h':
// Identify Hardware Type
retval = REPLY_OK;
config_rpybuf[rs++] = 0x02; // V2 Retro Computing
#ifdef ANALOG_GS
// AnalogGS Rev 1
config_rpybuf[rs++] = 'G';
config_rpybuf[rs++] = '1';
#else
// Analog Rev 1
config_rpybuf[rs++] = 'A';
config_rpybuf[rs++] = '1';
#endif
config_rpybuf[rs++] = 0x02; // V2 Retro Computing
config_rpybuf[rs++] = 'A'; // V2 Analog
config_rpybuf[rs++] = HWBYTE; // 'G'S / 'W'ifi / 'L'C
config_rpybuf[rs++] = HWREV; // '1'
break;
case 'd':

View File

@ -16,7 +16,7 @@ char __attribute__((section(".uninitialized_data."))) error_message[32*24+1];
void DELAYED_COPY_CODE(render_test_init)() {
memset(error_message, ' ', 32*24);
memcpy(error_message + 0, "HARDWARE: V2 Analog Rev1", 32);
memcpy(error_message + 0, "HARDWARE: " HWSTRING, 32);
memcpy(error_message + 32, "FIRMWARE: " BUILDSTR, 32);
memcpy(error_message + 128, " Copyright (C) 2022-2023 ", 32);