Skip to content

Invert Hella cover position values #12

@tbarth64

Description

@tbarth64

Is your feature request related to a problem? Please describe.
It's because HELLA API v3 dose not support switch_drive_direction anymore ...

Describe the solution you'd like.
If possible integrate a config switch to choose an inversion of position values.
Ex input 10 -> pos -> 90

Describe alternatives you've considered.
If config switch is set to yes, then do something like this:
(sorry I'm not a python programmer ;-) )

#!/bin/bash
input=$1

if [ $input -lt 50 ];then
(( pos = (50 - input) * 2 + input ))
else
(( pos = input - (input - 50) * 2))
fi

echo $pos

Regards,
Thomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions