The LIS2DH12 driver performed an unnecessary endianness conversion, as
data from the sensor was already coming in little-endian format. The
MMA8652FC driver is now using the rev16 opcode to perform the swap
rather than doing all the bitshuffling operations in multiple steps.
Made the display on/off mechanism a bit more self-descriptive by
replacing bare true/false values with an enum with more appropriate
value names. OLED automatic turn-off logic has been cleaned up,
along with minor updates to the OLED initialisation sequence.
The highest version of bash shipped by vanilla macOS is 3.2, and it will
stay like that for the foreseeable future (bash being removed as default
in 10.15 is a strong indicator for that).
The build.sh script used Bash 4.x syntax for enumerating available
translations - this patch dials back the clock to Bash 3.x making things
work again on macOS and (hopefully) still maintaining functionality on
other platforms that use a newer version of bash.
I suspect that since -flto was added listing generation wasn't working.
-ffat-lto-objects allows tools like objdump to still work by including
both the internal compiler representation (for LTO) and generated code
in the .o files. It increases the compile time from 12s to 17s on my
machine but I think it is small enough cost for the benefit.
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
License: MIT
* [Build script] Detect languages with translation_*.json files
* [Build script] Swap model and language in the build loop to avoid full rebuild
* [Build script] Cleaning potential bugs according ShellCheck
* [Build script] Rewrite AVAILABLE_LANGUAGES calculation with @vomindoraan help
* Tweak Serbian translations
* Add "cyrillicGlyphs": true to translations that use Cyrillic
* translation_cs_cz.json → translation_cs.json
The correct language code for Czech is CS; CZ is the country code
* Add "cyrillicGlyphs": false to other translations, move "languageLocalName" to top
Also change BG and HU "localLanguageName" to start with a capital letter
* Add missing "languageLocalName" field for Slovak
* Rearrange a few fields so they're in the same order for all languages
* Regenerate translations source file
* Portugues → Português
* translation_dk.json → translation_da.json
DA is the ISO 639-1 code for Danish
* translation_ua.json → translation_uk.json
UK is the ISO 639-1 code for Ukrainian
* Update language codes in build.sh