| 1 |
# SPDX-License-Identifier: GPL-2.0-or-later |
| 2 |
|
| 3 |
""" |
| 4 |
BlackWidow Ultimate 2013 effects |
| 5 |
""" |
| 6 |
from openrazer_daemon.dbus_services import endpoint |
| 7 |
|
| 8 |
|
| 9 |
@endpoint('razer.device.lighting.bw2013', 'setPulsate') |
| 10 |
def bw_set_pulsate(self): # TODO: Replace by set*BreathMono |
| 11 |
""" |
| 12 |
Set pulsate mode |
| 13 |
""" |
| 14 |
self.logger.debug("DBus call bw_set_pulsate") |
| 15 |
|
| 16 |
driver_path = self.get_driver_path('matrix_effect_pulsate') |
| 17 |
|
| 18 |
# remember effect |
| 19 |
self.set_persistence("backlight", "effect", 'pulsate') |
| 20 |
|
| 21 |
with open(driver_path, 'w') as driver_file: |
| 22 |
driver_file.write('1') |
| 23 |
|
| 24 |
# Notify others |
| 25 |
self.send_effect_event('setPulsate') |
| 26 |
|
| 27 |
|
| 28 |
@endpoint('razer.device.lighting.bw2013', 'setStatic') |
| 29 |
def bw_set_static(self): # TODO: Replace by set*On |
| 30 |
""" |
| 31 |
Set static mode |
| 32 |
""" |
| 33 |
self.logger.debug("DBus call bw_set_static") |
| 34 |
|
| 35 |
driver_path = self.get_driver_path('matrix_effect_static') |
| 36 |
|
| 37 |
# remember effect |
| 38 |
self.set_persistence("backlight", "effect", 'static') |
| 39 |
|
| 40 |
with open(driver_path, 'w') as driver_file: |
| 41 |
driver_file.write('1') |
| 42 |
|
| 43 |
# Notify others |
| 44 |
self.send_effect_event('setStatic') |