-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A possible way to reduce code size #931
Comments
There is, and I'll get to it, eventually. |
Alas, I expect it won't save a heck of a lot of space, but I'm currently working on a major re-write of the A/C stuff just to save ~1K of space (and to produce safer/cleaner code). I want to add Internationalisation support too, which will probably happen at the same time. |
Just a FYI update. I've started work on this but it will have to wait till #934 is merged to reduce a "merge conflict hell". i.e. This isn't forgotten. |
Progress update. I've completed most of the work for it. I've got a few more cosmetic/practical stuff to do yet which shouldn't affect the resulting binary size etc. The changes save about 1.5k+. Which honestly was more than I was expecting. However, it breaks the use of |
* Create a framework for doing internationalisation(i18n). * Centralise strings to `IRtext`. Saves approximately 1.5k+ of prog space. * Add linter coverage to src/locale. * Clean up/standardise text in for some A/Cs * Add `modelToStr()` & `addDayToString()` functions. * Change `IRrecvDumpV2` behaviour o Remove displaying the legacy "Raw Data" dump. Just rely on the `uint16_t rawData[]` output. o i18n the text in the example code. * More string consolidation. * Remove F() around `IRtext` strings as it causes the compiler to berk whan built under the Arduino platform. * Use a stardard default for i18n text. (locale/defaults.h) * Change the language specific header files to be simple overrides of `defaults.h` * Enforce `en_AU` as the default in the Unit Test environment. Fixes #931
* Create a framework for doing internationalisation(i18n). * Centralise strings to `IRtext`. Saves approximately 1.5k+ of prog space. * Add linter coverage to `src/locale`. * Clean up/standardise text for A/Cs. * Add `modelToStr()` & `addDayToString()` functions. * Change `IRrecvDumpV2` behaviour * Remove displaying the legacy "Raw Data" dump. Just rely on the `uint16_t rawData[]` output. * i18n the text in the example code. * More string consolidation. * Remove `F()` around `IRtext` strings as it causes the compiler to berk when built under the Arduino platform. * Use a standard default for i18n text. (`locale/defaults.h`) * Change the language specific header files to be simple overrides of `defaults.h` * Enforce `en_AU` as the default in the Unit Test environment. Fixes #931
@jimmys01 FYI, the changes mention above have been included in the v2.7.0 release of the library. |
Through the code there are multiple uses of the words "Max" "Min" "Auto" "Toggle" "Off" etc.
Perhaps there is a way to make the 30 instances of "OFF" to just occupy 1 * sizeof("OFF") and not 30 * sizeof("OFF")?
The text was updated successfully, but these errors were encountered: