mirror of
https://github.com/opentx/opentx.git
synced 2025-07-14 20:10:08 +03:00
Re #3255: UID displayed on VERSION screen (Taranis)
This commit is contained in:
parent
726e32731b
commit
98a7900e70
4 changed files with 19 additions and 0 deletions
|
@ -77,10 +77,16 @@ void menuGeneralVersion(uint8_t event)
|
|||
exit(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (event == EVT_ENTRY) {
|
||||
getCPUUniqueID(reusableBuffer.version.id);
|
||||
}
|
||||
|
||||
SIMPLE_MENU(STR_MENUVERSION, menuTabGeneral, e_Vers, 1);
|
||||
|
||||
lcd_putsLeft(MENU_HEADER_HEIGHT+1, vers_stamp);
|
||||
lcd_putsLeft(MENU_HEADER_HEIGHT+4*FH+1, "UID\037\033:");
|
||||
lcdDrawText(5*FW+3, MENU_HEADER_HEIGHT+4*FH+1, reusableBuffer.version.id);
|
||||
|
||||
lcd_putsLeft(MENU_HEADER_HEIGHT+5*FH+1, STR_EEBACKUP);
|
||||
lcd_putsLeft(MENU_HEADER_HEIGHT+6*FH+1, STR_FACTORYRESET);
|
||||
|
|
|
@ -1560,6 +1560,13 @@ union ReusableBuffer
|
|||
char originalName[SD_SCREEN_FILE_LENGTH+1];
|
||||
} sdmanager;
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
struct
|
||||
{
|
||||
char id[27];
|
||||
} version;
|
||||
#endif
|
||||
};
|
||||
|
||||
extern union ReusableBuffer reusableBuffer;
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
const pm_char date_stamp[] PROGMEM = "DATE" TAB ": " DATE;
|
||||
const pm_char time_stamp[] PROGMEM = "TIME" TAB ": " TIME;
|
||||
const pm_char eeprom_stamp[] PROGMEM = "EEPR" TAB ": " EEPROM_STR;
|
||||
#elif defined(PCBTARANIS)
|
||||
const pm_char vers_stamp[] PROGMEM = "FW\037\033: " "opentx-" FLAVOUR "\036VERS\037\033: " VERSION "\036DATE\037\033: " DATE " " TIME "\036EEPR\037\033: " EEPROM_STR;
|
||||
#else
|
||||
const pm_char vers_stamp[] PROGMEM = "FW\037\033: " "opentx-" FLAVOUR "\036VERS\037\033: " VERSION "\036DATE\037\033: " DATE "\036TIME\037\033: " TIME "\036EEPR\037\033: " EEPROM_STR;
|
||||
#endif
|
||||
|
|
|
@ -41,7 +41,11 @@ void watchdogInit(unsigned int duration)
|
|||
|
||||
void getCPUUniqueID(char * s)
|
||||
{
|
||||
#if defined(SIMU)
|
||||
uint32_t cpu_uid[3] = { 0x12345678, 0xAA55AA55AA, 0x87654321};
|
||||
#else
|
||||
uint32_t * cpu_uid = (uint32_t *)0x1FFF7A10;
|
||||
#endif
|
||||
char * tmp = strAppendUnsigned(s, cpu_uid[0], 8, 16);
|
||||
*tmp = ' ';
|
||||
tmp = strAppendUnsigned(tmp+1, cpu_uid[1], 8, 16);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue