Hello community,

here is the log from the commit of package iio-sensor-proxy for 
openSUSE:Factory checked in at 2019-09-13 14:58:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/iio-sensor-proxy (Old)
 and      /work/SRC/openSUSE:Factory/.iio-sensor-proxy.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "iio-sensor-proxy"

Fri Sep 13 14:58:08 2019 rev:17 rq:730088 version:2.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/iio-sensor-proxy/iio-sensor-proxy.changes        
2019-06-26 16:04:06.931636314 +0200
+++ 
/work/SRC/openSUSE:Factory/.iio-sensor-proxy.new.7948/iio-sensor-proxy.changes  
    2019-09-13 14:58:15.337277076 +0200
@@ -1,0 +2,8 @@
+Wed Sep 11 08:10:23 UTC 2019 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Update to version 2.8:
+  + Add support for accelerometers in ChromeBooks.
+  + Fix screen orientation in favour of portrait when rotating
+    display instead of favouring the previous orientation.
+
+-------------------------------------------------------------------

Old:
----
  iio-sensor-proxy-2.7.tar.xz

New:
----
  iio-sensor-proxy-2.8.tar.xz

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

Other differences:
------------------
++++++ iio-sensor-proxy.spec ++++++
--- /var/tmp/diff_new_pack.Z4Culi/_old  2019-09-13 14:58:17.169277153 +0200
+++ /var/tmp/diff_new_pack.Z4Culi/_new  2019-09-13 14:58:17.169277153 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           iio-sensor-proxy
-Version:        2.7
+Version:        2.8
 Release:        0
 Summary:        Proxy for IIO and input subsystems
 License:        GPL-3.0-only

