Hi everyone,
Few days ago, I created a config that was just a smidge above flash memory, having already disabled in Arduino “WebUSB” & “MassStorage”, all that I had left was to use #define DISABLE_TALKIE
(I am aware of the ProffieOS Documentation: Saving FLASH Memory page, I believe I have done all that already)
I could have disabled in Arduine Serial and use “No USB” instead but I was worried it would affect serial monitor access and/or future config upload “easyness” (I prefer not to have to push boot & reset if I don’t have to). I wanted serial monitor so I didn’t try it.
I was a bit shocked/baffled that my config went from “a smidge above max” (a few 100 bytes) to 96% of flash memory used on a Proffie v2.2, that’s at least another preset. And I always say “The more preset, the more better!”
Of course, I had to have a typo in one of my font folder names , and for the life of me, I was unable to decode the beep error (thank you serial monitor for the text error message) without the talkies (I couldn’t tell if it was “error_in_font_directory” or “font_directory_not_found”, because I do not have “musical” ears). So obviously I would like to keep some talkies but not all of them!
I was wondering, what would it take to reduce the memory that talkies need ? After a quick Github Master search, I found where all the Talkies were used/hidden:
I am personally only interested to keep:
- sd_card_not_found
- font_directory_not_found
- error_in_font_directory
But I would like to shorten them like this (with matching audio):
- no_sd
- no_font
- font_error
I have already replaced all the “battery level talkies” in my props with sound_library_.SayBatteryPercent()
, sound_library_.SayBatteryVolts()
or my personal favorite sound_library_.SayBatteryPercentVolts()
(a personal addition in my OS, because why choose or having to remember pointing up or down when you can have both pointing anywhere? ). I find it a lot clearer than the male or female talkie voice and it is customizable with all the available voicepacks (thanks to @NoSloppy).
For the “low_battery” error, that shouldn’t be a problem since I have a lowbatt.wav in my common. Right ?
For the “error_in_blade_array”, is that something that can still happen with Proffie OS7.15/8.x ? Wouldn’t this cause a compile error before ever being loaded on a Proffieboard ?
Part of the code for “error_in_preset_array” can still be found in ../sound/voice_data.h
(line 686) where I also found a lot of words that are not relevant to lightsabers (but they are relevant in aviation ). Would commenting those words out reduce the size of Talkies ? I’ll go through them one by one.
I was thinking to guard everything else than errors 1,2 & 3 above behind an #ifndef KEEP_MINIMUM_TALKIES_ONLY
And then there is ../sound/talkies.h
? What could be “trimmed” or hidden behind #ifndef KEEP_MINIMUM_TALKIES_ONLY
?
What are those #define TI_0280_PATENT_ENERGY
, #define TI_028X_LATER_ENERGY
, #define TI_0280_2801_PATENT_PITCH
, … tables for ?
I am willing to do the work even if it might be long, slow and frustrating. I would love to reduce talkies from 3-4% down to around 1%, if possible ?
Anybody else interested in my potential findings? Or has this been attempted and this is already the best we can get?