2 Commits
0.0.1 ... 0.0.3

Author SHA1 Message Date
Oleg
e365eba0dd Added debug Makefile option 2024-05-26 02:25:11 +03:00
Oleg
440a42d3fe Clamp PID_LOOP_COUNT 2024-05-26 02:10:18 +03:00
2 changed files with 7 additions and 0 deletions

View File

@@ -4,6 +4,10 @@ KDIR := /lib/modules/${KVERSION}/build
default:
$(MAKE) -C $(KDIR) M=$$PWD
debug:
$(MAKE) -C $(KDIR) M=$$PWD EXTRA_CFLAGS="-g -DDEBUG"
install: default
$(MAKE) -C $(KDIR) M=$$PWD modules_install
depmod -A

View File

@@ -499,6 +499,9 @@ static void pidff_playback_pid(struct pidff_device *pidff, int pid_id, int n)
} else {
pidff->effect_operation_status->value[0] =
pidff->operation_id[PID_EFFECT_START];
n = clamp(n, pidff->effect_operation[PID_LOOP_COUNT].field->logical_minimum,
pidff->effect_operation[PID_LOOP_COUNT].field->logical_maximum);
pidff->effect_operation[PID_LOOP_COUNT].value[0] = n;
}