1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-15 04:15:26 +03:00

Bsongis/x9d+ 2019 (#6588)

X9D+ 2019 added
This commit is contained in:
Bertrand Songis 2019-07-26 19:18:29 +02:00 committed by GitHub
parent 37e1e0ef33
commit 151827ada5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 704 additions and 321 deletions

View file

@ -56,23 +56,24 @@ __SECTION_USED(".bootversiondata") const char boot_version[] = "opentx-" FLA
* Tries to find opentx version in the first 1024 byte of either firmware/bootloader (the one not running) or the buffer
* @param buffer If non-null find the firmware version in the buffer instead
*/
const char* getOtherVersion(char* buffer)
const char * getOtherVersion(char* buffer)
{
#if defined(BOOT)
const char* startother = (char*)(FIRMWARE_ADDRESS+BOOTLOADER_SIZE);
const char * startother = (char*)(FIRMWARE_ADDRESS+BOOTLOADER_SIZE);
#else
const char* startother = (char*)(FIRMWARE_ADDRESS);
const char * startother = (char*)(FIRMWARE_ADDRESS);
#endif
if (buffer != nullptr)
startother=buffer;
startother = buffer;
const char* other_str = nullptr;
for (int i=0; i< 1024;i++) {
if (memcmp(startother+i, "opentx-", 7)==0) {
const char * other_str = nullptr;
for (int i=0; i<1024;i++) {
if (memcmp(startother+i, "opentx-", 7) == 0) {
other_str = startother + i;
break;
}
}
if (other_str != nullptr)
return other_str;
else