Skip to content

Conversation

@Msprg
Copy link

@Msprg Msprg commented Mar 30, 2025

I've tested the changes on my own chameleon devices to the best of my abilities. Feel free to suggest changes.

@github-actions
Copy link

You are welcome to add an entry to the CHANGELOG.md as well

@GameTec-live
Copy link
Contributor

nice, looks good. Due to "missmanagement" (RRG not giving a fuck and kinda not even existing anymore as they split or smthng, etc) i doubt itll be merged here... May i merge it on my fork (where i attempt to revive this project a bit)? (https://github.com/ChameleonUltra/ChameleonUltra)

@Msprg
Copy link
Author

Msprg commented Apr 2, 2025

Due to "missmanagement" (RRG not giving a fuck and kinda not even existing anymore as they split or smthng...

Oh, yeah, I was noticing something was off for a pretty long time lately. If you'd happen to know something more about it, I'd be thrilled if you could chat with me about it, as I'm not exactly sure I'd want to go asking iceman and others.

But I digress...

May i merge it on my fork (where i attempt to revive this project a bit)?

Of course! That would be very much appreciated!
In fact, I was already preparing a PR for your chameleon ultra gui repository as I've also managed to add the functionality to manage this new setting to the gui as well :)

@unkernet
Copy link
Contributor

unkernet commented Jun 27, 2025

Are you sure we need to store this value as a uint16_t?

The button press duration is already constrained — with an upper limit around SLEEP_DELAY_MS_BUTTON_CLICK (4000 ms). Given this relatively narrow range, I’m not sure we need to store it with full millisecond precision. A coarser resolution (e.g., 16 ms steps) could be sufficient and would allow us to store it more compactly.

Here’s a suggestion for how it could look:

uint16_t settings_get_long_press_threshold(void) {
    return config.long_press_threshold * 16;
}

void settings_set_long_press_threshold(uint16_t duration) {
    // Clamp value to valid range: 200 ms minimum, SLEEP_DELAY_MS_BUTTON_CLICK maximum
    if (duration < 200) {
        duration = 200;
    }
    if (duration > SLEEP_DELAY_MS_BUTTON_CLICK) {
        duration = SLEEP_DELAY_MS_BUTTON_CLICK;
    }
    // Store in 16 ms resolution units
    config.long_press_threshold = duration / 16;
}

@LupusE
Copy link
Contributor

LupusE commented Aug 1, 2025

Hi @Msprg ,
thanks a lot for your work. Meanwhile there is some movement in the development here.

In near future I see two PRs should be merged. hardnested is implemented and viking support. Could you take a look at comment from @unkernet and update the PR afterwards?
Unfortunately the Logs are not available anymore, why the build throw errors In march ... Maybe together we can fix it, this time?

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.

4 participants