++++++ iio-sensor-proxy-2.7.tar.xz -> iio-sensor-proxy-2.8.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/Makefile.decl 
new/iio-sensor-proxy-2.8/Makefile.decl
--- old/iio-sensor-proxy-2.7/Makefile.decl      1970-01-01 01:00:00.000000000 
+0100
+++ new/iio-sensor-proxy-2.8/Makefile.decl      2019-09-04 16:04:13.000000000 
+0200
@@ -0,0 +1,54 @@
+# Note, we need this set for umockdev to be available in tests
+GTESTER        = gtester               # in $PATH for non-GLIB packages
+GTESTER_REPORT = gtester-report                # in $PATH for non-GLIB packages
+
+# initialize variables for unconditional += appending
+TEST_PROGS =
+
+# test: run all tests in cwd and subdirs
+test:  ${TEST_PROGS}
+       @test -z "${TEST_PROGS}" || ${GTESTER} --verbose ${TEST_PROGS}
+       @ for subdir in $(SUBDIRS) . ; do \
+           test "$$subdir" = "." -o "$$subdir" = "po" || \
+           ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
+         done
+
+# test-report: run tests in subdirs and generate report
+# perf-report: run tests in subdirs with -m perf and generate report
+# full-report: like test-report: with -m perf and -m slow
+test-report perf-report full-report:   ${TEST_PROGS}
+       @test -z "${TEST_PROGS}" || { \
+         case $@ in \
+         test-report) test_options="-k";; \
+         perf-report) test_options="-k -m=perf";; \
+         full-report) test_options="-k -m=perf -m=slow";; \
+         esac ; \
+         if test -z "$$GTESTER_LOGDIR" ; then  \
+           ${GTESTER} --verbose $$test_options -o test-report.xml 
${TEST_PROGS} ; \
+         elif test -n "${TEST_PROGS}" ; then \
+           ${GTESTER} --verbose $$test_options -o `mktemp 
"$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
+         fi ; \
+       }
+       @ ignore_logdir=true ; \
+         if test -z "$$GTESTER_LOGDIR" ; then \
+           GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export 
GTESTER_LOGDIR ; \
+           ignore_logdir=false ; \
+         fi ; \
+         for subdir in $(SUBDIRS) . ; do \
+           test "$$subdir" = "." -o "$$subdir" = "po" || \
+           ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
+         done ; \
+         $$ignore_logdir || { \
+           echo '<?xml version="1.0"?>' > $@.xml ; \
+           echo '<report-collection>'  >> $@.xml ; \
+           for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
+             sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> 
$@.xml ; \
+           done ; \
+           echo >> $@.xml ; \
+           echo '</report-collection>' >> $@.xml ; \
+           rm -rf "$$GTESTER_LOGDIR"/ ; \
+           ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || 
${GTESTER_REPORT} $@.xml >$@.html ; \
+         }
+.PHONY: test test-report perf-report full-report
+# run make test as part of make check
+check-local: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/NEWS 
new/iio-sensor-proxy-2.8/NEWS
--- old/iio-sensor-proxy-2.7/NEWS       2019-05-20 10:57:03.000000000 +0200
+++ new/iio-sensor-proxy-2.8/NEWS       2019-09-04 18:16:51.000000000 +0200
@@ -1,3 +1,10 @@
+2.8
+---
+
+This release adds support for accelerometers in ChromeBooks, and also
+fixes the screen orientation in favour of portrait when rotating the
+display instead of favouring the previous orientation.
+
 2.7
 ---
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/build-aux/compile 
new/iio-sensor-proxy-2.8/build-aux/compile
--- old/iio-sensor-proxy-2.7/build-aux/compile  2019-05-14 12:51:50.000000000 
+0200
+++ new/iio-sensor-proxy-2.8/build-aux/compile  2019-09-04 18:17:26.000000000 
+0200
@@ -1,4 +1,4 @@
-#!/usr/bin/sh
+#! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
 scriptversion=2018-03-07.03; # UTC
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/build-aux/config.guess 
new/iio-sensor-proxy-2.8/build-aux/config.guess
--- old/iio-sensor-proxy-2.7/build-aux/config.guess     2019-05-14 
12:51:50.000000000 +0200
+++ new/iio-sensor-proxy-2.8/build-aux/config.guess     2019-09-04 
18:17:26.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/sh
+#! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright 1992-2018 Free Software Foundation, Inc.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/build-aux/config.sub 
new/iio-sensor-proxy-2.8/build-aux/config.sub
--- old/iio-sensor-proxy-2.7/build-aux/config.sub       2019-05-14 
12:51:50.000000000 +0200
+++ new/iio-sensor-proxy-2.8/build-aux/config.sub       2019-09-04 
18:17:26.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/sh
+#! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright 1992-2018 Free Software Foundation, Inc.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/build-aux/depcomp 
new/iio-sensor-proxy-2.8/build-aux/depcomp
--- old/iio-sensor-proxy-2.7/build-aux/depcomp  2019-05-14 12:51:50.000000000 
+0200
+++ new/iio-sensor-proxy-2.8/build-aux/depcomp  2019-09-04 18:17:26.000000000 
+0200
@@ -1,4 +1,4 @@
-#!/usr/bin/sh
+#! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
 scriptversion=2018-03-07.03; # UTC
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/build-aux/install-sh 
new/iio-sensor-proxy-2.8/build-aux/install-sh
--- old/iio-sensor-proxy-2.7/build-aux/install-sh       2019-05-14 
12:51:50.000000000 +0200
+++ new/iio-sensor-proxy-2.8/build-aux/install-sh       2019-09-04 
18:17:26.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/sh
+#!/bin/sh
 # install - install a program, script, or datafile
 
 scriptversion=2018-03-11.20; # UTC
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/build-aux/missing 
new/iio-sensor-proxy-2.8/build-aux/missing
--- old/iio-sensor-proxy-2.7/build-aux/missing  2019-05-14 12:51:50.000000000 
+0200
+++ new/iio-sensor-proxy-2.8/build-aux/missing  2019-09-04 18:17:26.000000000 
+0200
@@ -1,4 +1,4 @@
-#!/usr/bin/sh
+#! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
 scriptversion=2018-03-07.03; # UTC
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/configure 
new/iio-sensor-proxy-2.8/configure
--- old/iio-sensor-proxy-2.7/configure  2019-05-20 10:59:50.000000000 +0200
+++ new/iio-sensor-proxy-2.8/configure  2019-09-04 18:17:26.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for iio-sensor-proxy 2.7.
+# Generated by GNU Autoconf 2.69 for iio-sensor-proxy 2.8.
 #
 # Report bugs to <had...@hadess.net>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='iio-sensor-proxy'
 PACKAGE_TARNAME='iio-sensor-proxy'
-PACKAGE_VERSION='2.7'
-PACKAGE_STRING='iio-sensor-proxy 2.7'
+PACKAGE_VERSION='2.8'
+PACKAGE_STRING='iio-sensor-proxy 2.8'
 PACKAGE_BUGREPORT='had...@hadess.net'
 PACKAGE_URL=''
 
@@ -1289,7 +1289,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures iio-sensor-proxy 2.7 to adapt to many kinds of systems.
+\`configure' configures iio-sensor-proxy 2.8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1360,7 +1360,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of iio-sensor-proxy 2.7:";;
+     short | recursive ) echo "Configuration of iio-sensor-proxy 2.8:";;
    esac
   cat <<\_ACEOF
 
@@ -1485,7 +1485,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-iio-sensor-proxy configure 2.7
+iio-sensor-proxy configure 2.8
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1586,7 +1586,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by iio-sensor-proxy $as_me 2.7, which was
+It was created by iio-sensor-proxy $as_me 2.8, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2465,7 +2465,7 @@
 
 # Define the identity of the package.
  PACKAGE='iio-sensor-proxy'
- VERSION='2.7'
+ VERSION='2.8'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -6959,7 +6959,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by iio-sensor-proxy $as_me 2.7, which was
+This file was extended by iio-sensor-proxy $as_me 2.8, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7016,7 +7016,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-iio-sensor-proxy config.status 2.7
+iio-sensor-proxy config.status 2.8
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/configure.ac 
new/iio-sensor-proxy-2.8/configure.ac
--- old/iio-sensor-proxy-2.7/configure.ac       2019-05-20 10:59:27.000000000 
+0200
+++ new/iio-sensor-proxy-2.8/configure.ac       2019-09-04 18:15:25.000000000 
+0200
@@ -1,6 +1,6 @@
 AC_PREREQ(2.59)
 
-AC_INIT([iio-sensor-proxy], [2.7], [had...@hadess.net])
+AC_INIT([iio-sensor-proxy], [2.8], [had...@hadess.net])
 
 AX_IS_RELEASE([git-directory])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/iio-sensor-proxy-2.7/docs/html/gdbus-net.hadess.SensorProxy.Compass.html 
new/iio-sensor-proxy-2.8/docs/html/gdbus-net.hadess.SensorProxy.Compass.html
--- 
old/iio-sensor-proxy-2.7/docs/html/gdbus-net.hadess.SensorProxy.Compass.html    
    2019-05-20 10:59:54.000000000 +0200
+++ 
new/iio-sensor-proxy-2.8/docs/html/gdbus-net.hadess.SensorProxy.Compass.html    
    2019-09-04 18:17:31.000000000 +0200
@@ -8,7 +8,7 @@
 <link rel="up" href="ref-dbus.html" title="D-Bus API Reference">
 <link rel="prev" href="gdbus-net.hadess.SensorProxy.html" 
title="net.hadess.SensorProxy">
 <link rel="next" href="ix01.html" title="Index">
-<meta name="generator" content="GTK-Doc V1.29 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.29.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" 
alink="#0000FF">
@@ -112,6 +112,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.29</div>
+<hr>Generated by GTK-Doc V1.29.1</div>
 </body>
 </html>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/iio-sensor-proxy-2.7/docs/html/gdbus-net.hadess.SensorProxy.html 
new/iio-sensor-proxy-2.8/docs/html/gdbus-net.hadess.SensorProxy.html
--- old/iio-sensor-proxy-2.7/docs/html/gdbus-net.hadess.SensorProxy.html        
2019-05-20 10:59:54.000000000 +0200
+++ new/iio-sensor-proxy-2.8/docs/html/gdbus-net.hadess.SensorProxy.html        
2019-09-04 18:17:31.000000000 +0200
@@ -8,7 +8,7 @@
 <link rel="up" href="ref-dbus.html" title="D-Bus API Reference">
 <link rel="prev" href="ref-dbus.html" title="D-Bus API Reference">
 <link rel="next" href="gdbus-net.hadess.SensorProxy.Compass.html" 
title="net.hadess.SensorProxy.Compass">
-<meta name="generator" content="GTK-Doc V1.29 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.29.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" 
alink="#0000FF">
@@ -188,6 +188,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.29</div>
+<hr>Generated by GTK-Doc V1.29.1</div>
 </body>
 </html>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/docs/html/index.html 
new/iio-sensor-proxy-2.8/docs/html/index.html
--- old/iio-sensor-proxy-2.7/docs/html/index.html       2019-05-20 
10:59:54.000000000 +0200
+++ new/iio-sensor-proxy-2.8/docs/html/index.html       2019-09-04 
18:17:31.000000000 +0200
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
 <link rel="home" href="index.html" title="Sensor Proxy Reference Manual">
 <link rel="next" href="ref-dbus.html" title="D-Bus API Reference">
-<meta name="generator" content="GTK-Doc V1.29 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.29.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" 
alink="#0000FF">
@@ -22,7 +22,7 @@
            <code class="email">&lt;<a class="email" 
href="mailto:had...@hadess.net";>had...@hadess.net</a>&gt;</code><br>
          </p></div></div>
 </div></div></div>
-<div><p class="releaseinfo">Version 2.7
+<div><p class="releaseinfo">Version 2.8
 </p></div>
 <div><p class="copyright">Copyright © 2015 Red Hat, Inc.</p></div>
 <div><div class="legalnotice">
@@ -72,6 +72,6 @@
 </dl></div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.29</div>
+<hr>Generated by GTK-Doc V1.29.1</div>
 </body>
 </html>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/docs/html/ix01.html 
new/iio-sensor-proxy-2.8/docs/html/ix01.html
--- old/iio-sensor-proxy-2.7/docs/html/ix01.html        2019-05-20 
10:59:54.000000000 +0200
+++ new/iio-sensor-proxy-2.8/docs/html/ix01.html        2019-09-04 
18:17:31.000000000 +0200
@@ -8,7 +8,7 @@
 <link rel="up" href="index.html" title="Sensor Proxy Reference Manual">
 <link rel="prev" href="gdbus-net.hadess.SensorProxy.Compass.html" 
title="net.hadess.SensorProxy.Compass">
 <link rel="next" href="license.html" title="Appendix A. License">
-<meta name="generator" content="GTK-Doc V1.29 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.29.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" 
alink="#0000FF">
@@ -25,40 +25,40 @@
 <div xmlns:xlink="http://www.w3.org/1999/xlink"; class="index"><div 
class="indexdiv">
 <h3>N</h3>
 <dl>
-<dt id="ientry-idm45516665756912">net.hadess.SensorProxy, <a class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-interface-net-hadess-SensorProxy.top_of_page">net.hadess.SensorProxy</a>
+<dt id="ientry-idm46258508909824">net.hadess.SensorProxy, <a class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-interface-net-hadess-SensorProxy.top_of_page">net.hadess.SensorProxy</a>
 </dt>
-<dt id="ientry-idm45516673450896">net.hadess.SensorProxy.ClaimAccelerometer(), 
<a class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-method-net-hadess-SensorProxy.ClaimAccelerometer">The
 ClaimAccelerometer() method</a>
+<dt id="ientry-idm46258514976176">net.hadess.SensorProxy.ClaimAccelerometer(), 
<a class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-method-net-hadess-SensorProxy.ClaimAccelerometer">The
 ClaimAccelerometer() method</a>
 </dt>
-<dt id="ientry-idm45516673414864">net.hadess.SensorProxy.ClaimLight(), <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-method-net-hadess-SensorProxy.ClaimLight">The
 ClaimLight() method</a>
+<dt id="ientry-idm46258514965248">net.hadess.SensorProxy.ClaimLight(), <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-method-net-hadess-SensorProxy.ClaimLight">The
 ClaimLight() method</a>
 </dt>
-<dt id="ientry-idm45516664925296">net.hadess.SensorProxy.Compass, <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.Compass.html#gdbus-interface-net-hadess-SensorProxy-Compass.top_of_page">net.hadess.SensorProxy.Compass</a>
+<dt id="ientry-idm46258506654416">net.hadess.SensorProxy.Compass, <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.Compass.html#gdbus-interface-net-hadess-SensorProxy-Compass.top_of_page">net.hadess.SensorProxy.Compass</a>
 </dt>
-<dt 
id="ientry-idm45516666467040">net.hadess.SensorProxy.Compass.ClaimCompass(), <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.Compass.html#gdbus-method-net-hadess-SensorProxy-Compass.ClaimCompass">The
 ClaimCompass() method</a>
+<dt 
id="ientry-idm46258508499136">net.hadess.SensorProxy.Compass.ClaimCompass(), <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.Compass.html#gdbus-method-net-hadess-SensorProxy-Compass.ClaimCompass">The
 ClaimCompass() method</a>
 </dt>
-<dt 
id="ientry-idm45516667481648">net.hadess.SensorProxy.Compass.ReleaseCompass(), 
<a class="indexterm" 
href="gdbus-net.hadess.SensorProxy.Compass.html#gdbus-method-net-hadess-SensorProxy-Compass.ReleaseCompass">The
 ReleaseCompass() method</a>
+<dt 
id="ientry-idm46258509662560">net.hadess.SensorProxy.Compass.ReleaseCompass(), 
<a class="indexterm" 
href="gdbus-net.hadess.SensorProxy.Compass.html#gdbus-method-net-hadess-SensorProxy-Compass.ReleaseCompass">The
 ReleaseCompass() method</a>
 </dt>
-<dt 
id="ientry-idm45516666828064">net.hadess.SensorProxy.Compass:CompassHeading, <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.Compass.html#gdbus-property-net-hadess-SensorProxy-Compass.CompassHeading">The
 "CompassHeading" property</a>
+<dt 
id="ientry-idm46258507570880">net.hadess.SensorProxy.Compass:CompassHeading, <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.Compass.html#gdbus-property-net-hadess-SensorProxy-Compass.CompassHeading">The
 "CompassHeading" property</a>
 </dt>
-<dt id="ientry-idm45516666832208">net.hadess.SensorProxy.Compass:HasCompass, 
<a class="indexterm" 
href="gdbus-net.hadess.SensorProxy.Compass.html#gdbus-property-net-hadess-SensorProxy-Compass.HasCompass">The
 "HasCompass" property</a>
+<dt id="ientry-idm46258507574896">net.hadess.SensorProxy.Compass:HasCompass, 
<a class="indexterm" 
href="gdbus-net.hadess.SensorProxy.Compass.html#gdbus-property-net-hadess-SensorProxy-Compass.HasCompass">The
 "HasCompass" property</a>
 </dt>
-<dt 
id="ientry-idm45516673419616">net.hadess.SensorProxy.ReleaseAccelerometer(), <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-method-net-hadess-SensorProxy.ReleaseAccelerometer">The
 ReleaseAccelerometer() method</a>
+<dt 
id="ientry-idm46258514970000">net.hadess.SensorProxy.ReleaseAccelerometer(), <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-method-net-hadess-SensorProxy.ReleaseAccelerometer">The
 ReleaseAccelerometer() method</a>
 </dt>
-<dt id="ientry-idm45516673408368">net.hadess.SensorProxy.ReleaseLight(), <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-method-net-hadess-SensorProxy.ReleaseLight">The
 ReleaseLight() method</a>
+<dt id="ientry-idm46258515161888">net.hadess.SensorProxy.ReleaseLight(), <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-method-net-hadess-SensorProxy.ReleaseLight">The
 ReleaseLight() method</a>
 </dt>
-<dt 
id="ientry-idm45516673397776">net.hadess.SensorProxy:AccelerometerOrientation, 
<a class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-property-net-hadess-SensorProxy.AccelerometerOrientation">The
 "AccelerometerOrientation" property</a>
+<dt 
id="ientry-idm46258508284064">net.hadess.SensorProxy:AccelerometerOrientation, 
<a class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-property-net-hadess-SensorProxy.AccelerometerOrientation">The
 "AccelerometerOrientation" property</a>
 </dt>
-<dt id="ientry-idm45516673401744">net.hadess.SensorProxy:HasAccelerometer, <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-property-net-hadess-SensorProxy.HasAccelerometer">The
 "HasAccelerometer" property</a>
+<dt id="ientry-idm46258515155264">net.hadess.SensorProxy:HasAccelerometer, <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-property-net-hadess-SensorProxy.HasAccelerometer">The
 "HasAccelerometer" property</a>
 </dt>
-<dt id="ientry-idm45516667135184">net.hadess.SensorProxy:HasAmbientLight, <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-property-net-hadess-SensorProxy.HasAmbientLight">The
 "HasAmbientLight" property</a>
+<dt id="ientry-idm46258508280160">net.hadess.SensorProxy:HasAmbientLight, <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-property-net-hadess-SensorProxy.HasAmbientLight">The
 "HasAmbientLight" property</a>
 </dt>
-<dt id="ientry-idm45516667126160">net.hadess.SensorProxy:LightLevel, <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-property-net-hadess-SensorProxy.LightLevel">The
 "LightLevel" property</a>
+<dt id="ientry-idm46258508271136">net.hadess.SensorProxy:LightLevel, <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-property-net-hadess-SensorProxy.LightLevel">The
 "LightLevel" property</a>
 </dt>
-<dt id="ientry-idm45516667131216">net.hadess.SensorProxy:LightLevelUnit, <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-property-net-hadess-SensorProxy.LightLevelUnit">The
 "LightLevelUnit" property</a>
+<dt id="ientry-idm46258508276192">net.hadess.SensorProxy:LightLevelUnit, <a 
class="indexterm" 
href="gdbus-net.hadess.SensorProxy.html#gdbus-property-net-hadess-SensorProxy.LightLevelUnit">The
 "LightLevelUnit" property</a>
 </dt>
 </dl>
 </div></div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.29</div>
+<hr>Generated by GTK-Doc V1.29.1</div>
 </body>
 </html>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/docs/html/license.html 
new/iio-sensor-proxy-2.8/docs/html/license.html
--- old/iio-sensor-proxy-2.7/docs/html/license.html     2019-05-20 
10:59:54.000000000 +0200
+++ new/iio-sensor-proxy-2.8/docs/html/license.html     2019-09-04 
18:17:31.000000000 +0200
@@ -7,7 +7,7 @@
 <link rel="home" href="index.html" title="Sensor Proxy Reference Manual">
 <link rel="up" href="index.html" title="Sensor Proxy Reference Manual">
 <link rel="prev" href="ix01.html" title="Index">
-<meta name="generator" content="GTK-Doc V1.29 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.29.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" 
alink="#0000FF">
@@ -28,6 +28,6 @@
     </p>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.29</div>
+<hr>Generated by GTK-Doc V1.29.1</div>
 </body>
 </html>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/docs/html/ref-dbus.html 
new/iio-sensor-proxy-2.8/docs/html/ref-dbus.html
--- old/iio-sensor-proxy-2.7/docs/html/ref-dbus.html    2019-05-20 
10:59:54.000000000 +0200
+++ new/iio-sensor-proxy-2.8/docs/html/ref-dbus.html    2019-09-04 
18:17:31.000000000 +0200
@@ -8,7 +8,7 @@
 <link rel="up" href="index.html" title="Sensor Proxy Reference Manual">
 <link rel="prev" href="index.html" title="Sensor Proxy Reference Manual">
 <link rel="next" href="gdbus-net.hadess.SensorProxy.html" 
title="net.hadess.SensorProxy">
-<meta name="generator" content="GTK-Doc V1.29 (XML mode)">
+<meta name="generator" content="GTK-Doc V1.29.1 (XML mode)">
 <link rel="stylesheet" href="style.css" type="text/css">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" 
alink="#0000FF">
@@ -45,6 +45,6 @@
 </div>
 </div>
 <div class="footer">
-<hr>Generated by GTK-Doc V1.29</div>
+<hr>Generated by GTK-Doc V1.29.1</div>
 </body>
 </html>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/src/Makefile.am 
new/iio-sensor-proxy-2.8/src/Makefile.am
--- old/iio-sensor-proxy-2.7/src/Makefile.am    2019-05-13 14:03:11.000000000 
+0200
+++ new/iio-sensor-proxy-2.8/src/Makefile.am    2019-09-04 16:04:13.000000000 
+0200
@@ -48,6 +48,9 @@
        $(WARN_CFLAGS)
 fake_input_accelerometer_LDADD = $(IIO_SENSOR_PROXY_LIBS)
 
+include $(top_srcdir)/Makefile.decl
+TEST_PROGS += test-mount-matrix test-accel-location test-orientation
+
 test_mount_matrix_SOURCES =                    \
        test-mount-matrix.c                     \
        accel-mount-matrix.h                    \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/src/Makefile.in 
new/iio-sensor-proxy-2.8/src/Makefile.in
--- old/iio-sensor-proxy-2.7/src/Makefile.in    2019-05-20 10:59:50.000000000 
+0200
+++ new/iio-sensor-proxy-2.8/src/Makefile.in    2019-09-04 18:17:26.000000000 
+0200
@@ -262,7 +262,7 @@
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
-am__DIST_COMMON = $(srcdir)/Makefile.in \
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/Makefile.decl \
        $(top_srcdir)/build-aux/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -421,6 +421,13 @@
        $(WARN_CFLAGS)
 
 fake_input_accelerometer_LDADD = $(IIO_SENSOR_PROXY_LIBS)
+
+# Note, we need this set for umockdev to be available in tests
+GTESTER = gtester              # in $PATH for non-GLIB packages
+GTESTER_REPORT = gtester-report                # in $PATH for non-GLIB packages
+
+# initialize variables for unconditional += appending
+TEST_PROGS = test-mount-matrix test-accel-location test-orientation
 test_mount_matrix_SOURCES = \
        test-mount-matrix.c                     \
        accel-mount-matrix.h                    \
@@ -481,7 +488,7 @@
 
 .SUFFIXES:
 .SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl 
$(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -501,6 +508,7 @@
            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__maybe_remake_depfiles)'; \
            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__maybe_remake_depfiles);; \
        esac;
+$(top_srcdir)/Makefile.decl $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1129,6 +1137,7 @@
          fi; \
        done
 check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) check-local
 check: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) check-am
 all-am: Makefile $(PROGRAMS)
@@ -1288,19 +1297,19 @@
 
 uninstall-am: uninstall-binPROGRAMS uninstall-sbinPROGRAMS
 
-.MAKE: all check install install-am install-strip
+.MAKE: all check check-am install install-am install-strip
 
-.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
-       clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \
-       clean-sbinPROGRAMS cscopelist-am ctags ctags-am distclean \
-       distclean-compile distclean-generic distclean-tags distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-binPROGRAMS install-data install-data-am install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-sbinPROGRAMS install-strip installcheck \
-       installcheck-am installdirs maintainer-clean \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am \
+       check-local clean clean-binPROGRAMS clean-generic \
+       clean-noinstPROGRAMS clean-sbinPROGRAMS cscopelist-am ctags \
+       ctags-am distclean distclean-compile distclean-generic \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-binPROGRAMS install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-ps install-ps-am install-sbinPROGRAMS install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-compile \
        mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
        uninstall-am uninstall-binPROGRAMS uninstall-sbinPROGRAMS
@@ -1312,6 +1321,54 @@
 iio-sensor-proxy-resources.h: iio-sensor-proxy.gresource.xml $(resource_files)
        $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) 
--generate-header --c-name iio_sensor_proxy $<
 
+# test: run all tests in cwd and subdirs
+test:  ${TEST_PROGS}
+       @test -z "${TEST_PROGS}" || ${GTESTER} --verbose ${TEST_PROGS}
+       @ for subdir in $(SUBDIRS) . ; do \
+           test "$$subdir" = "." -o "$$subdir" = "po" || \
+           ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
+         done
+
+# test-report: run tests in subdirs and generate report
+# perf-report: run tests in subdirs with -m perf and generate report
+# full-report: like test-report: with -m perf and -m slow
+test-report perf-report full-report:   ${TEST_PROGS}
+       @test -z "${TEST_PROGS}" || { \
+         case $@ in \
+         test-report) test_options="-k";; \
+         perf-report) test_options="-k -m=perf";; \
+         full-report) test_options="-k -m=perf -m=slow";; \
+         esac ; \
+         if test -z "$$GTESTER_LOGDIR" ; then  \
+           ${GTESTER} --verbose $$test_options -o test-report.xml 
${TEST_PROGS} ; \
+         elif test -n "${TEST_PROGS}" ; then \
+           ${GTESTER} --verbose $$test_options -o `mktemp 
"$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
+         fi ; \
+       }
+       @ ignore_logdir=true ; \
+         if test -z "$$GTESTER_LOGDIR" ; then \
+           GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export 
GTESTER_LOGDIR ; \
+           ignore_logdir=false ; \
+         fi ; \
+         for subdir in $(SUBDIRS) . ; do \
+           test "$$subdir" = "." -o "$$subdir" = "po" || \
+           ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
+         done ; \
+         $$ignore_logdir || { \
+           echo '<?xml version="1.0"?>' > $@.xml ; \
+           echo '<report-collection>'  >> $@.xml ; \
+           for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
+             sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> 
$@.xml ; \
+           done ; \
+           echo >> $@.xml ; \
+           echo '</report-collection>' >> $@.xml ; \
+           rm -rf "$$GTESTER_LOGDIR"/ ; \
+           ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || 
${GTESTER_REPORT} $@.xml >$@.html ; \
+         }
+.PHONY: test test-report perf-report full-report
+# run make test as part of make check
+check-local: test
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/src/accel-location.c 
new/iio-sensor-proxy-2.8/src/accel-location.c
--- old/iio-sensor-proxy-2.7/src/accel-location.c       2019-05-13 
14:03:11.000000000 +0200
+++ new/iio-sensor-proxy-2.8/src/accel-location.c       2019-08-20 
11:28:49.000000000 +0200
@@ -22,9 +22,16 @@
 
                g_warning ("Failed to parse ACCEL_LOCATION ('%s') from udev",
                           location);
