-
Notifications
You must be signed in to change notification settings - Fork 256
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
Battery level support #735
base: master
Are you sure you want to change the base?
Conversation
…nto cross-compilation
…zer-macos into universal-app-support
Universal app support (new proposal)
I think I doing these pull request correctly, but if not, I added the dmg as a release on my fork.
Shorter URL
…port Huntsman V2 Analog Support
Support for the New DeathAdder Essential
Huntsman V2 Support
Add Huntsman Mini to the confirmed working list
Bumps [electron](https://github.com/electron/electron) from 11.2.2 to 11.5.0. - [Release notes](https://github.com/electron/electron/releases) - [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md) - [Commits](electron/electron@v11.2.2...v11.5.0) --- updated-dependencies: - dependency-name: electron dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]>
Implement Thunderbolt 4 Dock Chroma support
feat: add UI support for Razer Basilisk V3
Fixes: - Error in razermouse_driver.c - Missing additions to .gitignore from 1kc#463
- Added missing matrix brightness support - Removed `battery` from `featuresMissing` as it is unnecessary
This reverts commit fe7f2f2.
electron-builder: - Updated to the latest release - No longer a pre-release - Now uses the same electron universal version as this PR (v1.2.1) source-map-support - Updated to dedupe
…operty Add missing max DPI property to Mamba TE
Fix Basilisk V3 and Huntsman V2 Analog
Update broken support link and match text to link content
…-12.3+ Fix Complier for macOS 12.3+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BatteryAnimation proposal in comments...
(The PR looks really messy because of the force push to remove the sensitive data. I recommend to create a new one and change the password...JUST in case... 👍 )
@@ -305,6 +309,28 @@ export class Application { | |||
this.refreshTray(true); | |||
} | |||
|
|||
updateTrayBattery() { | |||
if (this.razerApplication.deviceManager.activeRazerDevices != null) { | |||
this.razerApplication.deviceManager.activeRazerDevices.forEach(device => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last battery device will win the "tray competition"?
If so, I would filter the activeRazerDevices
for device !== null && device.hasFeature(FeatureIdentifier.BATTERY)
first before trying to compute the tray title.
Reason: Written like this, it will refresh every active device even though it might not even have a batteryLevel
return { | ||
label: 'Battery level', | ||
click() { | ||
device.batteryLevelInterval = setInterval(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about creating this as a BatteryAnimation and add a stopAnimations()
to class RazerDevice
as well? You could call this.stopAnimations()
inside of /*protected*/ setModeState(mode, modeArguments = null)
and stop the BatteryAnimation there.
Don't forget a call to super.stopAnimations()
in all classes which extend from RazerDevice
and have the method stopAnimations()
already.
function getFeatureBreath(application, device, feature) { | ||
return { | ||
label: 'Breathe', | ||
click() { | ||
if(device.batteryLevelInterval) clearInterval(device.batteryLevelInterval); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these lines are then not necessary if you go the BatteryAnimation way...
Are there updates on this? |
This pull request will add 2 things: