~solene/obsdfreqd

d22d3d4a2ee076c413f94c44dd6fd0d15a139b16 — Solène Rapenne 1 year, 15 days ago a909c1a 1.2.1
automatic threshold was only working in battery mode

the threshold was correctly set according to the CPU
number, but the wall_threshold still had an hardcoded
30%
1 files changed, 4 insertions(+), 4 deletions(-)

M main.c
M main.c => main.c +4 -4
@@ 449,9 449,6 @@ int main(int argc, char *argv[]) {
    hard_min_freq =	batt_min=	0;
    hard_max_freq =	batt_max=	100;

    // threshold defaults to 80% usage of one CPU
    threshold =		batt_threshold=	floor(100/ncpu*0.8);

    down_step =		batt_down_step=	100;
    inertia =		batt_inertia=	5;
    step =		batt_step=	100;


@@ 461,13 458,16 @@ int main(int argc, char *argv[]) {
    // wall defaults
    wall_min=		0;
    wall_max=		100;
    wall_threshold=	30;
    wall_down_step=	30;
    wall_inertia=	10;
    wall_step=		100;
    wall_timefreq=	100;
    wall_tmax=		0;

    // threshold defaults to 80% usage of one CPU
    threshold = floor(100/ncpu*0.8);
    wall_threshold = batt_threshold = threshold;

    if (unveil("/var/empty", "r") == -1)
        err(1, "unveil failed");
    unveil(NULL, NULL);