stickoking / razer-macos

Color effects manager for Razer devices for macOS. Supports High Sierra (10.13) to Sonoma (14.3). Made by the community, based on openrazer.
GNU General Public License v2.0
53 stars 9 forks source link

Cobra Pro Support #13

Open cdibartolo opened 7 months ago

cdibartolo commented 7 months ago

Mirroring a comment from the original project -- Are you able to add Cobra Pro support to this project?

Based on the OpenRazer project, there's code for it in the mouse.py file starting at line 1490.


class RazerCobraPro(__RazerDevice): """ Class for the Razer Cobra Pro """ EVENT_FILE_REGEX = re.compile(r'.*usb-Razer_Razer_Cobra_Pro-if0(1|2)-event-kbd')

USB_VID = 0x1532
USB_PID = 0x00B0

METHODS = ['get_device_type_mouse',
           'max_dpi', 'get_dpi_xy', 'set_dpi_xy', 'get_dpi_stages', 'set_dpi_stages',
           'get_poll_rate', 'set_poll_rate',
           'get_brightness', 'set_brightness',
           'get_logo_brightness', 'set_logo_brightness',
           'get_scroll_brightness', 'set_scroll_brightness',
           # All LEDs (partial support)
           'set_static_effect', 'set_wave_effect', 'set_spectrum_effect', 'set_none_effect',
           # Logo (partial support)
           'set_logo_wave', 'set_logo_static', 'set_logo_spectrum', 'set_logo_none',
           # Scroll wheel (partial support)
           'set_scroll_wave', 'set_scroll_static', 'set_scroll_spectrum', 'set_scroll_none',
           # Battery
           'get_battery', 'is_charging', 'get_idle_time', 'set_idle_time', 'set_low_battery_threshold']

DEVICE_IMAGE = "https://dl.razerzone.com/src2/13182/13182-1-en-v2.png"

DPI_MAX = 30000
stickoking commented 7 months ago

Thanks will add support

tim-rhdt commented 6 months ago

Has the support for Cobra Pro been added? Would be important for my decision whether to buy that mouse ;)

derlunz commented 1 month ago

I have attempted to add support for Cobra Pro in this PR. Some independent testing would be welcome.

layout-ch commented 1 month ago

Yes please add support for the cobra pro 🙏🏼