Skip to content

Conversation

@toorusr
Copy link
Contributor

@toorusr toorusr commented Sep 7, 2025

  • fixed lag in creak sound on fast change in angle. you can now do a fast change of angle and it will not lag 1s behind. so now real-time
  • fixed anomaly when sensor jitters ~4° on some devices (aka my device), introduced stabilisation for that
  • added nice toggles to modify creak behaviour

@samhenrigold
Copy link
Owner

I get a crash when I click to expand more options:

FAULT: NSInvalidArgumentException: -[AppDelegate toggleAdvanced:]: unrecognized selector sent to instance 0xb58c2ca80; (user info absent)

There are also a few undeclared selectors and deprecated control styles (Replace 'NSSwitchButton' with 'NSButtonTypeSwitch') that emit warnings.

@jordanamr
Copy link

This PR is AI slop.

@toorusr
Copy link
Contributor Author

toorusr commented Sep 7, 2025

@samhenrigold, yeah, sorry about that, was the rebase with your latest changes that killed the settings toggle. I'll clean up the PR to only include the fix for the creak delay and jitter suppression.

@toorusr toorusr force-pushed the creak-latency-jitter-ui branch from 7dae421 to fd7afe8 Compare September 7, 2025 03:23
@toorusr
Copy link
Contributor Author

toorusr commented Sep 7, 2025

@samhenrigold, reviewed the changes again and cut the UI elements. Removes the lag and jitter.

@samhenrigold
Copy link
Owner

Because the velocity rapidly oscillates, it causes the sound effect to “lurch" even when the hinge is opening/closing smoothly. The original smoothing fixed that. This PR also introduced a coarser angle detection, where it only registers intervals of 3 degrees.

I’m probably not going to merge as-is but I’m open to merging something that just focuses on fixing the jitter.

@castdrian
Copy link

ai crap even finds its way into cool and funny projects, yuck

@HankLloydRight
Copy link

Why are people saying this PR is AI generated?

@toorusr
Copy link
Contributor Author

toorusr commented Sep 8, 2025

Haha, of course I used AI to help me fix the annoying lag in the creaking and to fix the jitter! There is a difference between just vibe coding stuff and using AI as a helper though.:)

This is a fun project, not the linux source code... :D

And even so, I removed the bug that was created when I resolved the merge conflict. You guys probably didn't even read a single line of code in this repo, otherwise you'd see that the author of the project very likely also used AI like a sane modern dev (see AI-typical code comments etc.).


And @samhenrigold, happy to reduce it down to the fix for the jitter. Although, I honestly thought the lag / fadeout (?) was a bug. Just tried it again on the latest main version and when I rapidly change the angle by e.g. 50° and stop, the audio starts pretty delayed instead of when the actual lid is moving.

And in general when I stop moving the lid, there are 2-3s of sound still playing, but the lid is not moving, so realistically there should be no sound (imo haha). That was what I fixed.

Lmk if I should just reduce it to the jitter fix.

@rien333
Copy link

rien333 commented Sep 9, 2025

Why are people saying this PR is AI generated?

First line:

    // Create the main window (_taller to accommodate mode + jitter controls_)
    NSRect windowFrame = NSMakeRect(100, 100, 500, 650);

AI often inserts comments to explain why/how a line was changed. No human would add this type of explanation as a permanent comment.

It's not the linux kernel, but showing that you care about and put effort in your work is polite regardless.

@toorusr
Copy link
Contributor Author

toorusr commented Sep 9, 2025

@rien333, come on man, that’d only be accurate if I hadn’t literally just changed the original comments in the code.

image

See here, your quoted code, literally just replaced a few words.

@rien333
Copy link

rien333 commented Sep 9, 2025

lol i suck

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.

6 participants