OpenI6X / opentx

OpenTX for FlySky FS-i6X
GNU General Public License v2.0
169 stars 41 forks source link

Possibility to complete disable CROSSFIRE / ELRS V2 / EXT-MODULE #176

Open wimalopaan opened 2 years ago

wimalopaan commented 2 years ago

To rediuce the flash and RAM size it should be possible to completely disable these two features.

I think this would be a good feature for user that do use the radios in a classical way.

ajjjjjjjj commented 2 years ago

Elrs is already isolated, don't know about crossfire for sure. What do you want that space to be used for?

wimalopaan commented 2 years ago

As I understand, ELRS need CRSF. I just found, that deactivating PCBI6X_ELRSV2 does not remove the calls to the elrs/crsf stuff. So removing elrsV2.cpp and crossfire.cpp leads to undefined references.

The idea behind removing the support for ext. module was just, that there is no ext. module bay. So using an external module need some (minor) HW mod (at least find the pins), and that makes it the same king of mod as soldering an BT module. I have some code I want to use for a simple protocol for the HolyBro SikV3 Modem.

ajjjjjjjj commented 2 years ago

PCBI6X_ELRSV2 removes all elrsv2 hooks for sure. CROSSFIRE define should also work. You may want to disable PCBI6X_USB_MSD which is also very resource consuming + remove declaration of uint8_t MSC_BOT_Data[MSC_MEDIA_PACKET] to save 0,5KB RAM. No need to delete files. Full screen channels monitor is using about 1KB of FLASH space, can be define guarded.

How much space are you looking for?

wimalopaan commented 2 years ago

Maybe you might habe a look a #178

Flash used: 113040 / 131072 (86%), left: 18032 RAM used: 15620 / 16384 (95%), left: 764