summaryrefslogtreecommitdiff
path: root/gr-blocks/grc
diff options
context:
space:
mode:
Diffstat (limited to 'gr-blocks/grc')
-rw-r--r--gr-blocks/grc/blocks.tree.yml1
-rw-r--r--gr-blocks/grc/blocks_phase_shift.block.yml40
2 files changed, 41 insertions, 0 deletions
diff --git a/gr-blocks/grc/blocks.tree.yml b/gr-blocks/grc/blocks.tree.yml
index f4a8ad8cd9..d01650f3fc 100644
--- a/gr-blocks/grc/blocks.tree.yml
+++ b/gr-blocks/grc/blocks.tree.yml
@@ -108,6 +108,7 @@
- blocks_copy
- blocks_selector
- blocks_nop
+ - blocks_phase_shift
- xmlrpc_server
- xmlrpc_client
- Modulators:
diff --git a/gr-blocks/grc/blocks_phase_shift.block.yml b/gr-blocks/grc/blocks_phase_shift.block.yml
new file mode 100644
index 0000000000..7ce3ed8655
--- /dev/null
+++ b/gr-blocks/grc/blocks_phase_shift.block.yml
@@ -0,0 +1,40 @@
+id: blocks_phase_shift
+label: Phase Shift
+
+parameters:
+- id: shift
+ label: Phase Shift
+ dtype: float
+ default: '0.0'
+- id: is_radians
+ label: Units
+ dtype: enum
+ options: ['True', 'False']
+ option_labels: ['Radians', 'Degrees']
+
+inputs:
+- domain: stream
+ dtype: complex
+- domain: message
+ id: shift
+ optional: true
+
+outputs:
+- domain: stream
+ dtype: complex
+
+templates:
+ imports: from gnuradio import blocks
+ make: blocks.phase_shift(${shift}, ${is_radians})
+ callbacks:
+ - set_shift(${shift})
+
+documentation: "This block will phase shift the input signal by the specified phase\
+ \ by multiplying the input times a shift value: \n\
+ \ gr_complex(cos(d_shift_in_radians),sin(d_shift_in_radians))\n\n\
+ \ Notes:\n\
+ \ If degrees are provided, the block automatically handles the conversion.\n\
+ \ This block functions like a multiply const, but with the const limited to \
+ \ abs() == 1 to provide a constant phase shift."
+
+file_format: 1