-       } else {
-               g_debug ("No autodetected location, falling back to display 
location");
        }
+       location = g_udev_device_get_sysfs_attr (device, "location");
+       if (location) {
+               if (parse_accel_location (location, &ret))
+                       return ret;
+
+               g_warning ("Failed to parse location ('%s') from sysfs",
+                          location);
+       }
+       g_debug ("No auto-detected location, falling back to display location");
 
        ret = ACCEL_LOCATION_DISPLAY;
        return ret;
@@ -35,15 +42,16 @@
 {
        /* Empty string means we use the display location */
        if (location == NULL ||
-               *location == '\0' ||
-               (g_strcmp0 (location, "display") == 0)) {
+           *location == '\0' ||
+           g_str_equal (location, "display") ||
+           g_str_equal (location, "lid")) {
                *value = ACCEL_LOCATION_DISPLAY;
                return TRUE;
-       } else if (g_strcmp0 (location, "base") == 0) {
+       } else if (g_str_equal (location, "base")) {
                *value = ACCEL_LOCATION_BASE;
                return TRUE;
        } else {
                g_warning ("Failed to parse '%s' as a location", location);
                return FALSE;
        }
-}
\ No newline at end of file
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/src/orientation.c 
new/iio-sensor-proxy-2.8/src/orientation.c
--- old/iio-sensor-proxy-2.7/src/orientation.c  2016-12-02 16:29:18.000000000 
+0100
+++ new/iio-sensor-proxy-2.8/src/orientation.c  2019-09-04 17:33:48.000000000 
+0200
@@ -65,38 +65,42 @@
                   int in_x, int in_y, int in_z,
                   gdouble scale)
 {
-        int rotation;
         OrientationUp ret = prev;
         int x, y, z;
+        int portrait_rotation;
+        int landscape_rotation;
 
         /* this code expects 1G ~= 256 */
         x = SCALE(in_x);
         y = SCALE(in_y);
         z = SCALE(in_z);
 
-        /* Portrait check */
-        rotation = round(atan((double) x / sqrt(y * y + z * z)) * 
RADIANS_TO_DEGREES);
+        portrait_rotation  = round(atan2(x, sqrt(y * y + z * z)) * 
RADIANS_TO_DEGREES);
+        landscape_rotation = round(atan2(y, sqrt(x * x + z * z)) * 
RADIANS_TO_DEGREES);
+
+        /* Don't change orientation if we are on the common border of two 
thresholds */
+        if (abs(portrait_rotation) > THRESHOLD_PORTRAIT && 
abs(landscape_rotation) > THRESHOLD_LANDSCAPE)
+                return prev;
 
-        if (abs(rotation) > THRESHOLD_PORTRAIT) {
-                ret = (rotation > 0) ? ORIENTATION_LEFT_UP : 
ORIENTATION_RIGHT_UP;
+        /* Portrait check */
+        if (abs(portrait_rotation) > THRESHOLD_PORTRAIT) {
+                ret = (portrait_rotation > 0) ? ORIENTATION_LEFT_UP : 
ORIENTATION_RIGHT_UP;
 
                 /* Some threshold to switching between portrait modes */
                 if (prev == ORIENTATION_LEFT_UP || prev == 
ORIENTATION_RIGHT_UP) {
-                        if (abs(rotation) < SAME_AXIS_LIMIT) {
+                        if (abs(portrait_rotation) < SAME_AXIS_LIMIT) {
                                 ret = prev;
                         }
                 }
 
         } else {
                 /* Landscape check */
-                rotation = round(atan((double) y / sqrt(x * x + z * z)) * 
RADIANS_TO_DEGREES);
-
-                if (abs(rotation) > THRESHOLD_LANDSCAPE) {
-                        ret = (rotation > 0) ? ORIENTATION_BOTTOM_UP : 
ORIENTATION_NORMAL;
+                if (abs(landscape_rotation) > THRESHOLD_LANDSCAPE) {
+                        ret = (landscape_rotation > 0) ? ORIENTATION_BOTTOM_UP 
: ORIENTATION_NORMAL;
 
                         /* Some threshold to switching between landscape modes 
*/
                         if (prev == ORIENTATION_BOTTOM_UP || prev == 
ORIENTATION_NORMAL) {
-                                if (abs(rotation) < SAME_AXIS_LIMIT) {
+                                if (abs(landscape_rotation) < SAME_AXIS_LIMIT) 
{
                                         ret = prev;
                                 }
                         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/src/test-orientation-gtk.c 
new/iio-sensor-proxy-2.8/src/test-orientation-gtk.c
--- old/iio-sensor-proxy-2.7/src/test-orientation-gtk.c 2016-12-02 
16:29:18.000000000 +0100
+++ new/iio-sensor-proxy-2.8/src/test-orientation-gtk.c 2019-09-04 
17:11:56.000000000 +0200
@@ -33,7 +33,7 @@
 int main (int argc, char **argv)
 {
        GtkWidget *window;
-       GtkWidget *box;
+       GtkWidget *grid;
 
        gtk_init (&argc, &argv);
 
@@ -47,12 +47,25 @@
        gtk_spin_button_set_value (GTK_SPIN_BUTTON (scale_y), ONEG);
        gtk_spin_button_set_value (GTK_SPIN_BUTTON (scale_z), 0.0);
 
-       box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
-       gtk_container_add (GTK_CONTAINER (window), box);
-
-       gtk_container_add (GTK_CONTAINER (box), scale_x);
-       gtk_container_add (GTK_CONTAINER (box), scale_y);
-       gtk_container_add (GTK_CONTAINER (box), scale_z);
+       grid = gtk_grid_new ();
+       g_object_set (G_OBJECT (grid),
+                     "column-spacing", 12,
+                     "row-spacing", 12,
+                     NULL);
+       gtk_container_add (GTK_CONTAINER (window), grid);
+
+       gtk_grid_attach (GTK_GRID (grid), gtk_label_new ("X:"),
+                        0, 0, 1, 1);
+       gtk_grid_attach (GTK_GRID (grid), gtk_label_new ("Y:"),
+                        0, 1, 1, 1);
+       gtk_grid_attach (GTK_GRID (grid), gtk_label_new ("Z:"),
+                        0, 2, 1, 1);
+       gtk_grid_attach (GTK_GRID (grid), scale_x,
+                        1, 0, 1, 1);
+       gtk_grid_attach (GTK_GRID (grid), scale_y,
+                        1, 1, 1, 1);
+       gtk_grid_attach (GTK_GRID (grid), scale_z,
+                        1, 2, 1, 1);
 
        g_signal_connect (G_OBJECT (scale_x), "value-changed",
                          G_CALLBACK (value_changed), NULL);
@@ -62,7 +75,7 @@
                          G_CALLBACK (value_changed), NULL);
 
        label = gtk_label_new ("");
-       gtk_container_add (GTK_CONTAINER (box), label);
+       gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 2, 1);
 
        value_changed (NULL, NULL);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iio-sensor-proxy-2.7/src/test-orientation.c 
new/iio-sensor-proxy-2.8/src/test-orientation.c
--- old/iio-sensor-proxy-2.7/src/test-orientation.c     2016-12-10 
16:52:07.000000000 +0100
+++ new/iio-sensor-proxy-2.8/src/test-orientation.c     2019-09-04 
17:32:59.000000000 +0200
@@ -43,7 +43,7 @@
                                      9.81 / ONEG);
                result = orientation_to_string (o);
                expected = orientation_to_string (orientations[i].expected);
-               /* Fail straight away when verbose */
+               /* Fail straight away when not verbose */
                if (g_test_verbose ()) {
                        if (g_strcmp0 (result, expected) != 0) {
                                g_test_message ("Expected %s, got %s", 
expected, result);
@@ -59,6 +59,54 @@
 }
 
 static void
+test_orientation_threshold (void)
+{
+       static struct {
+               int x;
+               int y;
+               int z;
+               OrientationUp expected;
+       } orientations[] = {
+               { 0, -ONEG, 0, ORIENTATION_NORMAL },
+               { 183, -ONEG, 0, ORIENTATION_NORMAL },
+               { 176, -ONEG, 0, ORIENTATION_NORMAL },
+               { 183, -ONEG, 0, ORIENTATION_NORMAL },
+       };
+       guint i, num_failures;
+       OrientationUp prev;
+
+       num_failures = 0;
+       prev = ORIENTATION_UNDEFINED;
+
+       for (i = 0; i < G_N_ELEMENTS (orientations); i++) {
+               OrientationUp o;
+               const char *expected, *result;
+
+               o = orientation_calc (prev,
+                                     orientations[i].x,
+                                     orientations[i].y,
+                                     orientations[i].z,
+                                     9.81 / ONEG);
+               result = orientation_to_string (o);
+               expected = orientation_to_string (orientations[i].expected);
+               /* Fail straight away when not verbose */
+               if (g_test_verbose ()) {
+                       if (g_strcmp0 (result, expected) != 0) {
+                               g_test_message ("Expected %s, got %s 
(orientation #%d)", expected, result, i);
+                               num_failures++;
+                       }
+               } else {
+                       g_assert_cmpstr (result, ==, expected);
+               }
+               g_assert_cmpstr (result, ==, expected);
+               prev = orientations[i].expected;
+       }
+
+       if (num_failures > 0)
+               g_test_fail ();
+}
+
+static void
 test_mount_matrix_orientation (void)
 {
        guint i;
@@ -69,11 +117,11 @@
                OrientationUp expected;
        } tests[] = {
                /* Onda v975 quirking */
-               { { 523, 13, 5 }, 0.019163, "0, -1, 0; -1, 0, 0; 0, 0, 0", 
ORIENTATION_NORMAL },
-               { { 8, 521, -67 }, 0.019163, "0, -1, 0; -1, 0, 0; 0, 0, 0", 
ORIENTATION_RIGHT_UP },
+               { { 523, 13, 5 }, 0.019163, "0, -1, 0; -1, 0, 0; 0, 0, 1", 
ORIENTATION_NORMAL },
+               { { 8, 521, -67 }, 0.019163, "0, -1, 0; -1, 0, 0; 0, 0, 1", 
ORIENTATION_RIGHT_UP },
                /* Winbook TW100 quirking */
-               { { 24, 0, -21 }, 0.306457, "0, -1, 0; -1, 0, 0; 0, 0, 0", 
ORIENTATION_NORMAL },
-               { { 15, -25, -14 }, 0.306457, "0, -1, 0; -1, 0, 0; 0, 0, 0", 
ORIENTATION_LEFT_UP }
+               { { 24, 0, -21 }, 0.306457, "0, -1, 0; -1, 0, 0; 0, 0, 1", 
ORIENTATION_NORMAL },
+               { { 15, -25, -14 }, 0.306457, "0, -1, 0; -1, 0, 0; 0, 0, 1", 
ORIENTATION_LEFT_UP }
        };
 
        for (i = 0; i < G_N_ELEMENTS (tests); i++) {
@@ -171,6 +219,7 @@
 
        g_test_add_func ("/iio-sensor-proxy/orientation", test_orientation);
        g_test_add_func ("/iio-sensor-proxy/quirking", 
test_mount_matrix_orientation);
+       g_test_add_func ("/iio-sensor-proxy/threshold", 
test_orientation_threshold);
 
        return g_test_run ();
 }


Reply via email to