Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package sc-controller for openSUSE:Factory 
checked in at 2021-09-12 20:09:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sc-controller (Old)
 and      /work/SRC/openSUSE:Factory/.sc-controller.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sc-controller"

Sun Sep 12 20:09:35 2021 rev:11 rq:918499 version:0.4.8.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/sc-controller/sc-controller.changes      
2021-07-17 23:37:20.981640882 +0200
+++ /work/SRC/openSUSE:Factory/.sc-controller.new.1899/sc-controller.changes    
2021-09-12 20:09:36.948088884 +0200
@@ -1,0 +2,14 @@
+Thu Sep  9 20:30:22 UTC 2021 - Jannik Seiler <se...@mosad.xyz>
+
+- Update to 0.4.8.6
+  * Fixed initial Import Steam Profiles display list
+  * Added python-vdf to AppImage build script
+  * Fixed inputs tests. Contribution by rnhmjoj
+  * Changed device config flags for Steam Controller to read accel 
+    data from controller
+  * Added Steam Controller accel data in cemuhook. Fixes controller 
+    orientation in CemuHook
+  * Disabled gyro action for default Desktop profile. CemuHook should 
+    not be needed for the Desktop profile
+
+-------------------------------------------------------------------

Old:
----
  sc-controller-0.4.8.5.tar.gz

New:
----
  sc-controller-0.4.8.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sc-controller.spec ++++++
--- /var/tmp/diff_new_pack.FF6tQ9/_old  2021-09-12 20:09:38.352090473 +0200
+++ /var/tmp/diff_new_pack.FF6tQ9/_new  2021-09-12 20:09:38.356090479 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           sc-controller
-Version:        0.4.8.5
+Version:        0.4.8.6
 Release:        0
 Summary:        User-mode driver and GTK3-based GUI for the Steam Controller
 License:        GPL-2.0-only

++++++ sc-controller-0.4.8.5.tar.gz -> sc-controller-0.4.8.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sc-controller-0.4.8.5/appimage-build.sh 
new/sc-controller-0.4.8.6/appimage-build.sh
--- old/sc-controller-0.4.8.5/appimage-build.sh 2021-07-08 20:19:28.000000000 
+0200
+++ new/sc-controller-0.4.8.6/appimage-build.sh 2021-09-09 20:00:13.000000000 
+0200
@@ -50,6 +50,7 @@
 download_dep "python-evdev-0.7.0" 
"https://github.com/gvalkov/python-evdev/archive/v0.7.0.tar.gz";
 download_dep "pylibacl-0.5.3" 
"https://github.com/iustin/pylibacl/releases/download/pylibacl-v0.5.3/pylibacl-0.5.3.tar.gz";
 download_dep "python-gobject-3.36.1" 
"https://archive.archlinux.org/packages/p/python-gobject/python-gobject-3.36.1-1-x86_64.pkg.tar.zst";
+download_dep "python-vdf-3.4" 
"https://github.com/ValvePython/vdf/archive/v3.4.tar.gz";
 download_dep "libpng-1.6.34" 
"https://archive.archlinux.org/packages/l/libpng/libpng-1.6.34-2-x86_64.pkg.tar.xz";
 download_dep "gdk-pixbuf-2.36.9" 
"https://archive.archlinux.org/packages/g/gdk-pixbuf2/gdk-pixbuf2-2.36.9-1-x86_64.pkg.tar.xz";
 download_dep "libcroco-0.6.13" 
"https://archive.archlinux.org/packages/l/libcroco/libcroco-0.6.13-1-x86_64.pkg.tar.xz";
@@ -71,6 +72,7 @@
 
 build_dep "python-evdev-0.7.0"
 build_dep "pylibacl-0.5.3"
+build_dep "python-vdf-3.4"
 unpack_dep "libpng-1.6.34"
 unpack_dep "python-gobject-3.36.1"
 unpack_dep "gdk-pixbuf-2.36.9"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sc-controller-0.4.8.5/default_profiles/Desktop.sccprofile 
new/sc-controller-0.4.8.6/default_profiles/Desktop.sccprofile
--- old/sc-controller-0.4.8.5/default_profiles/Desktop.sccprofile       
2021-07-08 20:19:28.000000000 +0200
+++ new/sc-controller-0.4.8.6/default_profiles/Desktop.sccprofile       
2021-09-09 20:00:13.000000000 +0200
@@ -38,9 +38,7 @@
     "cpad": {
         "action": "mouse()"
     }, 
