edgetx icon indicating copy to clipboard operation
edgetx copied to clipboard

Issue with EM handling in main

Open 3djc opened this issue 1 year ago • 7 comments

Is there an existing issue for this problem?

  • [X] I have searched the existing issues

What part of EdgeTX is the focus of this bug?

Transmitter firmware

Current Behavior

After EM happens, SD is mounted, sound is available, I guess LUA possibly too

Expected Behavior

In EM reboot mode, SD must stay unmounted, to prevent entering a EM loop sequence

Steps To Reproduce

Trigger EM on a debug build

Version

Nightly (Please give date/commit below)

Transmitter

Other (Please specify below)

Operating System (OS)

No response

OS Version

No response

Anything else?

Found this testing future hardware, but the issue is not hardware related. I have seen it in BW, I have not checked colorlcd (nor have I tested 2.10). I will not be able to work on this for at least 5 or 6 weeks

3djc avatar Oct 12 '24 07:10 3djc

Are you building without RTC_BACKUP_RAM set?

Looking at the code the behaviour you describe would only happen if RTC_BACKUP_RAM is not defined.

philmoz avatar Oct 12 '24 07:10 philmoz

Is it not defaulted for all radio ? I'm at least not excluding it

3djc avatar Oct 12 '24 08:10 3djc

It should be; but looking at the code this is the only reason I can see why the SD would be mounted.

philmoz avatar Oct 12 '24 08:10 philmoz

Tested Boxer, same issue, so my guess it affect all BW radios

3djc avatar Oct 15 '24 08:10 3djc

It would appear the RTC_BACKUP_RAM is not defined for B&W radios. It looks the same in OpenTX.

Since there is no backup what else can EM do; but load the model settings from the SD card?

philmoz avatar Oct 15 '24 08:10 philmoz

Yeah but OTX had models in eeprom. The issue is you can run into boot loops if the source of the EM is sd card related. Need to assess what we can do, maybe limit sd access to bare minimum.

Also, many new BW are using F4, need to check if the rtc register are available on those

3djc avatar Oct 15 '24 10:10 3djc

I have successfully run RTC_BACKUP_RAM based EM on a RM Boxer, will do a PR for BW F4 when I'm physically capable

3djc avatar Oct 16 '24 08:10 3djc