mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 03:20:00 +03:00
Redo after rebase
This commit is contained in:
parent
5796be02d9
commit
b124d44336
4 changed files with 9 additions and 5 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 85c98d6a3ca7bb4803b7c978515f1ed47d6949b8
|
||||
Subproject commit 103aaa73056fb502f1adb5f85280b2f75dc8f350
|
|
@ -196,7 +196,9 @@ static const void *cmsx_FirmwareInit(displayPort_t *pDisp)
|
|||
UNUSED(pDisp);
|
||||
|
||||
strncpy(manufacturerId, getManufacturerId(), MAX_MANUFACTURER_ID_LENGTH);
|
||||
manufacturerId[MAX_MANUFACTURER_ID_LENGTH] = 0;
|
||||
strncpy(boardName, getBoardName(), MAX_BOARD_NAME_LENGTH);
|
||||
boardName[MAX_BOARD_NAME_LENGTH] = 0;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,9 @@ void initBoardInformation(void)
|
|||
boardInformationSet = boardConfig()->boardInformationSet;
|
||||
if (boardInformationSet) {
|
||||
strncpy(manufacturerId, boardConfig()->manufacturerId, MAX_MANUFACTURER_ID_LENGTH);
|
||||
manufacturerId[MAX_MANUFACTURER_ID_LENGTH] = 0;
|
||||
strncpy(boardName, boardConfig()->boardName, MAX_BOARD_NAME_LENGTH);
|
||||
boardName[MAX_BOARD_NAME_LENGTH] = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -87,7 +89,7 @@ bool setManufacturerId(const char *newManufacturerId)
|
|||
#if !defined(BOARD_NAME)
|
||||
if (!boardInformationSet || strlen(manufacturerId) == 0) {
|
||||
strncpy(manufacturerId, newManufacturerId, MAX_MANUFACTURER_ID_LENGTH);
|
||||
|
||||
manufacturerId[MAX_MANUFACTURER_ID_LENGTH] = 0;
|
||||
boardInformationWasUpdated = true;
|
||||
|
||||
return true;
|
||||
|
@ -105,7 +107,7 @@ bool setBoardName(const char *newBoardName)
|
|||
#if !defined(BOARD_NAME)
|
||||
if (!boardInformationSet || strlen(boardName) == 0) {
|
||||
strncpy(boardName, newBoardName, MAX_BOARD_NAME_LENGTH);
|
||||
|
||||
boardName[MAX_BOARD_NAME_LENGTH] = 0;
|
||||
boardInformationWasUpdated = true;
|
||||
|
||||
return true;
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
|
||||
typedef struct boardConfig_s {
|
||||
uint8_t signature[SIGNATURE_LENGTH];
|
||||
char manufacturerId[MAX_MANUFACTURER_ID_LENGTH];
|
||||
char boardName[MAX_BOARD_NAME_LENGTH];
|
||||
char manufacturerId[MAX_MANUFACTURER_ID_LENGTH + 1];
|
||||
char boardName[MAX_BOARD_NAME_LENGTH + 1];
|
||||
uint8_t boardInformationSet;
|
||||
uint8_t signatureSet;
|
||||
} boardConfig_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue