diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 478f8b5c1..952a447d1 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -988,19 +988,21 @@ void checkSDVersion() FIL versionFile = {0}; UINT read = 0; char version[sizeof(REQUIRED_SDCARD_VERSION)-1]; + char error[sizeof(TR_WRONG_SDCARDVERSION)+ sizeof(version)]; + strAppend(strAppend(error, STR_WRONG_SDCARDVERSION, sizeof(TR_WRONG_SDCARDVERSION)), REQUIRED_SDCARD_VERSION, sizeof(REQUIRED_SDCARD_VERSION)); FRESULT result = f_open(&versionFile, "/opentx.sdcard.version", FA_OPEN_EXISTING | FA_READ); if (result == FR_OK) { if (f_read(&versionFile, &version, sizeof(version), &read) != FR_OK || read != sizeof(version) || strncmp(version, REQUIRED_SDCARD_VERSION, sizeof(version)) != 0) { TRACE("SD card version mismatch: %.*s, %s", sizeof(REQUIRED_SDCARD_VERSION)-1, version, REQUIRED_SDCARD_VERSION); - ALERT(STR_SD_CARD, STR_WRONG_SDCARDVERSION, AU_ERROR); + ALERT(STR_SD_CARD, error, AU_ERROR); } f_close(&versionFile); } else { - ALERT(STR_SD_CARD, STR_WRONG_SDCARDVERSION, AU_ERROR); + ALERT(STR_SD_CARD, error, AU_ERROR); } } } diff --git a/radio/src/translations/cz.h.txt b/radio/src/translations/cz.h.txt index 74f60b0e0..39199ab59 100644 --- a/radio/src/translations/cz.h.txt +++ b/radio/src/translations/cz.h.txt @@ -931,7 +931,7 @@ #define TR_ALARMSWARN "ALARMU" #define TR_SWITCHWARN "POZICE" #define TR_FAILSAFEWARN "FAILSAFE" -#define TR_WRONG_SDCARDVERSION "Chybná verze souborů na kartě" +#define TR_WRONG_SDCARDVERSION "Doporučená ver.: " #define TR_WRONG_PCBREV "Jiná verze PCB/firmware" #define TR_EMERGENCY_MODE "NOUZOVÝ REŽIM" #define TR_PCBREV_ERROR "PCB error" diff --git a/radio/src/translations/de.h.txt b/radio/src/translations/de.h.txt index 19a53d062..7ff567922 100644 --- a/radio/src/translations/de.h.txt +++ b/radio/src/translations/de.h.txt @@ -934,7 +934,7 @@ #define TR_ALARMSWARN "ALARM" #define TR_SWITCHWARN "SCHALTER" #define TR_FAILSAFEWARN "FAILSAFE" -#define TR_WRONG_SDCARDVERSION "Wrong files version" +#define TR_WRONG_SDCARDVERSION "Expected version: " #define TR_WRONG_PCBREV "Wrong PCB detected" #define TR_EMERGENCY_MODE "EMERGENCY MODE" #define TR_PCBREV_ERROR "PCB error" diff --git a/radio/src/translations/en.h.txt b/radio/src/translations/en.h.txt index 275d113d6..416f0e51d 100644 --- a/radio/src/translations/en.h.txt +++ b/radio/src/translations/en.h.txt @@ -900,7 +900,7 @@ #define TR_ALARMSWARN "ALARMS" #define TR_SWITCHWARN TR("SWITCH", "CONTROL") #define TR_FAILSAFEWARN "FAILSAFE" -#define TR_WRONG_SDCARDVERSION "Wrong files version" +#define TR_WRONG_SDCARDVERSION "Expected version: " #define TR_WRONG_PCBREV "Wrong PCB detected" #define TR_EMERGENCY_MODE "EMERGENCY MODE" #define TR_PCBREV_ERROR "PCB error" diff --git a/radio/src/translations/es.h.txt b/radio/src/translations/es.h.txt index c227339cb..cb5271729 100644 --- a/radio/src/translations/es.h.txt +++ b/radio/src/translations/es.h.txt @@ -879,7 +879,7 @@ #define TR_ALARMSWARN "ALARMAS" #define TR_SWITCHWARN "INTERPTOR" #define TR_FAILSAFEWARN "FAILSAFE" -#define TR_WRONG_SDCARDVERSION "Wrong files version" +#define TR_WRONG_SDCARDVERSION "Expected version: " #define TR_WRONG_PCBREV "Wrong PCB detected" #define TR_EMERGENCY_MODE "EMERGENCY MODE" #define TR_PCBREV_ERROR "PCB error" diff --git a/radio/src/translations/fi.h.txt b/radio/src/translations/fi.h.txt index 1b176109c..822fc63e4 100644 --- a/radio/src/translations/fi.h.txt +++ b/radio/src/translations/fi.h.txt @@ -879,7 +879,7 @@ #define TR_ALARMSWARN "ALARMS" #define TR_SWITCHWARN TR("SWITCH","CONTROL") #define TR_FAILSAFEWARN "FAILSAFE" -#define TR_WRONG_SDCARDVERSION "Wrong files version" +#define TR_WRONG_SDCARDVERSION "Expected version: " #define TR_WRONG_PCBREV "Wrong PCB detected" #define TR_EMERGENCY_MODE "EMERGENCY MODE" #define TR_PCBREV_ERROR "PCB error" diff --git a/radio/src/translations/fr.h.txt b/radio/src/translations/fr.h.txt index ccff7aec4..6c9a9929f 100644 --- a/radio/src/translations/fr.h.txt +++ b/radio/src/translations/fr.h.txt @@ -911,7 +911,7 @@ #define TR_ALARMSWARN "SON" #define TR_SWITCHWARN TR("INTERS","CONTROLES") #define TR_FAILSAFEWARN "FAILSAFE" -#define TR_WRONG_SDCARDVERSION "Version des fichiers incompatible" +#define TR_WRONG_SDCARDVERSION "Version requise : " #define TR_WRONG_PCBREV "Wrong PCB detected" #define TR_EMERGENCY_MODE "EMERGENCY MODE" #define TR_PCBREV_ERROR "PCB error" diff --git a/radio/src/translations/it.h.txt b/radio/src/translations/it.h.txt index 2b90e3bb7..3e4e5e784 100644 --- a/radio/src/translations/it.h.txt +++ b/radio/src/translations/it.h.txt @@ -914,7 +914,7 @@ #define TR_ALARMSWARN "ALLARMI" #define TR_SWITCHWARN "CONTROLLI" #define TR_FAILSAFEWARN "FAILSAFE" -#define TR_WRONG_SDCARDVERSION "Wrong files version" +#define TR_WRONG_SDCARDVERSION "Expected version: " #define TR_WRONG_PCBREV "Wrong PCB detected" #define TR_EMERGENCY_MODE "EMERGENCY MODE" #define TR_PCBREV_ERROR "PCB error" diff --git a/radio/src/translations/nl.h.txt b/radio/src/translations/nl.h.txt index 673525d17..62fdcefb4 100644 --- a/radio/src/translations/nl.h.txt +++ b/radio/src/translations/nl.h.txt @@ -908,7 +908,7 @@ #define TR_ALARMSWARN "ALARM" #define TR_SWITCHWARN "SCHAKELAAR" #define TR_FAILSAFEWARN "FAILSAFE" -#define TR_WRONG_SDCARDVERSION "Verkeerde versie van bestanden" +#define TR_WRONG_SDCARDVERSION "Expected version: " #define TR_WRONG_PCBREV "Verkeerde PCB gedetecteerd" #define TR_EMERGENCY_MODE "EMERGENCY MODE" #define TR_PCBREV_ERROR "PCB fout" diff --git a/radio/src/translations/pl.h.txt b/radio/src/translations/pl.h.txt index 175543acf..49c7e67e9 100644 --- a/radio/src/translations/pl.h.txt +++ b/radio/src/translations/pl.h.txt @@ -916,7 +916,7 @@ #define TR_ALARMSWARN "ALARM" #define TR_SWITCHWARN TR("Przełą","Kontrola") #define TR_FAILSAFEWARN "FAILSAFE" -#define TR_WRONG_SDCARDVERSION "Wrong files version" +#define TR_WRONG_SDCARDVERSION "Expected version: " #define TR_WRONG_PCBREV "Wrong PCB detected" #define TR_EMERGENCY_MODE "EMERGENCY MODE" #define TR_PCBREV_ERROR "PCB error" diff --git a/radio/src/translations/pt.h.txt b/radio/src/translations/pt.h.txt index a350e3ec2..703aa714e 100644 --- a/radio/src/translations/pt.h.txt +++ b/radio/src/translations/pt.h.txt @@ -874,7 +874,7 @@ #define TR_ALARMSWARN "ALARMES" #define TR_SWITCHWARN "CHAVES" #define TR_FAILSAFEWARN "FAILSAFE" -#define TR_WRONG_SDCARDVERSION "Wrong files version" +#define TR_WRONG_SDCARDVERSION "Expected version: " #define TR_WRONG_PCBREV "Wrong PCB detected" #define TR_EMERGENCY_MODE "EMERGENCY MODE" #define TR_PCBREV_ERROR "PCB error" diff --git a/radio/src/translations/se.h.txt b/radio/src/translations/se.h.txt index 6266b7c93..c44309d40 100644 --- a/radio/src/translations/se.h.txt +++ b/radio/src/translations/se.h.txt @@ -928,7 +928,7 @@ #define TR_SWITCHWARN "BRYTARE" #define TR_FAILSAFEWARN "FAILSAFE" #define TR_SDCARDVERSIONWARN "SD Card Check" -#define TR_WRONG_SDCARDVERSION "Wrong SDCARD file version" +#define TR_WRONG_SDCARDVERSION "Expected version: " #define TR_WRONG_PCBREV "Wrong PCB detected" #define TR_EMERGENCY_MODE "EMERGENCY MODE" #define TR_PCBREV_ERROR "PCB error" diff --git a/tools/nightly22/build-sdcard.sh b/tools/nightly22/build-sdcard.sh index 80d985cab..b8743f8ef 100755 --- a/tools/nightly22/build-sdcard.sh +++ b/tools/nightly22/build-sdcard.sh @@ -7,8 +7,10 @@ workdir=/home/opentx/nightly22 output=/var/www/html/2.2/nightly # Handle opentx.sdcard.version -grep 'set(SDCARD_REVISION' ${workdir}/code/CMakeLists.txt | grep -o '".*"' | sed 's/"//g' > ${workdir}/code/radio/sdcard/horus/opentx.sdcard.version -grep 'set(SDCARD_REVISION' ${workdir}/code/CMakeLists.txt | grep -o '".*"' | sed 's/"//g' > ${workdir}/code/radio/sdcard/taranis/opentx.sdcard.version +sdcard_version="2.2V"+$(grep 'set(SDCARD_VERSION' ${workdir}/code/CMakeLists.txt | grep -o '".*"' | sed 's/"//g') +echo $sdcard_version > ${workdir}/code/radio/sdcard/horus/opentx.sdcard.version +echo $sdcard_version > ${workdir}/code/radio/sdcard/taranis/opentx.sdcard.version + if cmp --silent ${workdir}/code/radio/sdcard/horus/opentx.sdcard.version ${workdir}/opentx.sdcard.version then exit @@ -41,6 +43,8 @@ else rm -f ${output}/sdcard/*.zip cd ${workdir}/sdcard/taranis && zip -r ${output}/sdcard/sdcard-taranis.zip * cd ${workdir}/sdcard/horus && zip -r ${output}/sdcard/sdcard-horus.zip * + mv ${output}/sdcard/sdcard-horus.zip ${output}/sdcard/sdcard-horus-$sdcard_version.zip + mv ${output}/sdcard/sdcard-taranis.zip ${output}/sdcard/sdcard-taranis-$sdcard_version.zip rm -Rf ${workdir}/sdcard fi