Skip to content

Commit

Permalink
Fix stupid bug that prevented rotation from actually working
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Apr 16, 2015
1 parent b89bba4 commit 0c5f813
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions sensors/orientation.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,13 @@ Use via something like\n\
for (i = 0; i != config.iterations; i++) {
if (config.debug_level > 2) printf("Finding orientation %d\n", orientation);
if ((int)(orientation = (OrientationPositions)(prepare_output(&info, dev_dir_name, trigger_name, &process_scan, config))) != -1) {
if (config.debug_level > 2) printf("Found orientation: or:%d, prev:%d, scr:%d, %d\n", orientation, previous_orientation, screen_orientation, FLAT);
if (config.debug_level > 2) printf("Found orientation: curr:%d, prev:%d, screen:%d\n", orientation, previous_orientation, screen_orientation);
if (config.debug_level > 0) printf("Orientation at %3.1f is %s\n", ((double) config.poll_timeout / 1000000.0) * i, symbolic_orientation(orientation));
if (previous_orientation == orientation /* only rotate when stable */ &&
orientation != screen_orientation && orientation != FLAT && !orientation_lock) {
rotate_to(orientation);
previous_orientation = orientation;

}
previous_orientation = orientation;
} else {
orientation = FLAT;
sleep(10);
Expand Down
2 changes: 1 addition & 1 deletion yoga_laptop/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ install-driver:
install --owner=root --group=root --mode=644 $(MODNAME) $(MODDIR)

install-keys:
install --owner=root --group=root --mode=644 90-yoga-keyboard.hwdb /etc/udev/hwdb.d
install --owner=root --group=root --mode=644 90-yoga-keyboard.hwdb /usr/lib/udev/hwdb.d
udevadm hwdb --update
cp -pr xkeycode /home/${LOGNAME}/.Xmodmap

Expand Down

0 comments on commit 0c5f813

Please sign in to comment.