Skip to content
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

Enable supply for AUX1 / AUX2 (TX16S) does not work after off/on #4632

Closed
1 task done
wimalopaan opened this issue Feb 13, 2024 · 6 comments
Closed
1 task done

Enable supply for AUX1 / AUX2 (TX16S) does not work after off/on #4632

wimalopaan opened this issue Feb 13, 2024 · 6 comments
Labels
bug 🪲 Something isn't working
Milestone

Comments

@wimalopaan
Copy link
Contributor

wimalopaan commented Feb 13, 2024

Is there an existing issue for this problem?

  • I have searched the existing issues

What part of EdgeTX is the focus of this bug?

Transmitter firmware

Current Behavior

Switching on the supply for AUX1/AUX2 under system->hardware works. But if the radio is then switched off and then on again, the supply for AUX1/AUX2 is not on, altough the toggle button in the UI is on. One has to de/activate the supply to turn it on again.

Expected Behavior

After power-cycle of the radio the supply for AUX1/AUX2 is on if the UI-button is also on.

Steps To Reproduce

Turn on supply for AUX1.
Measure on supply-pin of AUX1 to verify.
Power-cycle the radio.
Measure on supply-pin again.

Version

Nightly (Please give date/commit below)

Transmitter

RadioMaster TX16S / TX16SMK2

Operating System (OS)

No response

OS Version

No response

Anything else?

No response

@wimalopaan wimalopaan added bug 🪲 Something isn't working triage Bug report awaiting review / sorting labels Feb 13, 2024
@pfeerick
Copy link
Member

pfeerick commented Feb 13, 2024

What mode do you have AUX1 configured in? As I don't seem to be able to reproduce this.

With AUX2, it appears to only happen when set to OFF or "Telemetry In" ... all the other modes appear to honour the power setting.

Are you using a recent bootloader? As IIRC there was a change in the bootloader back when the power switching toggles were added, which may have some impact here.

@pfeerick pfeerick removed the triage Bug report awaiting review / sorting label Feb 13, 2024
@wimalopaan
Copy link
Contributor Author

wimalopaan commented Feb 14, 2024

I'm using the actual 07e0bfa git version. And flashed also the bootloader to this version.

I'm using "Telemetry In" at AUX2: in this mode the power supply turns not on, but - you are right - switching e.g. to "LUA" mode the power supply turn on on powercycle the radio.

@pfeerick
Copy link
Member

Thanks for the confirm, looks like we're seeing the exact same behaviour then.

Tracing back through the code, all that I think of so far is this check (or the serialSetPowerState() function itself) as a possible culprit as initSerialPorts() is responsible for initialising all the serial ports at boot, calls serialInit() to initialise each port (including power state if it is controllable) as needed, but the call to serialSetPowerState() then has a limiter on it. We know that serialSetPower() works as it is what is called when you flip the toggles in the Radio Settings -> Hardware page. Which makes this even more fun because it calls serialSetPowerState() itself, suggesting that function does work... What a rabbit hole! Guess will need the debugger for this one 🤣

edgetx/radio/src/serial.cpp

Lines 477 to 478 in 07e0bfa

if (port_nr < SP_VCP)
serialSetPowerState(port_nr);

@pfeerick pfeerick added this to the 2.11 milestone Mar 4, 2024
@gagarinlg
Copy link
Member

@wimalopaan is this still an issue?

@3djc
Copy link
Collaborator

3djc commented Jan 24, 2025

I remember fixing it, and just tested, seems ok, closing, please @wimalopaan reopen if you think I got it wrong

@3djc 3djc closed this as completed Jan 24, 2025
@wimalopaan
Copy link
Contributor Author

There is still one quirk:

regardless of the setting AUXx Power on/off the power turns on, if you switch on the radio and have the power-button of the radio down. After the min. holding-time (1sec in my case) the power of the USB turns off, and the remains off or gets on, when the first confirm-button (if any) pops up.

But maybe this is a HW issue due to missing/wrong pullup/down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants