Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Conditional Features for razer-cli #14

Merged
merged 5 commits into from
Jun 13, 2024
Merged

Conversation

tdakhran
Copy link
Owner

@tdakhran tdakhran commented Jun 10, 2024

This PR introduces the notion of features. It will allow to activate supported features for different laptops selectively.

Major changes are:

  • syntax of razer-cli changed, script depending on it requires adjustment
  • features are introduced and can be selectively activated
  • 2 modes: auto and manual --pid 0x029f
    • in auto mode the model is detected automatically and only supported features are activated
    • in manual mode provided pid is used and all features are activated
  • razer-cli manual --pid 0x029f info does not fail on the first error, instead prints the error and continues to dump info
  • model number prefix is used now to detect devices, allowing to differentiate between devices with similar PIDs (e.g. Black and Mercur colors have the same PID, but Mercur doesn't have lid logo).
  • Supported features can be specified per model
  • model prefix id is read from Windows registry, for Linux not implemented yet.
  • cli entries are now dynamically generated based on supported features.

This PR requires more testing and I'll be happy if you can assist in this. razer-cli can run now on a variety of Razer laptops.

#12

@tdakhran tdakhran requested a review from jacobgelling June 10, 2024 18:14
@tdakhran tdakhran self-assigned this Jun 10, 2024
@tdakhran tdakhran added enhancement New feature or request help wanted Extra attention is needed new hw Request for new hardware support labels Jun 10, 2024
@tdakhran tdakhran force-pushed the tarek/feat/conditional_features branch from 73e0f3c to bdb1345 Compare June 10, 2024 18:32
Copy link
Collaborator

@jacobgelling jacobgelling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good! Tested it and the new cli successfully detects the right features for me now.

@tdakhran tdakhran merged commit 6aed60b into main Jun 13, 2024
1 check passed
@tdakhran tdakhran deleted the tarek/feat/conditional_features branch June 13, 2024 05:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed new hw Request for new hardware support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants