Skip to content

Support Blade 15 Base (Early 2020)#366

Open
dhobi wants to merge 2 commits intomasterfrom
Support_Blade_15_Base_(Early_2020)_#356
Open

Support Blade 15 Base (Early 2020)#366
dhobi wants to merge 2 commits intomasterfrom
Support_Blade_15_Base_(Early_2020)_#356

Conversation

@dhobi
Copy link
Copy Markdown
Collaborator

@dhobi dhobi commented Apr 28, 2021

Added support for Blade 15 Base (Early 2020)
This will fix #356

Note: This is untested. Could @LuxuryWasTaken have a look at this?
HowTo:

  1. Download code on this branch here: https://github.com/1kc/razer-macos/tree/Support_Blade_15_Base_(Early_2020)_%23356
  2. yarn
  3. yarn dev

IssueHunt Summary

Referenced issues

This pull request has been submitted to:


@dhobi dhobi changed the title Support Blade 15 Base (Early 2020) #356 Support Blade 15 Base (Early 2020) Apr 28, 2021
@1kc
Copy link
Copy Markdown
Owner

1kc commented Apr 28, 2021

Amazing! @LuxuryWasTaken I've made a test release here for you to download, just to make it easier.

@dhobi don't forget to submit this PR to https://issuehunt.io/r/1kc/razer-macos/issues/356, don't think we've actually tested that the reward thing actually works so please give it a go.

@dhobi
Copy link
Copy Markdown
Collaborator Author

dhobi commented Apr 28, 2021

It would be interesting for me to know if the brightness on 100% is still just around 40% of the real brightness (100/2.55).
My current guess is that we have to update the "blade brightness" methods as well.

Edit: I've just updated the blade brightness and tried to link the PR with this issuehunt thingy 😄

…zer_chroma_standard_get_led_brightness is 2.55 as well and we could just get rid of conditionally adapting the value.
@LuxuryWasTaken
Copy link
Copy Markdown

Yes, it's working, but like I said something must be changed related with color picker cause it's not working. But you can use / select colors from menu bar (I really don't know a lot about macOS, in Windows, we're calling it as Taskbar)

Also, brightness is still buggy but like I said, Razer Blade is coming with brightness keys in function keys and it works perfectly, so I guess there is no sense of adding it as feature.

@dhobi
Copy link
Copy Markdown
Collaborator Author

dhobi commented Apr 28, 2021

Yes, it's working, but like I said something must be changed related with color picker cause it's not working.

Could you describe this a bit in more detail? The color picker is just there to "set/save" the custom color for a device. This custom color has to be selected in the menu / tray / taskbar afterwards.

Also, brightness is still buggy ...

I hope this won't be the case anymore with the latest commit here.

@LuxuryWasTaken
Copy link
Copy Markdown

This is my first time using this software, I guess color picker is working. Is it supposed to be working like this?
1)Save a color from color picker
2)Click to Razer macOS in the menu bar
3)Under Razer Blade, hover your mouse to Static
4)Select custom color.

If it's working like that normally, it's working yes. I thought color sets immediately when you select from color picker.

Also, I guess some of effects are not working, I can go to windows and test all of them if you want.

@dhobi
Copy link
Copy Markdown
Collaborator Author

dhobi commented Apr 28, 2021

If it's working like that normally, it's working yes. I thought color sets immediately when you select from color picker.

Yes, this is how it currently works. A live preview of the selected color would be a nice thing for the future.

Also, I guess some of effects are not working, I can go to windows and test all of them if you want.

Sure, that would be great. We could either set them as "missing" or try to fix it.

@LuxuryWasTaken
Copy link
Copy Markdown

gg

@dhobi
Copy link
Copy Markdown
Collaborator Author

dhobi commented Apr 28, 2021

Hmm what does the picture show exactly?

It would be great to have a list like this:

  • available: Audio Meter, Breathing, Spectrum Cycling, Static, Ripple, ...
  • working: Static, ...
  • not working: Breathing, Spectrum Cycling, Ripple, ...

@LuxuryWasTaken
Copy link
Copy Markdown

only available audio meter, breathing, spectrum cycling, static.

I'm switching to mac to confirm which is working.

but I don't think all of them necessarry, eg: audio meter is suck because chroma is not per key for base laptops.

@LuxuryWasTaken
Copy link
Copy Markdown

WHAT THE FUCK, TRIED WHEEL AND IT'S WORKING
THE PER KEY THING WAS RAZER SYNAPSE'S LIMITATION?

@LuxuryWasTaken
Copy link
Copy Markdown

Also, in menu bar, brightness is showing 255%, so yes your thought is true.

@LuxuryWasTaken
Copy link
Copy Markdown

Not working: Wave, Reactive, Starlight, Ripple.
Just wondering, can you add support for wave?

I also have a lot of devices for Razer

Deathadder Elite
Basilisk Ultimate Wireless with Dock
Blackshark v2
Blackwidow Elite
Blackwidow v3 Pro
Deathadder V2 Pro wireless
Lmk if you need testing for those devices.

@LuxuryWasTaken
Copy link
Copy Markdown

LuxuryWasTaken commented Apr 28, 2021

So I went to OpenRazer's git and asked, they sent this code.
`
class RazerBladeEarly2020Base(_RippleKeyboard):
"""
Class for the Razer Blade Base (Early 2020)
"""
EVENT_FILE_REGEX = re.compile(r'.*Razer_Blade(-if01)?-event-kbd')

 USB_VID = 0x1532 
 USB_PID = 0x0255 
 HAS_MATRIX = True 
 MATRIX_DIMS = [1, 16] 
 METHODS = ['get_device_type_keyboard', 'set_wave_effect', 'set_static_effect', 'set_spectrum_effect', 
            'set_reactive_effect', 'set_none_effect', 'set_breath_random_effect', 'set_breath_single_effect', 
            'set_breath_dual_effect', 'set_custom_effect', 'set_key_row', 
            'set_starlight_random_effect', 'set_starlight_single_effect', 'set_starlight_dual_effect', 
            'set_ripple_effect', 'set_ripple_effect_random_colour'] 

 DEVICE_IMAGE = "https://assets2.razerzone.com/images/blade-15/blade-15-base-model-spec-image-v2.png" 

`
MATRIX_DIMS = [1, 16]
According to this class, Razer limited it to 1 row, 16 column. So basically, it's not per zone, it's per column customizable RGB.

TL;DR:
Wave effect can apply according to their port.

@dhobi
Copy link
Copy Markdown
Collaborator Author

dhobi commented Apr 28, 2021

I'm aware of the code in the openrazer project. The changes done on this PR are based on exactly this code fragment you posted (+some in .c files).

I can't explain why it works in openrazer but doesn't in Razer macOS...

@1kc
Copy link
Copy Markdown
Owner

1kc commented Apr 29, 2021

Unfortunately it's pretty hard to debug without @dhobi actually having a Blade 15 @LuxuryWasTaken.
If we were to dig deeper into the cause, we would have to use usb packet capture to see the differences in packets sent and received between Razer MacOS and openrazer. This most definitely requires having the device.
I think the progress is pretty good given the goal is provide best effort support for razer devices.

@LuxuryWasTaken
Copy link
Copy Markdown

hey, I just checked razer macOS animations and didn't see Wave effect, maybe that's why it's not working for blade?

@dhobi
Copy link
Copy Markdown
Collaborator Author

dhobi commented May 1, 2021

Which program do you mean with razer macOS? This software here? I think we show the wave effect (as the openrazer implementation does as well) but as you say it does not work at all...

Copy link
Copy Markdown
Collaborator

@WrathofthePast WrathofthePast left a comment

Choose a reason for hiding this comment

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

Your changes to razerchromacommon.c are already present in 1kc/librazermacos. You can delete that file from this PR. Furthermore, the last line you added to razerkbd_driver.c is already present in librazermacos.

If you move the remaining changes on razerkbd_driver.c & .h to a PR on librazermacos and delete it from this PR, it'll will be able to be automatically merged.

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.

Support Blade 15 Base (Early 2020)

4 participants