-    "gyro": {
-       "action": "cemuhook"
-    }, 
+    "gyro": {},
     "is_template": false, 
     "menus": {}, 
     "pad_left": {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sc-controller-0.4.8.5/scc/cemuhook_server.py 
new/sc-controller-0.4.8.6/scc/cemuhook_server.py
--- old/sc-controller-0.4.8.5/scc/cemuhook_server.py    2021-07-08 
20:19:28.000000000 +0200
+++ new/sc-controller-0.4.8.6/scc/cemuhook_server.py    2021-09-09 
20:00:13.000000000 +0200
@@ -60,7 +60,9 @@
        
        def feed(self, data):
                c_data = CemuhookServer.C_DATA_T()
-               c_data[3:6] = data[0:3]
+               #log.debug(data)
+               c_data[0:6] = data[0:6]
+               #log.debug(list(c_data))
                self._lib.cemuhook_feed(self.socket.fileno(), 0, c_data)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sc-controller-0.4.8.5/scc/constants.py 
new/sc-controller-0.4.8.6/scc/constants.py
--- old/sc-controller-0.4.8.5/scc/constants.py  2021-07-08 20:19:28.000000000 
+0200
+++ new/sc-controller-0.4.8.6/scc/constants.py  2021-09-09 20:00:13.000000000 
+0200
@@ -28,7 +28,7 @@
 If SC-Controller is updated while daemon is running, DAEMON_VERSION send by
 daemon will differ one one expected by UI and daemon will be forcefully 
restarted.
 """
-DAEMON_VERSION = "0.4.8.5"
+DAEMON_VERSION = "0.4.8.6"
 
 HPERIOD  = 0.02
 LPERIOD  = 0.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sc-controller-0.4.8.5/scc/drivers/sc_by_bt.c 
new/sc-controller-0.4.8.6/scc/drivers/sc_by_bt.c
--- old/sc-controller-0.4.8.5/scc/drivers/sc_by_bt.c    2021-07-08 
20:19:28.000000000 +0200
+++ new/sc-controller-0.4.8.6/scc/drivers/sc_by_bt.c    2021-09-09 
20:00:13.000000000 +0200
@@ -54,6 +54,9 @@
        int32_t lpad_y;
        int32_t rpad_x;
        int32_t rpad_y;
+       int32_t accel_x;
+       int32_t accel_y;
+       int32_t accel_z;
        int32_t gpitch;
        int32_t groll;
        int32_t gyaw;
@@ -105,7 +108,7 @@
 static inline void debug_packet(char* buffer, size_t size) {
        size_t i;
        for(i=0; i<size; i++)
-               printf("%02x", buffer[i] & 0xff);
+               printf("%02x ", buffer[i] & 0xff);
        printf("\n");
 }
 
@@ -119,7 +122,7 @@
                        return 2;
                memcpy(ptr->buffer + PACKET_SIZE, tmp_buffer + 1, PACKET_SIZE - 
1);
                ptr->long_packet = 0;
-               // debug_packet(ptr->buffer, PACKET_SIZE * 2);
+               //debug_packet(ptr->buffer, PACKET_SIZE * 2);
        } else {
                if (read(ptr->fileno, ptr->buffer, PACKET_SIZE) < PACKET_SIZE)
                        return 2;
@@ -128,7 +131,7 @@
                        // This is 1st part of long packet
                        return 0;
                }
-               // debug_packet(ptr->buffer, PACKET_SIZE);
+               //debug_packet(ptr->buffer, PACKET_SIZE);
        }
        
        struct SCByBtControllerInput* state = &(ptr->state);
@@ -181,7 +184,18 @@
        }
        if ((type & GYRO) == GYRO) {
                if (rv == 0) { *old_state = *state; state->type = type; rv = 1; 
}
-               state->gpitch = *(((int16_t*)data) + 0);
+               state->accel_x = *(((int16_t*)data) + 0);
+               state->accel_y = *(((int16_t*)data) + 1);
+               state->accel_z = *(((int16_t*)data) + 2);
+               state->gpitch = *(((int16_t*)data) + 3);
+               state->groll = *(((int16_t*)data) + 4);
+               state->gyaw = *(((int16_t*)data) + 5);
+               state->q1 = *(((int16_t*)data) + 6);
+               state->q2 = *(((int16_t*)data) + 7);
+               state->q3 = *(((int16_t*)data) + 8);
+               state->q4 = *(((int16_t*)data) + 9);
+               data += 20;
+               /*state->gpitch = *(((int16_t*)data) + 0);
                state->groll = *(((int16_t*)data) + 1);
                state->gyaw = *(((int16_t*)data) + 2);
                state->q1 = *(((int16_t*)data) + 3);
@@ -189,6 +203,7 @@
                state->q3 = *(((int16_t*)data) + 5);
                state->q4 = *(((int16_t*)data) + 6);
                data += 14;
+               */
        }
        
        return rv;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sc-controller-0.4.8.5/scc/drivers/sc_by_bt.py 
new/sc-controller-0.4.8.6/scc/drivers/sc_by_bt.py
--- old/sc-controller-0.4.8.5/scc/drivers/sc_by_bt.py   2021-07-08 
20:19:28.000000000 +0200
+++ new/sc-controller-0.4.8.6/scc/drivers/sc_by_bt.py   2021-09-09 
20:00:13.000000000 +0200
@@ -34,6 +34,9 @@
                ('lpad_y', ctypes.c_int32),
                ('rpad_x', ctypes.c_int32),
                ('rpad_y', ctypes.c_int32),
+               ('accel_x', ctypes.c_int32),
+               ('accel_y', ctypes.c_int32),
+               ('accel_z', ctypes.c_int32),
                ('gpitch', ctypes.c_int32),
                ('groll', ctypes.c_int32),
                ('gyaw', ctypes.c_int32),
@@ -189,7 +192,8 @@
                        SCPacketLength.CONFIGURE_BT,
                        SCConfigType.CONFIGURE_BT,
                        unknown1,
-                       0x14 if self._enable_gyros else 0,
+                       # 0x10 (Gyro) | 0x08 (Accel) | 0x04 (Quat)
+                       0x1C if self._enable_gyros else 0,
                        unknown2))
                
                # LED
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sc-controller-0.4.8.5/scc/drivers/sc_dongle.py 
new/sc-controller-0.4.8.6/scc/drivers/sc_dongle.py
--- old/sc-controller-0.4.8.5/scc/drivers/sc_dongle.py  2021-07-08 
20:19:28.000000000 +0200
+++ new/sc-controller-0.4.8.6/scc/drivers/sc_dongle.py  2021-09-09 
20:00:13.000000000 +0200
@@ -36,7 +36,10 @@
        ('h',   'lpad_y'),
        ('h',   'rpad_x'),
        ('h',   'rpad_y'),
-       ('10x', 'ukn_06'),
+       ('4x',  'ukn_06'),
+       ('h',   'accel_x'),
+       ('h',   'accel_y'),
+       ('h',   'accel_z'),
        ('h',   'gpitch'),
        ('h',   'groll'),
        ('h',   'gyaw'),
@@ -207,6 +210,7 @@
                                                idata.type, idata.status, 
idata.seq, idata.buttons,
                                                idata.ltrig, idata.rtrig,
                                                lx, ly, rx, ry,
+                                               idata.accel_x, idata.accel_y, 
idata.accel_z,
                                                idata.gpitch, idata.groll, 
idata.gyaw,
                                                idata.q1, idata.q2, idata.q3, 
idata.q4
                                )
@@ -334,7 +338,8 @@
                        SCConfigType.CONFIGURE,
                        timeout1, timeout2,
                        unknown1,
-                       0x14 if self._enable_gyros else 0,
+                       # 0x10 (Gyro) | 0x08 (Accel) | 0x04 (Quat)
+                       0x1C if self._enable_gyros else 0,
                        unknown2))
                
                # LED
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sc-controller-0.4.8.5/scc/foreign/vdf.py 
new/sc-controller-0.4.8.6/scc/foreign/vdf.py
--- old/sc-controller-0.4.8.5/scc/foreign/vdf.py        2021-07-08 
20:19:28.000000000 +0200
+++ new/sc-controller-0.4.8.6/scc/foreign/vdf.py        2021-09-09 
20:00:13.000000000 +0200
@@ -23,10 +23,10 @@
 class VDFProfile(Profile):
        BUTTON_TO_BUTTON = {
                # maps button keys from vdf file to SCButtons constants
-               'button_a'                      : SCButtons.A,
-               'button_b'                      : SCButtons.B,
-               'button_x'                      : SCButtons.X,
-               'button_y'                      : SCButtons.Y,
+               'button_A'                      : SCButtons.A,
+               'button_B'                      : SCButtons.B,
+               'button_X'                      : SCButtons.X,
+               'button_Y'                      : SCButtons.Y,
                'button_back_left'      : SCButtons.LGRIP,
                'button_back_right'     : SCButtons.RGRIP,
                'button_menu'           : SCButtons.BACK,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sc-controller-0.4.8.5/scc/gui/importexport/import_vdf.py 
new/sc-controller-0.4.8.6/scc/gui/importexport/import_vdf.py
--- old/sc-controller-0.4.8.5/scc/gui/importexport/import_vdf.py        
2021-07-08 20:19:28.000000000 +0200
+++ new/sc-controller-0.4.8.6/scc/gui/importexport/import_vdf.py        
2021-09-09 20:00:13.000000000 +0200
@@ -74,7 +74,8 @@
                from there.
                Calls GLib.idle_add to send loaded data into UI.
                """
-               data = parse_vdf(open(filename, "r"))
+               # VDF file is a ISO-8859-1 encoded file. Not UTF-8
+               data = parse_vdf(open(filename, "r", encoding = "ISO-8859-1"))
                # Sanity check
                if "UserLocalConfigStore" not in data: return
                if "controller_config" not in data["UserLocalConfigStore"]: 
return
@@ -263,9 +264,12 @@
                """
                tvVdfProfiles = self.builder.get_object("tvVdfProfiles")
                model, iter = tvVdfProfiles.get_selection().get_selected()
-               filename = model.get_value(iter, 3)
+               filename = None
+               if iter:
+                       filename = model.get_value(iter, 3)
+
                self.enable_next(filename is not None, self.import_vdf)
-       
+
        
        @staticmethod
        def gen_aset_name(base_name, set_name):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sc-controller-0.4.8.5/scc/lib/vdf.py 
new/sc-controller-0.4.8.6/scc/lib/vdf.py
--- old/sc-controller-0.4.8.5/scc/lib/vdf.py    2021-07-08 20:19:28.000000000 
+0200
+++ new/sc-controller-0.4.8.6/scc/lib/vdf.py    2021-09-09 20:00:13.000000000 
+0200
@@ -17,28 +17,12 @@
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 """
 import os, sys, importlib
-
+import vdf
 
 def parse_vdf(file):
-       # employ arcane rituals to import a better vdf parser
-       
-       # find system installed vdf package
-       locs = sys.path[1:]
-       for d in locs:
-               if os.path.isdir(d):
-                       if os.path.isdir(os.path.join(d, 'vdf')):
-                               vdfpath = os.path.join(d, 'vdf/__init__.py')
-                               
-       if not vdfpath:
-               raise ModuleNotFoundError("vdf package not found!")
-
-       # import it
-       spec = importlib.util.spec_from_file_location('vdf', vdfpath)
-       vdf = importlib.util.module_from_spec(spec)
-       sys.modules[spec.name] = vdf
-       spec.loader.exec_module(vdf)
        return vdf.parse(file, mapper=vdf.VDFDict, merge_duplicate_keys=False)
 
+
 def ensure_list(value):
        """
        If value is list, returns same value.
@@ -49,4 +33,3 @@
 
 if __name__ == "__main__":
        print(parse_vdf(open('test.vdf', "r")))
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sc-controller-0.4.8.5/scc/special_actions.py 
new/sc-controller-0.4.8.6/scc/special_actions.py
--- old/sc-controller-0.4.8.5/scc/special_actions.py    2021-07-08 
20:19:28.000000000 +0200
+++ new/sc-controller-0.4.8.6/scc/special_actions.py    2021-09-09 
20:00:13.000000000 +0200
@@ -757,13 +757,18 @@
 class CemuHookAction(Action, SpecialAction):
        SA = COMMAND = "cemuhook"
        MAGIC_GYRO = (2000.0 / 32768.0)
+       ACC_RES_PER_G = 16384.0
        
        def gyro(self, mapper, *pyr):
                sa_data = (
-                       pyr[0] * CemuHookAction.MAGIC_GYRO,
-                       -pyr[1] * CemuHookAction.MAGIC_GYRO,
-                       -pyr[2] * CemuHookAction.MAGIC_GYRO,
+                       -mapper.state.accel_x / CemuHookAction.ACC_RES_PER_G, # 
AccelX
+                       -mapper.state.accel_z / CemuHookAction.ACC_RES_PER_G, # 
AccelZ
+                       mapper.state.accel_y / CemuHookAction.ACC_RES_PER_G, # 
AccelY
+                       pyr[0] * CemuHookAction.MAGIC_GYRO, # Gyro Pitch
+                       -pyr[1] * CemuHookAction.MAGIC_GYRO, # Gyro Yaw
+                       -pyr[2] * CemuHookAction.MAGIC_GYRO, # Gyro Roll
                )
+               #log.debug(sa_data)
                self.execute(mapper, sa_data)
        
        def describe(self, context):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sc-controller-0.4.8.5/tests/README.md 
new/sc-controller-0.4.8.6/tests/README.md
--- old/sc-controller-0.4.8.5/tests/README.md   2021-07-08 20:19:28.000000000 
+0200
+++ new/sc-controller-0.4.8.6/tests/README.md   2021-09-09 20:00:13.000000000 
+0200
@@ -3,4 +3,4 @@
 Tests are using [pytest framework](https://docs.pytest.org/en/latest/).
 
 To run all of them, navigate to directory above and do
-`$ PYTHONPATH=. py.test2 tests`
+`$ PYTHONPATH=. pytest tests`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sc-controller-0.4.8.5/tests/test_inputs.py 
new/sc-controller-0.4.8.6/tests/test_inputs.py
--- old/sc-controller-0.4.8.5/tests/test_inputs.py      2021-07-08 
20:19:28.000000000 +0200
+++ new/sc-controller-0.4.8.6/tests/test_inputs.py      2021-09-09 
20:00:13.000000000 +0200
@@ -70,7 +70,6 @@
                self.scroll_y = 0
                self.axes = {}
        
-       
        def axisEvent(self, axis, val):
                self.axes[axis] = val
        
@@ -96,6 +95,9 @@
                        if k in self.pressed:
                                self.pressed.remove(k)
 
+       def clearRemainders(self):
+               pass
+
 
 class TestInputs(object):
        @input_test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sc-controller-0.4.8.5/tests/test_vdf.py 
new/sc-controller-0.4.8.6/tests/test_vdf.py
--- old/sc-controller-0.4.8.5/tests/test_vdf.py 2021-07-08 20:19:28.000000000 
+0200
+++ new/sc-controller-0.4.8.6/tests/test_vdf.py 2021-09-09 20:00:13.000000000 
+0200
@@ -3,6 +3,7 @@
 from io import StringIO
 import os
 import pytest
+import vdf
 
 class TestVDF(object):
        """ Tests VDF parser """
@@ -13,13 +14,14 @@
                "data"
                {
                        "version" "3"
-                       "more data" {
+                       "more data"
+                       {
                                "version" "7"
                        }
                }
                """)
                parsed = parse_vdf(sio)
