wallneradam / tc420

Python Library and CLI for TC420 (USB) LED Controller / Dimmer
GNU General Public License v3.0
22 stars 8 forks source link

Jump flag ignored or wrong? #3

Closed MarioVerbelen closed 3 years ago

MarioVerbelen commented 3 years ago

Hi,

I want to add a solenoid to the tc420 controller and this supports only 0 or 100% (12v)

I used this command (in a script below) with negative value on channel 5 (first 4 are for rgbw leds)

But the controller is fading vs jump (tested between 09:29 and 09:30) and the solenoid is buzzing like hell for a minute If I measure the voltage I can see it is fading in that minute

with debug I see that the jump_flag is int 16, but I do not have windows and the tc420 soft to compare do I use it wrong? or is this an issue

python3 -m tc420 \
    mode \
        -n "main" \
        -b 0 \
        -s  09:00 0 0 0 0 -0 \
        -s  09:29 0 5 0 2 -0 \
        -s  09:30 0 5 0 2 -100 \
        -s  10:00 10 15 10 10 -100 \
        -s  13:00 30 30 20 10 -100 \
        -s  16:30 30 20 30 10 -100 \
        -s  17:00 30 20 30 10 -0 \
        -s  17:30 10 0 2 5 -0 \
        -s  18:00 0 0 5 2 -0 \
        -s  19:00 0 0 0 0 -0
wallneradam commented 3 years ago

Thanks, It is a design issue, because "-0" is actually 0 as a number, and the code use negative numbers for jump values. I'm trying to find a solution.

wallneradam commented 3 years ago

I've solved it. I shifted the negative side by one. So -1 will be a jump 0 value, -2 jump 1 and so on. I hope that solves your problem.

MarioVerbelen commented 3 years ago

great,

I just tested this with the solenoid and it behaves correctly now the voltage drops/raises as a jump as expected