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

Implement channel_uses_aux() (Fixes issue #29) #33

Open
wants to merge 34 commits into
base: trunk
Choose a base branch
from

Conversation

SiteRelEnby
Copy link
Contributor

Define when a channel needs to use aux LEDs as part of its operation, allowing that channel to block RGB voltage when on if configured.

Fixes: #29

Define when a channel needs to use aux LEDs as part of its operation,
allowing that channel to block RGB voltage when on if configured.
@gretel
Copy link

gretel commented Dec 21, 2023

werks great for me, thanks. looks like pull request are not going to be merged though.

@SiteRelEnby
Copy link
Contributor Author

Not going to be merged why?

@gretel
Copy link

gretel commented Dec 21, 2023

Not going to be merged why?

i dont know.

@diRk262
Copy link

diRk262 commented Dec 30, 2023

So @gretel if pull requests doesn't get merged, how can I get the latest firmware from 2023-12-03 with this fix included? I am not able to complle it on my own 🫣

@SiteRelEnby
Copy link
Contributor Author

@diRk262 Which build targets do you need it for? I can build it.

@SiteRelEnby
Copy link
Contributor Author

SiteRelEnby commented Dec 31, 2023

anduril-2023-12-30-channel-uses-aux.zip
@diRk262 here's all current builds (from this branch current state). Most untested, include <disclaimer.h>, etc, I tested on kr4 and emisar-2ch but no real reason I can think of it'd break on any weird configs.

@diRk262
Copy link

diRk262 commented Dec 31, 2023

anduril-2023-12-30-channel-uses-aux.zip @diRk262 here's all current builds (from this branch current state). Most untested, include <disclaimer.h>, etc, I tested on kr4 and emisar-2ch but no real reason I can think of it'd break on any weird configs.

I updated my TS11 with this version. The rgb as multichannel is now working without getting overwritten by the voltage rgb function.
No bugs found in a short test.
Thanks!

@gretel
Copy link

gretel commented Dec 31, 2023

@SiteRelEnby the workflow can build binaries (artifacts) if you approve it to run.

@SiteRelEnby
Copy link
Contributor Author

@gretel Need to be a maintainer though. Although I guess could have on my fork. Ah well, it's 2 commands to run manually anyway.

@gretel
Copy link

gretel commented Jan 1, 2024

@gretel Need to be a maintainer though. Although I guess could have on my fork. Ah well, it's 2 commands to run manually anyway.

oh sorry, nothing i can do about that.

@zaziboo
Copy link

zaziboo commented Jan 15, 2024

anduril-2023-12-30-channel-uses-aux.zip @diRk262 here's all current builds (from this branch current state). Most untested, include <disclaimer.h>, etc, I tested on kr4 and emisar-2ch but no real reason I can think of it'd break on any weird configs.

Thank you for this.

But in the TS11, it broke batt check when using the aux. Main and green channels can still blink the voltage but the rest of the colors just remain solid. I also have a TS25 if you need me to test on it.

This prevents a user from 3Cing into an aux channel while in one of
these strobes (candle mode and bike flasher) where they will just get
solid aux as a result, while still allowing aux channels to be used
for strobes where it might make sense (e.g. lightning, tac strobe).

Also added uses_aux to the TS10v1 aux channel which I forgot before.
@SiteRelEnby
Copy link
Contributor Author

SiteRelEnby commented Jan 23, 2024

anduril-2023-12-30-channel-uses-aux.zip @diRk262 here's all current builds (from this branch current state). Most untested, include <disclaimer.h>, etc, I tested on kr4 and emisar-2ch but no real reason I can think of it'd break on any weird configs.

Thank you for this.

But in the TS11, it broke batt check when using the aux. Main and green channels can still blink the voltage but the rest of the colors just remain solid. I also have a TS25 if you need me to test on it.

Sorry, missed this comment. I'll take a look.

There's no fundamental config differences between the TS11 and TS25 that would matter.

First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
@SiteRelEnby
Copy link
Contributor Author

@zaziboo should be fixed now.

set_level_zero was causing aux-based channels to be set to off at level
0 (i.e. level 1). Also added a clarifying comment.
@zaziboo
Copy link

zaziboo commented Jan 25, 2024

Awesome! Thank you.

But, unfortunately, I have no way to build hex's for now. Any chance you have the updated fixes hosted somewhere?

stcarlso pushed a commit to stcarlso/anduril that referenced this pull request Feb 17, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
stcarlso pushed a commit to stcarlso/anduril that referenced this pull request Apr 25, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
The 0144 model number is reserved for the successor to the Meteor M44.
This is Hank's first AA light, so it's assigned as 0161:
- 01: Emisar
- 6: product line 6
- 1: model 1
For 3V LEDs on a boost/buck dual fuel driver, this allows
routing power around the boost converter in li-ion mode,
to reduce resistance and increase maximum output.
The AA/NiMH mode is unaffected, and boosts as normal.
to prevent corrupt data

This was enabled on more build targets before, but the *_ENABLE_PIN
definition names changed and the eeprom code didn't, so it was not
compiled in for a few months on some lights which probably needed it.
To fix that, it's now enabled by default on everything bigger than
attiny85, since it doesn't really hurt anything if it's enabled when
not needed.
ToyKeeper and others added 15 commits April 29, 2024 00:32
(so 0 to 255 now goes from 0.00V to 5.10V)
Use case 1: Updating a t85 light, where tactical mode is useful but
takes some squeezing, and momentary is less useful

Use case 2: Custom builds for people who don't like/want momentary mode
Based on [SammysHP's patch](ToyKeeper#18),
but only for lockout mode, not tactical.
Same as PL47G2 but with FET PWM levels safe for 219 emitters.

Same as difference between PL47 and PL47-219.

PL47G2 base allows low mode for aux LEDs, PL47 does not.
@SiteRelEnby
Copy link
Contributor Author

@zaziboo sorry, missed your comment. Just rebased it on the the latest changes, here's a zip if you want to test.
be0361a.zip

Isilmerie pushed a commit to Isilmerie/anduril that referenced this pull request Oct 14, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
Isilmerie pushed a commit to Isilmerie/anduril that referenced this pull request Oct 14, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
Isilmerie pushed a commit to Isilmerie/anduril that referenced this pull request Oct 14, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
Isilmerie pushed a commit to Isilmerie/anduril that referenced this pull request Oct 14, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
Isilmerie pushed a commit to Isilmerie/anduril that referenced this pull request Oct 14, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
Isilmerie pushed a commit to Isilmerie/anduril that referenced this pull request Oct 14, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
Isilmerie pushed a commit to Isilmerie/anduril that referenced this pull request Oct 14, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
Isilmerie pushed a commit to Isilmerie/anduril that referenced this pull request Oct 14, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
Isilmerie pushed a commit to Isilmerie/anduril that referenced this pull request Oct 14, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
Isilmerie pushed a commit to Isilmerie/anduril that referenced this pull request Oct 14, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
Isilmerie pushed a commit to Isilmerie/anduril that referenced this pull request Oct 14, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
Isilmerie pushed a commit to Isilmerie/anduril that referenced this pull request Oct 16, 2024
First off, green was not defined properly and was instead defined the
same as a main channel (leading to the behaviour described in the issue
at ToyKeeper#33 (comment)

Second, fix the actual bug causing aux to not work for blinky modes.
Specifically, set_level needs to be patched so that instead of (or as
well as, doesn't really matter) calling set_level_zero(), it will also
check for if the active channel is an RGB channel and if so them clear
RGB state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RGB aux voltage overrides RGB aux channel in ramp mode (Wurkkos TS11)
7 participants