-               assert type(parsed["data"]) == dict
+               assert type(parsed["data"]) == vdf.vdict.VDFDict
                assert parsed["data"]["version"] == "3"
                assert parsed["data"]["more data"]["version"] == "7"
        
@@ -37,7 +39,7 @@
                        }
                }
                """)
-               with pytest.raises(ValueError) as excinfo:
+               with pytest.raises(SyntaxError) as excinfo:
                        parsed = parse_vdf(sio)
        
        
@@ -53,7 +55,7 @@
                                "version" "7"
                        }
                """)
-               with pytest.raises(ValueError) as excinfo:
+               with pytest.raises(SyntaxError) as excinfo:
                        parsed = parse_vdf(sio)
        
        
@@ -71,7 +73,7 @@
                        }
                }
                """)
-               with pytest.raises(ValueError) as excinfo:
+               with pytest.raises(SyntaxError) as excinfo:
                        parsed = parse_vdf(sio)
        
        
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sc-controller-0.4.8.5/tests/vdfs/241100_674847325.vdf 
new/sc-controller-0.4.8.6/tests/vdfs/241100_674847325.vdf
--- old/sc-controller-0.4.8.5/tests/vdfs/241100_674847325.vdf   2021-07-08 
20:19:28.000000000 +0200
+++ new/sc-controller-0.4.8.6/tests/vdfs/241100_674847325.vdf   2021-09-09 
20:00:13.000000000 +0200
@@ -7,10 +7,10 @@
                "mode"          "four_buttons"
                "bindings"
                {
-                       "button_a"              "key_press SPACE, Secondary 
Situational"
+                       "button_A"              "key_press SPACE, Secondary 
Situational"
                        "button_B"              "key_press X, Free look with 
left touch"
                        "button_X"              "key_press C, Camera View"
-                       "button_y"              "key_press F, Special Ability"
+                       "button_Y"              "key_press F, Special Ability"
                }
                "settings"
                {

Reply via email to