quentinmit/decimctl

Set multiple variables in the one command

Opened this issue · 0 comments

seb26 commented

Hi Quentin, thanks for this great module. I've been using it with success on a DMON-QUAD.

A feature request: set multiple variables in the one command.

When I set UMDs on or off, I need to issue 4 commands as 4 lines in a shell script for each of the UMDs for inputs 1, 2, 3 and 4:

decimctl set UMDs_W1_Enable 0
decimctl set UMDs_W2_Enable 0
decimctl set UMDs_W3_Enable 0
decimctl set UMDs_W4_Enable 0

I notice there is a noticeable lag between the completion of each command, as the UMDs on screen in a quad display disappear or appear one-by-one.

I gather that this is occurring because decimctl is opening comms with the device, setting the value and then closing comms, and then repeating that for each line.

Perhaps set() in bin/decimctl can be modified to accept multiple arguments, like decimctl set attrib1 value attrib2 value, and setattr() can be called again for each value during that instance?

I am interested in contributing this as a patch but just probing your thoughts first.