forked from drath/libratbag
steelseries: support the original Rival
Initial support for the original Rival mouse. Setting resolutions, report rate and LED color and modes. No key mappings yet, and breathing duration is fixed.
This commit is contained in:
committed by
Peter Hutterer
parent
f36b2dbce9
commit
920fb3917f
11
data/devices/steelseries-rival.device
Normal file
11
data/devices/steelseries-rival.device
Normal file
@@ -0,0 +1,11 @@
|
||||
[Device]
|
||||
Name=SteelSeries Rival
|
||||
DeviceMatch=usb:1038:1384
|
||||
Driver=steelseries
|
||||
Svg=steelseries-rival.svg
|
||||
|
||||
[Driver/steelseries]
|
||||
DeviceVersion=1
|
||||
Buttons=6
|
||||
Leds=2
|
||||
DpiRange=50:6500@50
|
||||
443
data/gnome/steelseries-rival.svg
Normal file
443
data/gnome/steelseries-rival.svg
Normal file
@@ -0,0 +1,443 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="490"
|
||||
height="490"
|
||||
viewBox="0 0 129.64583 129.64583"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
sodipodi:docname="steelseries-rival.svg"
|
||||
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4142136"
|
||||
inkscape:cx="78.639558"
|
||||
inkscape:cy="261.77819"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="Device"
|
||||
inkscape:document-rotation="0"
|
||||
showgrid="false"
|
||||
showguides="false"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
showborder="true"
|
||||
inkscape:guide-bbox="true"
|
||||
units="px"
|
||||
inkscape:snap-global="false"
|
||||
inkscape:measure-start="241.5,424.5"
|
||||
inkscape:measure-end="193,423">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid78" />
|
||||
<sodipodi:guide
|
||||
position="58.722772,112.40709"
|
||||
orientation="0,1"
|
||||
id="guide79"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="39.611923,100.54373"
|
||||
orientation="0,1"
|
||||
id="guide81"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="51.756014,88.614617"
|
||||
orientation="0,1"
|
||||
id="guide83"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="57.778386,76.729167"
|
||||
orientation="0,1"
|
||||
id="guide85"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="45.047078,64.795712"
|
||||
orientation="0,1"
|
||||
inkscape:locked="false"
|
||||
id="guide87" />
|
||||
<sodipodi:guide
|
||||
position="57.646696,52.899321"
|
||||
orientation="0,1"
|
||||
id="guide89"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="64.031094,118.70775"
|
||||
orientation="1,0"
|
||||
id="guide996"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="76.729165,115.65599"
|
||||
orientation="1,0"
|
||||
id="guide4799"
|
||||
inkscape:locked="false" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="Device"
|
||||
inkscape:label="Device"
|
||||
style="display:inline;opacity:1"
|
||||
transform="translate(0,-167.35416)">
|
||||
<path
|
||||
style="opacity:1;fill:#d3d3ce;fill-opacity:1;fill-rule:evenodd;stroke:#bfc2bb;stroke-width:0.98636663;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 40.966398,178.40384 c 10.128269,-6.06958 13.843202,-5.15315 22.125375,-5.36057 0.815799,-0.022 1.397736,-0.0441 2.213535,-0.0661 7.544908,0.008 16.804302,3.17239 21.130756,6.44865 1.422136,0.452 2.190922,3.57156 3.150036,8.42225 0.859896,4.92786 2.377355,23.3214 3.378944,30.28552 4.289427,17.445 6.148079,21.13233 5.839397,36.23562 0.08155,9.96062 -3.435205,16.37945 -6.88054,22.71347 -4.707536,5.80429 -6.249571,6.86442 -15.801399,10.09956 -7.805208,1.74184 -11.135198,2.13807 -18.278948,0.8372 -6.32795,-1.67569 -10.758421,-3.68269 -14.782617,-8.15118 -2.665941,-4.21879 -4.043454,-12.34041 -3.573015,-23.27668 0.83923,-20.53867 -3.23693,-47.28029 -3.417692,-53.41373 l 0.529166,-14.69573 c 0.23151,-6.33201 2.28507,-9.07943 4.367002,-10.07828 z"
|
||||
id="path882"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccccccc" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="display:inline;opacity:1;fill:none;fill-opacity:0.39215686;stroke:#babdb6;stroke-width:3.62082291;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="led0"
|
||||
sodipodi:cx="64.507607"
|
||||
sodipodi:cy="278.93338"
|
||||
sodipodi:rx="6.5174346"
|
||||
sodipodi:ry="6.5174408"
|
||||
d="m 69.116129,274.32485 a 6.5174346,6.5174408 0 0 1 0,9.21706 6.5174346,6.5174408 0 0 1 -9.217044,0 6.5174346,6.5174408 0 0 1 -10e-7,-9.21706"
|
||||
sodipodi:start="5.4977871"
|
||||
sodipodi:end="3.9269907"
|
||||
sodipodi:open="true"
|
||||
sodipodi:arc-type="arc"
|
||||
inkscape:label="#led1" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;stroke:#babdb6;stroke-width:0.51011664;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 63.998032,175.33704 c -0.0617,17.18181 0,37.8177 0,37.8177 v 0"
|
||||
id="path4530-9"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<rect
|
||||
style="display:inline;opacity:1;fill:#eeeeec;fill-opacity:1;stroke:#bfc2bb;stroke-width:0.65934163;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="button2"
|
||||
width="8.6572962"
|
||||
height="16.992365"
|
||||
x="59.667027"
|
||||
y="183.8551"
|
||||
ry="1.5045637"
|
||||
inkscape:label="#rect4615"
|
||||
rx="2.8998742" />
|
||||
<rect
|
||||
style="display:inline;opacity:1;fill:#d3d3ce;fill-opacity:1;stroke:#bfc2bb;stroke-width:0.50999999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="button5"
|
||||
width="4.0773749"
|
||||
height="11.664907"
|
||||
x="61.934288"
|
||||
y="213.306"
|
||||
ry="0.74915975"
|
||||
inkscape:label="#rect4615"
|
||||
rx="0.63142258" />
|
||||
<path
|
||||
style="opacity:1;fill:#eeeeec;fill-opacity:1;fill-rule:evenodd;stroke:#bfc2bb;stroke-width:0.65934163;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 91.112176,226.98205 c -0.763945,13.64188 -1.430609,13.74737 0,20.39268 0.486529,2.25997 1.696179,5.2841 2.85379,6.32088 1.157611,1.03679 1.081149,0.34438 4.589061,0.89006 0.940243,-6.53749 -0.570931,-13.96226 -1.479399,-18.97414 -1.652616,-7.76419 -2.041209,-9.76648 -4.816357,-19.91603 -0.935218,-0.0567 -1.141827,10.22026 -1.147095,11.28655 z"
|
||||
id="path959"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cascccc" />
|
||||
<path
|
||||
style="opacity:1;fill:#d3d3ce;fill-opacity:1;fill-rule:evenodd;stroke:#bfc2bb;stroke-width:0.51011664;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 38.306404,179.27446 c 6.240372,-5.59743 15.089504,-6.58952 25.788485,-6.52355 0.06236,2.93106 -0.208006,8.1177 -0.145616,11.04875 -0.966626,0.0156 -1.617539,-0.0389 -2.677709,0.15206 -0.576857,0.12082 -1.668207,0.59244 -1.683798,1.44993 0.03118,4.73958 0.06237,9.47916 0.09355,14.21874 0.428974,0.80223 0.791803,1.0753 1.683798,1.21608 h 2.666014 c 0.09354,3.89768 -0.04677,7.79536 0.04677,11.69304 -1.777343,0.0624 -3.554686,0.12473 -5.332029,0.18709 -4.677216,3.30523 -9.354432,6.6104 -14.031648,9.91563 -1.948383,1.15278 -2.949891,1.59818 -7.302533,1.7394 -0.830377,-6.12609 -3.925564,-39.29473 0.894716,-45.09717 z"
|
||||
id="button0"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccccc"
|
||||
inkscape:label="#path971" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:#d3d3ce;fill-opacity:1;fill-rule:evenodd;stroke:#bfc2bb;stroke-width:0.51011664;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 87.229344,179.65609 c -8.975635,-7.54404 -14.108253,-6.88035 -22.922173,-6.91425 -0.06236,2.93106 0.0077,8.08746 -0.05466,11.01851 0.966626,0.0156 1.617539,-0.0389 2.677709,0.15206 0.576857,0.12082 1.668207,0.59244 1.683798,1.44993 -0.03118,4.73958 -0.06237,9.47916 -0.09355,14.21874 -0.428974,0.80223 -0.791803,1.0753 -1.683798,1.21608 h -2.80633 c -0.09354,3.89768 0.187088,7.79536 0.09354,11.69304 1.777343,0.0624 3.554686,0.12473 5.332029,0.18709 4.677216,3.30523 9.050413,6.64971 13.72763,9.95494 2.182243,-0.0165 4.486808,-0.13974 7.992488,-0.15492 2.289604,-8.17688 -1.912326,-39.03947 -3.946687,-42.82126 z"
|
||||
id="button1"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccccccc"
|
||||
inkscape:label="#path971-5" />
|
||||
<path
|
||||
style="opacity:1;fill:#d3d3ce;fill-opacity:1;fill-rule:evenodd;stroke:#bfc2bb;stroke-width:0.51011664;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 39.533701,248.31208 c 0.08789,-9.75637 -0.210156,-12.40005 -1.249267,-23.97153 -0.755908,0.011 0.02246,0.0448 -1.253567,0.0612 l 1.730229,23.94557 c 0.618261,-0.0306 -0.0064,-0.0352 0.772605,-0.0352 z"
|
||||
id="button3"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccc"
|
||||
inkscape:label="#path998" />
|
||||
<path
|
||||
style="opacity:1;fill:#d3d3ce;fill-opacity:1;fill-rule:evenodd;stroke:#bfc2bb;stroke-width:0.51011664;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 38.039569,223.41713 -1.173721,-0.46275 -1.223702,-11.3646 0.83829,-1.79053 z"
|
||||
id="button4"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:label="#path1000" />
|
||||
<g
|
||||
id="g27"
|
||||
inkscape:label="#g84"
|
||||
style="opacity:1">
|
||||
<path
|
||||
inkscape:label="#path42"
|
||||
inkscape:connector-curvature="0"
|
||||
id="led1"
|
||||
d="m 60.202463,185.20746 c 0,14.31228 0,14.31228 0,14.31228"
|
||||
style="fill:#c8c8c8;fill-opacity:1;stroke:#babdb6;stroke-width:0.23228861px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:label="#path42"
|
||||
inkscape:connector-curvature="0"
|
||||
id="led0-3"
|
||||
d="m 67.749483,185.21452 c 0,14.31228 0,14.31228 0,14.31228"
|
||||
style="display:inline;opacity:1;fill:#c8c8c8;fill-opacity:1;stroke:#babdb6;stroke-width:0.23228861px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#bfc2bb;stroke-width:0.50999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
d="m 63.937548,224.94747 v 9.40121"
|
||||
id="path951"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="Buttons"
|
||||
inkscape:label="Buttons"
|
||||
transform="translate(0,-2.6458338)"
|
||||
style="display:inline">
|
||||
<g
|
||||
transform="matrix(-0.29294531,0,0,0.26458333,70.19679,-46.28282)"
|
||||
style="display:inline"
|
||||
id="button0-path"
|
||||
inkscape:label="#g156">
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#888a85;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
d="m 69.018882,250.50576 170.100828,0.008"
|
||||
id="path966"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
id="rect976"
|
||||
width="6.999999"
|
||||
height="6.999999"
|
||||
x="65.211685"
|
||||
y="247.25577" />
|
||||
<rect
|
||||
y="250.01747"
|
||||
x="238.66302"
|
||||
height="1"
|
||||
width="1"
|
||||
id="button0-leader"
|
||||
style="color:#000000;text-align:end;overflow:visible;vector-effect:none;fill:#888a85;fill-opacity:1;stroke:none;stroke-linecap:round"
|
||||
inkscape:label="#rect875" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(0.26458333,0,0,0.26458333,40.502648,-25.152234)"
|
||||
style="display:inline"
|
||||
id="button1-path"
|
||||
inkscape:label="#g146">
|
||||
<path
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#888a85;stroke-width:0.99999994;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
d="m 336.41912,170.11088 -197.26264,0.0828"
|
||||
id="path51"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<rect
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
id="rect53"
|
||||
width="6.999999"
|
||||
height="6.999999"
|
||||
x="137"
|
||||
y="166.75" />
|
||||
<rect
|
||||
y="169.61206"
|
||||
x="335.92694"
|
||||
height="1"
|
||||
width="1"
|
||||
id="button1-leader"
|
||||
style="color:#000000;text-align:start;overflow:visible;vector-effect:none;fill:#888a85;fill-opacity:1;stroke:none;stroke-linecap:round"
|
||||
inkscape:label="#rect871" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(0.26458333,0,0,0.26458333,39.927878,-13.516602)"
|
||||
style="display:inline"
|
||||
id="button2-path"
|
||||
inkscape:label="#g146">
|
||||
<path
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#888a85;stroke-width:0.99999994;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
d="M 338.62224,171.07963 91.069203,171.06803"
|
||||
id="path51-2"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<rect
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
id="rect53-3"
|
||||
width="6.999999"
|
||||
height="6.999999"
|
||||
x="87.596474"
|
||||
y="167.57452" />
|
||||
<rect
|
||||
y="170.56519"
|
||||
x="338.10663"
|
||||
height="1"
|
||||
width="1"
|
||||
id="button2-leader"
|
||||
style="color:#000000;text-align:start;overflow:visible;vector-effect:none;fill:#888a85;fill-opacity:1;stroke:none;stroke-linecap:round"
|
||||
inkscape:label="#rect871" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(0.26458333,0,0,0.26458333,39.855422,10.357346)"
|
||||
style="display:inline"
|
||||
id="button5-path"
|
||||
inkscape:label="#g146">
|
||||
<path
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#888a85;stroke-width:0.99999994;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
d="M 338.91912,170.14213 91.343981,170.50618"
|
||||
id="path51-2-3"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<rect
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
id="rect53-3-4"
|
||||
width="6.999999"
|
||||
height="6.999999"
|
||||
x="88"
|
||||
y="167.375" />
|
||||
<rect
|
||||
y="169.65894"
|
||||
x="338.32538"
|
||||
height="1"
|
||||
width="1"
|
||||
id="button5-leader"
|
||||
style="color:#000000;text-align:start;overflow:visible;vector-effect:none;fill:#888a85;fill-opacity:1;stroke:none;stroke-linecap:round"
|
||||
inkscape:label="#rect871" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(-0.29294531,0,0,0.26458333,70.354375,-10.600792)"
|
||||
style="display:inline"
|
||||
id="button4-path"
|
||||
inkscape:label="#g156">
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#888a85;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
d="m 113.69984,250.59415 125.92438,-0.0532"
|
||||
id="path966-1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
id="rect976-3"
|
||||
width="6.999999"
|
||||
height="6.999999"
|
||||
x="110.07652"
|
||||
y="247.06827" />
|
||||
<rect
|
||||
y="250.06044"
|
||||
x="239.16049"
|
||||
height="1"
|
||||
width="1"
|
||||
id="button4-leader"
|
||||
style="color:#000000;text-align:end;overflow:visible;vector-effect:none;fill:#888a85;fill-opacity:1;stroke:none;stroke-linecap:round"
|
||||
inkscape:label="#rect875" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(-0.29294531,0,0,0.26458333,70.260832,1.1857932)"
|
||||
style="display:inline"
|
||||
id="button3-path"
|
||||
inkscape:label="#g156">
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#888a85;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
d="m 109.05947,250.54995 130.56475,-0.009"
|
||||
id="path966-2"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
id="rect976-8"
|
||||
width="6.999999"
|
||||
height="6.999999"
|
||||
x="105.5442"
|
||||
y="247.06068" />
|
||||
<rect
|
||||
y="250.00575"
|
||||
x="238.62422"
|
||||
height="1"
|
||||
width="1"
|
||||
id="button3-leader"
|
||||
style="color:#000000;text-align:end;overflow:visible;vector-effect:none;fill:#888a85;fill-opacity:1;stroke:none;stroke-linecap:round"
|
||||
inkscape:label="#rect875" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="LEDs"
|
||||
inkscape:label="LEDs"
|
||||
transform="translate(0,-2.6458338)"
|
||||
style="display:inline">
|
||||
<g
|
||||
transform="matrix(-0.29294531,0,0,0.26458333,69.912779,-34.520744)"
|
||||
style="display:inline"
|
||||
id="led1-path"
|
||||
inkscape:label="#g156">
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#888a85;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
d="m 33.260958,250.40632 204.900782,0.0964"
|
||||
id="path966-0"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
id="rect976-2"
|
||||
width="6.999999"
|
||||
height="6.999999"
|
||||
x="29.527279"
|
||||
y="246.99062" />
|
||||
<rect
|
||||
y="249.97328"
|
||||
x="237.64519"
|
||||
height="1"
|
||||
width="1"
|
||||
id="led1-leader"
|
||||
style="color:#000000;text-align:end;overflow:visible;vector-effect:none;fill:#888a85;fill-opacity:1;stroke:none;stroke-linecap:round"
|
||||
inkscape:label="#rect875" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(-0.29294531,0,0,0.26458333,69.953208,49.201431)"
|
||||
style="display:inline"
|
||||
id="led0-path"
|
||||
inkscape:label="#g156">
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#888a85;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
d="m 19.28901,250.49471 219.01243,0.008"
|
||||
id="path966-0-2"
|
||||
inkscape:connector-curvature="0" />
|
||||
<rect
|
||||
style="color:#000000;overflow:visible;opacity:1;vector-effect:none;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||
id="rect976-2-1"
|
||||
width="6.999999"
|
||||
height="6.999999"
|
||||
x="16.834169"
|
||||
y="246.63705" />
|
||||
<rect
|
||||
y="249.97328"
|
||||
x="237.7849"
|
||||
height="1"
|
||||
width="1"
|
||||
id="led0-leader"
|
||||
style="color:#000000;text-align:end;overflow:visible;vector-effect:none;fill:#888a85;fill-opacity:1;stroke:none;stroke-linecap:round"
|
||||
inkscape:label="#rect875" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 22 KiB |
@@ -48,6 +48,8 @@
|
||||
|
||||
#define STEELSERIES_ID_DPI_SHORT 0x03
|
||||
#define STEELSERIES_ID_REPORT_RATE_SHORT 0x04
|
||||
#define STEELSERIES_ID_LED_EFFECT_SHORT 0x07
|
||||
#define STEELSERIES_ID_LED_COLOR_SHORT 0x08
|
||||
#define STEELSERIES_ID_SAVE_SHORT 0x09
|
||||
|
||||
#define STEELSERIES_ID_BUTTONS 0x31
|
||||
@@ -352,7 +354,48 @@ steelseries_write_buttons(struct ratbag_profile *profile)
|
||||
}
|
||||
|
||||
static int
|
||||
steelseries_write_led(struct ratbag_led *led)
|
||||
steelseries_write_led_v1(struct ratbag_led *led)
|
||||
{
|
||||
struct ratbag_device *device = led->profile->device;
|
||||
uint8_t buf[STEELSERIES_REPORT_SIZE_SHORT] = {0};
|
||||
int ret;
|
||||
|
||||
buf[0] = STEELSERIES_ID_LED_EFFECT_SHORT;
|
||||
buf[1] = led->index + 1;
|
||||
|
||||
switch(led->mode) {
|
||||
case RATBAG_LED_OFF:
|
||||
case RATBAG_LED_ON:
|
||||
buf[2] = 0x01;
|
||||
break;
|
||||
case RATBAG_LED_BREATHING:
|
||||
buf[2] = 0x03; /* 0x02: slow, 0x03: medium, 0x04: fast */
|
||||
break;
|
||||
case RATBAG_LED_CYCLE:
|
||||
/* Cycle mode is not supported on this version */
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = ratbag_hidraw_output_report(device, buf, sizeof(buf));
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
buf[0] = STEELSERIES_ID_LED_COLOR_SHORT;
|
||||
buf[1] = led->index + 1;
|
||||
buf[2] = led->color.red;
|
||||
buf[3] = led->color.green;
|
||||
buf[4] = led->color.blue;
|
||||
|
||||
ret = ratbag_hidraw_output_report(device, buf, sizeof(buf));
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
steelseries_write_led_v2(struct ratbag_led *led)
|
||||
{
|
||||
struct ratbag_device *device = led->profile->device;
|
||||
uint8_t buf[STEELSERIES_REPORT_SIZE] = {0};
|
||||
@@ -456,6 +499,20 @@ steelseries_write_led(struct ratbag_led *led)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
steelseries_write_led(struct ratbag_led *led)
|
||||
{
|
||||
struct ratbag_device *device = led->profile->device;
|
||||
int device_version = ratbag_device_data_steelseries_get_device_version(device->data);
|
||||
|
||||
if (device_version == 1)
|
||||
return steelseries_write_led_v1(led);
|
||||
else if (device_version == 2)
|
||||
return steelseries_write_led_v2(led);
|
||||
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static int
|
||||
steelseries_write_save(struct ratbag_device *device)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user