diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2016-05-27 15:58:16 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2016-06-19 15:26:01 +0300 |
commit | 7f009dde4b120d34173a77aa865b588d8c36575e (patch) | |
tree | 016779ed388e506ac38ceb429eb0eac56055c4ee /scripts | |
parent | 11a97d28892351c16769d34bfa4dafeeb36038e0 (diff) |
vsp-lib: Add set control support
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vsp-lib.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh index f6fd342..c587d5e 100755 --- a/scripts/vsp-lib.sh +++ b/scripts/vsp-lib.sh @@ -68,6 +68,18 @@ vsp1_has_control() { $yavta --no-query -l $subdev | grep -q -- "$control_name" } +vsp1_set_control() { + entity=$1 + control_name=$(echo $2 | tr '+' ' ') + value=$3 + + subdev=$(vsp1_entity_subdev $entity) + control=$($yavta --no-query -l $subdev | grep -- "$control_name" | cut -d ' ' -f 2) + + echo "Setting control $control_name ($control) to $value" | ./logger.sh "$entity" >> $logfile + $yavta --no-query -w "$control $value" $subdev | ./logger.sh "$entity" >> $logfile +} + # ----------------------------------------------------------------------------- # Referance frame generation # |