Commit c0331afbefe92a6f5121482c2b6cbf1e1a3f0ca8

Authored by bmarechal
1 parent 58b697f2e0
Exists in master

add double pid app

Showing 6 changed files with 3474 additions and 5 deletions Inline Diff

redpitaya/client/dds_gnuradio.grc
<?xml version='1.0' encoding='utf-8'?> 1 1 <?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.10'?> 2 2 <?grc format='1' created='3.7.10'?>
<flow_graph> 3 3 <flow_graph>
<timestamp>Thu Feb 2 22:54:58 2017</timestamp> 4 4 <timestamp>Thu Feb 2 22:54:58 2017</timestamp>
<block> 5 5 <block>
<key>options</key> 6 6 <key>options</key>
<param> 7 7 <param>
<key>author</key> 8 8 <key>author</key>
<value></value> 9 9 <value></value>
</param> 10 10 </param>
<param> 11 11 <param>
<key>window_size</key> 12 12 <key>window_size</key>
<value></value> 13 13 <value></value>
</param> 14 14 </param>
<param> 15 15 <param>
<key>category</key> 16 16 <key>category</key>
<value>[GRC Hier Blocks]</value> 17 17 <value>[GRC Hier Blocks]</value>
</param> 18 18 </param>
<param> 19 19 <param>
<key>comment</key> 20 20 <key>comment</key>
<value></value> 21 21 <value></value>
</param> 22 22 </param>
<param> 23 23 <param>
<key>description</key> 24 24 <key>description</key>
<value></value> 25 25 <value></value>
</param> 26 26 </param>
<param> 27 27 <param>
<key>_enabled</key> 28 28 <key>_enabled</key>
<value>True</value> 29 29 <value>True</value>
</param> 30 30 </param>
<param> 31 31 <param>
<key>_coordinate</key> 32 32 <key>_coordinate</key>
<value>(8, 8)</value> 33 33 <value>(8, 8)</value>
</param> 34 34 </param>
<param> 35 35 <param>
<key>_rotation</key> 36 36 <key>_rotation</key>
<value>0</value> 37 37 <value>0</value>
</param> 38 38 </param>
<param> 39 39 <param>
<key>generate_options</key> 40 40 <key>generate_options</key>
<value>qt_gui</value> 41 41 <value>qt_gui</value>
</param> 42 42 </param>
<param> 43 43 <param>
<key>hier_block_src_path</key> 44 44 <key>hier_block_src_path</key>
<value>.:</value> 45 45 <value>.:</value>
</param> 46 46 </param>
<param> 47 47 <param>
<key>id</key> 48 48 <key>id</key>
<value>dds_gnuradio</value> 49 49 <value>dds_gnuradio</value>
</param> 50 50 </param>
<param> 51 51 <param>
<key>max_nouts</key> 52 52 <key>max_nouts</key>
<value>0</value> 53 53 <value>0</value>
</param> 54 54 </param>
<param> 55 55 <param>
<key>qt_qss_theme</key> 56 56 <key>qt_qss_theme</key>
<value></value> 57 57 <value></value>
</param> 58 58 </param>
<param> 59 59 <param>
<key>realtime_scheduling</key> 60 60 <key>realtime_scheduling</key>
<value></value> 61 61 <value></value>
</param> 62 62 </param>
<param> 63 63 <param>
<key>run_command</key> 64 64 <key>run_command</key>
<value>{python} -u {filename}</value> 65 65 <value>{python} -u {filename}</value>
</param> 66 66 </param>
<param> 67 67 <param>
<key>run_options</key> 68 68 <key>run_options</key>
<value>prompt</value> 69 69 <value>prompt</value>
</param> 70 70 </param>
<param> 71 71 <param>
<key>run</key> 72 72 <key>run</key>
<value>True</value> 73 73 <value>True</value>
</param> 74 74 </param>
<param> 75 75 <param>
<key>thread_safe_setters</key> 76 76 <key>thread_safe_setters</key>
<value></value> 77 77 <value></value>
</param> 78 78 </param>
<param> 79 79 <param>
<key>title</key> 80 80 <key>title</key>
<value></value> 81 81 <value></value>
</param> 82 82 </param>
</block> 83 83 </block>
<block> 84 84 <block>
<key>variable_qtgui_range</key> 85 85 <key>variable_qtgui_range</key>
<param> 86 86 <param>
<key>comment</key> 87 87 <key>comment</key>
<value></value> 88 88 <value></value>
</param> 89 89 </param>
<param> 90 90 <param>
<key>value</key> 91 91 <key>value</key>
<value>0</value> 92 92 <value>0</value>
</param> 93 93 </param>
<param> 94 94 <param>
<key>_enabled</key> 95 95 <key>_enabled</key>
<value>True</value> 96 96 <value>True</value>
</param> 97 97 </param>
<param> 98 98 <param>
<key>_coordinate</key> 99 99 <key>_coordinate</key>
<value>(600, 12)</value> 100 100 <value>(600, 12)</value>
</param> 101 101 </param>
<param> 102 102 <param>
<key>gui_hint</key> 103 103 <key>gui_hint</key>
<value>1, 0</value> 104 104 <value>1, 0</value>
</param> 105 105 </param>
<param> 106 106 <param>
<key>_rotation</key> 107 107 <key>_rotation</key>
<value>0</value> 108 108 <value>0</value>
</param> 109 109 </param>
<param> 110 110 <param>
<key>id</key> 111 111 <key>id</key>
<value>a_dds</value> 112 112 <value>a_dds</value>
</param> 113 113 </param>
<param> 114 114 <param>
<key>label</key> 115 115 <key>label</key>
<value>DDS amplitude</value> 116 116 <value>DDS amplitude</value>
</param> 117 117 </param>
<param> 118 118 <param>
<key>min_len</key> 119 119 <key>min_len</key>
<value>200</value> 120 120 <value>200</value>
</param> 121 121 </param>
<param> 122 122 <param>
<key>orient</key> 123 123 <key>orient</key>
<value>Qt.Horizontal</value> 124 124 <value>Qt.Horizontal</value>
</param> 125 125 </param>
<param> 126 126 <param>
<key>start</key> 127 127 <key>start</key>
<value>0</value> 128 128 <value>0</value>
</param> 129 129 </param>
<param> 130 130 <param>
<key>step</key> 131 131 <key>step</key>
<value>1</value> 132 132 <value>1</value>
</param> 133 133 </param>
<param> 134 134 <param>
<key>stop</key> 135 135 <key>stop</key>
<value>2**13-1</value> 136 136 <value>2**13-1</value>
</param> 137 137 </param>
<param> 138 138 <param>
<key>rangeType</key> 139 139 <key>rangeType</key>
<value>int</value> 140 140 <value>int</value>
</param> 141 141 </param>
<param> 142 142 <param>
<key>widget</key> 143 143 <key>widget</key>
<value>counter_slider</value> 144 144 <value>counter_slider</value>
</param> 145 145 </param>
</block> 146 146 </block>
<block> 147 147 <block>
<key>variable</key> 148 148 <key>variable</key>
<param> 149 149 <param>
<key>comment</key> 150 150 <key>comment</key>
<value></value> 151 151 <value></value>
</param> 152 152 </param>
<param> 153 153 <param>
<key>_enabled</key> 154 154 <key>_enabled</key>
<value>True</value> 155 155 <value>True</value>
</param> 156 156 </param>
<param> 157 157 <param>
<key>_coordinate</key> 158 158 <key>_coordinate</key>
<value>(8, 104)</value> 159 159 <value>(8, 104)</value>
</param> 160 160 </param>
<param> 161 161 <param>
<key>_rotation</key> 162 162 <key>_rotation</key>
<value>0</value> 163 163 <value>0</value>
</param> 164 164 </param>
<param> 165 165 <param>
<key>id</key> 166 166 <key>id</key>
<value>addr</value> 167 167 <value>addr</value>
</param> 168 168 </param>
<param> 169 169 <param>
<key>value</key> 170 170 <key>value</key>
<value>"192.168.0.201"</value> 171 171 <value>"192.168.0.203"</value>
</param> 172 172 </param>
</block> 173 173 </block>
<block> 174 174 <block>
<key>variable_qtgui_range</key> 175 175 <key>variable_qtgui_range</key>
<param> 176 176 <param>
<key>comment</key> 177 177 <key>comment</key>
<value></value> 178 178 <value></value>
</param> 179 179 </param>
<param> 180 180 <param>
<key>value</key> 181 181 <key>value</key>
<value>0</value> 182 182 <value>0</value>
</param> 183 183 </param>
<param> 184 184 <param>
<key>_enabled</key> 185 185 <key>_enabled</key>
<value>True</value> 186 186 <value>True</value>
</param> 187 187 </param>
<param> 188 188 <param>
<key>_coordinate</key> 189 189 <key>_coordinate</key>
<value>(384, 12)</value> 190 190 <value>(384, 12)</value>
</param> 191 191 </param>
<param> 192 192 <param>
<key>gui_hint</key> 193 193 <key>gui_hint</key>
<value>0, 0</value> 194 194 <value>0, 0</value>
</param> 195 195 </param>
<param> 196 196 <param>
<key>_rotation</key> 197 197 <key>_rotation</key>
<value>0</value> 198 198 <value>0</value>
</param> 199 199 </param>
<param> 200 200 <param>
<key>id</key> 201 201 <key>id</key>
<value>f_dds</value> 202 202 <value>f_dds</value>
</param> 203 203 </param>
<param> 204 204 <param>
<key>label</key> 205 205 <key>label</key>
<value>DDS frequency</value> 206 206 <value>DDS frequency</value>
</param> 207 207 </param>
<param> 208 208 <param>
<key>min_len</key> 209 209 <key>min_len</key>
<value>200</value> 210 210 <value>200</value>
</param> 211 211 </param>
<param> 212 212 <param>
<key>orient</key> 213 213 <key>orient</key>
<value>Qt.Horizontal</value> 214 214 <value>Qt.Horizontal</value>
</param> 215 215 </param>
<param> 216 216 <param>
<key>start</key> 217 217 <key>start</key>
<value>0</value> 218 218 <value>0</value>
</param> 219 219 </param>
<param> 220 220 <param>
<key>step</key> 221 221 <key>step</key>
<value>1000</value> 222 222 <value>1000</value>
</param> 223 223 </param>
<param> 224 224 <param>
<key>stop</key> 225 225 <key>stop</key>
<value>60000000</value> 226 226 <value>60000000</value>
</param> 227 227 </param>
<param> 228 228 <param>
<key>rangeType</key> 229 229 <key>rangeType</key>
<value>float</value> 230 230 <value>float</value>
</param> 231 231 </param>
<param> 232 232 <param>
<key>widget</key> 233 233 <key>widget</key>
<value>counter_slider</value> 234 234 <value>counter_slider</value>
</param> 235 235 </param>
</block> 236 236 </block>
<block> 237 237 <block>
<key>variable_qtgui_range</key> 238 238 <key>variable_qtgui_range</key>
<param> 239 239 <param>
<key>comment</key> 240 240 <key>comment</key>
<value></value> 241 241 <value></value>
</param> 242 242 </param>
<param> 243 243 <param>
<key>value</key> 244 244 <key>value</key>
<value>0</value> 245 245 <value>0</value>
</param> 246 246 </param>
<param> 247 247 <param>
<key>_enabled</key> 248 248 <key>_enabled</key>
<value>True</value> 249 249 <value>True</value>
</param> 250 250 </param>
<param> 251 251 <param>
<key>_coordinate</key> 252 252 <key>_coordinate</key>
<value>(224, 12)</value> 253 253 <value>(224, 12)</value>
</param> 254 254 </param>
<param> 255 255 <param>
<key>gui_hint</key> 256 256 <key>gui_hint</key>
<value>2, 0</value> 257 257 <value>2, 0</value>
</param> 258 258 </param>
<param> 259 259 <param>
<key>_rotation</key> 260 260 <key>_rotation</key>
<value>0</value> 261 261 <value>0</value>
</param> 262 262 </param>
<param> 263 263 <param>
<key>id</key> 264 264 <key>id</key>
<value>offset_out1</value> 265 265 <value>offset_out1</value>
</param> 266 266 </param>
<param> 267 267 <param>
<key>label</key> 268 268 <key>label</key>
<value>Offset DDS</value> 269 269 <value>Offset DDS</value>
</param> 270 270 </param>
<param> 271 271 <param>
<key>min_len</key> 272 272 <key>min_len</key>
<value>200</value> 273 273 <value>200</value>
</param> 274 274 </param>
<param> 275 275 <param>
<key>orient</key> 276 276 <key>orient</key>
<value>Qt.Horizontal</value> 277 277 <value>Qt.Horizontal</value>
</param> 278 278 </param>
<param> 279 279 <param>
<key>start</key> 280 280 <key>start</key>
<value>-2**13</value> 281 281 <value>-2**13</value>
</param> 282 282 </param>
<param> 283 283 <param>
<key>step</key> 284 284 <key>step</key>
<value>1</value> 285 285 <value>1</value>
</param> 286 286 </param>
<param> 287 287 <param>
<key>stop</key> 288 288 <key>stop</key>
<value>2**13-1</value> 289 289 <value>2**13-1</value>
</param> 290 290 </param>
<param> 291 291 <param>
<key>rangeType</key> 292 292 <key>rangeType</key>
<value>int</value> 293 293 <value>int</value>
</param> 294 294 </param>
<param> 295 295 <param>
<key>widget</key> 296 296 <key>widget</key>
<value>counter_slider</value> 297 297 <value>counter_slider</value>
</param> 298 298 </param>
</block> 299 299 </block>
<block> 300 300 <block>
<key>variable</key> 301 301 <key>variable</key>
<param> 302 302 <param>
<key>comment</key> 303 303 <key>comment</key>
<value></value> 304 304 <value></value>
</param> 305 305 </param>
<param> 306 306 <param>
<key>_enabled</key> 307 307 <key>_enabled</key>
<value>True</value> 308 308 <value>True</value>
</param> 309 309 </param>
<param> 310 310 <param>
<key>_coordinate</key> 311 311 <key>_coordinate</key>
<value>(8, 176)</value> 312 312 <value>(8, 176)</value>
</param> 313 313 </param>
<param> 314 314 <param>
<key>_rotation</key> 315 315 <key>_rotation</key>
<value>0</value> 316 316 <value>0</value>
</param> 317 317 </param>
<param> 318 318 <param>
<key>id</key> 319 319 <key>id</key>
<value>port</value> 320 320 <value>port</value>
</param> 321 321 </param>
<param> 322 322 <param>
<key>value</key> 323 323 <key>value</key>
<value>1001</value> 324 324 <value>1001</value>
</param> 325 325 </param>
</block> 326 326 </block>
<block> 327 327 <block>
<key>add_const_set_offset</key> 328 328 <key>add_const_set_offset</key>
<param> 329 329 <param>
<key>addr</key> 330 330 <key>addr</key>
<value>addr</value> 331 331 <value>addr</value>
</param> 332 332 </param>
<param> 333 333 <param>
<key>alias</key> 334 334 <key>alias</key>
<value></value> 335 335 <value></value>
</param> 336 336 </param>
<param> 337 337 <param>
<key>comment</key> 338 338 <key>comment</key>
<value></value> 339 339 <value></value>
</param> 340 340 </param>
<param> 341 341 <param>
<key>const</key> 342 342 <key>const</key>
<value>offset_out1</value> 343 343 <value>offset_out1</value>
</param> 344 344 </param>
<param> 345 345 <param>
<key>device</key> 346 346 <key>device</key>
<value>/dev/dds_offset</value> 347 347 <value>/dev/dds_offset</value>
</param> 348 348 </param>
<param> 349 349 <param>
<key>_enabled</key> 350 350 <key>_enabled</key>
<value>True</value> 351 351 <value>True</value>
</param> 352 352 </param>
<param> 353 353 <param>
<key>_coordinate</key> 354 354 <key>_coordinate</key>
<value>(200, 164)</value> 355 355 <value>(200, 164)</value>
</param> 356 356 </param>
<param> 357 357 <param>
<key>_rotation</key> 358 358 <key>_rotation</key>
<value>0</value> 359 359 <value>0</value>
</param> 360 360 </param>
<param> 361 361 <param>
<key>id</key> 362 362 <key>id</key>
<value>add_const_set_offset_0</value> 363 363 <value>add_const_set_offset_0</value>
</param> 364 364 </param>
<param> 365 365 <param>
<key>port</key> 366 366 <key>port</key>
<value>port</value> 367 367 <value>port</value>
</param> 368 368 </param>
</block> 369 369 </block>
<block> 370 370 <block>
<key>add_const_set_offset</key> 371 371 <key>add_const_set_offset</key>
<param> 372 372 <param>
<key>addr</key> 373 373 <key>addr</key>
<value>addr</value> 374 374 <value>addr</value>
</param> 375 375 </param>
<param> 376 376 <param>
<key>alias</key> 377 377 <key>alias</key>
<value></value> 378 378 <value></value>
</param> 379 379 </param>
<param> 380 380 <param>
<key>comment</key> 381 381 <key>comment</key>
<value></value> 382 382 <value></value>
</param> 383 383 </param>
<param> 384 384 <param>
<key>const</key> 385 385 <key>const</key>
<value>a_dds</value> 386 386 <value>a_dds</value>
</param> 387 387 </param>
<param> 388 388 <param>
<key>device</key> 389 389 <key>device</key>
<value>/dev/dds_ampl</value> 390 390 <value>/dev/dds_ampl</value>
</param> 391 391 </param>
<param> 392 392 <param>
<key>_enabled</key> 393 393 <key>_enabled</key>
<value>True</value> 394 394 <value>True</value>
</param> 395 395 </param>
<param> 396 396 <param>
<key>_coordinate</key> 397 397 <key>_coordinate</key>
<value>(600, 164)</value> 398 398 <value>(600, 164)</value>
</param> 399 399 </param>
<param> 400 400 <param>
<key>_rotation</key> 401 401 <key>_rotation</key>
<value>0</value> 402 402 <value>0</value>
</param> 403 403 </param>
<param> 404 404 <param>
<key>id</key> 405 405 <key>id</key>
<value>add_const_set_offset_0_0</value> 406 406 <value>add_const_set_offset_0_0</value>
</param> 407 407 </param>
<param> 408 408 <param>
<key>port</key> 409 409 <key>port</key>
<value>port</value> 410 410 <value>port</value>
</param> 411 411 </param>
</block> 412 412 </block>
<block> 413 413 <block>
<key>nco_counter_send_conf</key> 414 414 <key>nco_counter_send_conf</key>
<param> 415 415 <param>
<key>acc_size</key> 416 416 <key>acc_size</key>
<value>32</value> 417 417 <value>32</value>
</param> 418 418 </param>
<param> 419 419 <param>
<key>addr</key> 420 420 <key>addr</key>
<value>addr</value> 421 421 <value>addr</value>
</param> 422 422 </param>
<param> 423 423 <param>
<key>alias</key> 424 424 <key>alias</key>
<value></value> 425 425 <value></value>
</param> 426 426 </param>
<param> 427 427 <param>
<key>comment</key> 428 428 <key>comment</key>
<value></value> 429 429 <value></value>
</param> 430 430 </param>
<param> 431 431 <param>
<key>device</key> 432 432 <key>device</key>
<value>/dev/dds_freq</value> 433 433 <value>/dev/dds_freq</value>
</param> 434 434 </param>
<param> 435 435 <param>
<key>_enabled</key> 436 436 <key>_enabled</key>
<value>True</value> 437 437 <value>True</value>
</param> 438 438 </param>
<param> 439 439 <param>
<key>freq_dds</key> 440 440 <key>freq_dds</key>
<value>f_dds</value> 441 441 <value>f_dds</value>
</param> 442 442 </param>
<param> 443 443 <param>
<key>freq_ref</key> 444 444 <key>freq_ref</key>
<value>125000000</value> 445 445 <value>125000000</value>
</param> 446 446 </param>
<param> 447 447 <param>
<key>_coordinate</key> 448 448 <key>_coordinate</key>
<value>(384, 160)</value> 449 449 <value>(384, 160)</value>
</param> 450 450 </param>
<param> 451 451 <param>
<key>_rotation</key> 452 452 <key>_rotation</key>
<value>0</value> 453 453 <value>0</value>
</param> 454 454 </param>
<param> 455 455 <param>
<key>id</key> 456 456 <key>id</key>
<value>nco_counter_send_conf_0</value> 457 457 <value>nco_counter_send_conf_0</value>
</param> 458 458 </param>
<param> 459 459 <param>
<key>offset</key> 460 460 <key>offset</key>
<value>0</value> 461 461 <value>0</value>
</param> 462 462 </param>
<param> 463 463 <param>
<key>pinc_sw</key> 464 464 <key>pinc_sw</key>
<value>1</value> 465 465 <value>1</value>
</param> 466 466 </param>
<param> 467 467 <param>
<key>poff_sw</key> 468 468 <key>poff_sw</key>
<value>1</value> 469 469 <value>1</value>
</param> 470 470 </param>
<param> 471 471 <param>
<key>port</key> 472 472 <key>port</key>
<value>port</value> 473 473 <value>port</value>
</param> 474 474 </param>
</block> 475 475 </block>
</flow_graph> 476 476 </flow_graph>
477 477
redpitaya/client/dds_gnuradio.py
#!/usr/bin/env python2 1 1 #!/usr/bin/env python2
# -*- coding: utf-8 -*- 2 2 # -*- coding: utf-8 -*-
################################################## 3 3 ##################################################
# GNU Radio Python Flow Graph 4 4 # GNU Radio Python Flow Graph
# Title: Dds Gnuradio 5 5 # Title: Dds Gnuradio
# Generated: Thu Apr 20 11:13:10 2017 6 6 # Generated: Fri Apr 21 12:30:52 2017
################################################## 7 7 ##################################################
8 8
if __name__ == '__main__': 9 9 if __name__ == '__main__':
import ctypes 10 10 import ctypes
import sys 11 11 import sys
if sys.platform.startswith('linux'): 12 12 if sys.platform.startswith('linux'):
try: 13 13 try:
x11 = ctypes.cdll.LoadLibrary('libX11.so') 14 14 x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads() 15 15 x11.XInitThreads()
except: 16 16 except:
print "Warning: failed to XInitThreads()" 17 17 print "Warning: failed to XInitThreads()"
18 18
from PyQt4 import Qt 19 19 from PyQt4 import Qt
from gnuradio import eng_notation 20 20 from gnuradio import eng_notation
from gnuradio import gr 21 21 from gnuradio import gr
from gnuradio.eng_option import eng_option 22 22 from gnuradio.eng_option import eng_option
from gnuradio.filter import firdes 23 23 from gnuradio.filter import firdes
from gnuradio.qtgui import Range, RangeWidget 24 24 from gnuradio.qtgui import Range, RangeWidget
from optparse import OptionParser 25 25 from optparse import OptionParser
import redpitaya_gnuradio 26 26 import redpitaya_gnuradio
import sys 27 27 import sys
28 28
29 29
class dds_gnuradio(gr.top_block, Qt.QWidget): 30 30 class dds_gnuradio(gr.top_block, Qt.QWidget):
31 31
def __init__(self): 32 32 def __init__(self):
gr.top_block.__init__(self, "Dds Gnuradio") 33 33 gr.top_block.__init__(self, "Dds Gnuradio")
Qt.QWidget.__init__(self) 34 34 Qt.QWidget.__init__(self)
self.setWindowTitle("Dds Gnuradio") 35 35 self.setWindowTitle("Dds Gnuradio")
try: 36 36 try:
self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) 37 37 self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
except: 38 38 except:
pass 39 39 pass
self.top_scroll_layout = Qt.QVBoxLayout() 40 40 self.top_scroll_layout = Qt.QVBoxLayout()
self.setLayout(self.top_scroll_layout) 41 41 self.setLayout(self.top_scroll_layout)
self.top_scroll = Qt.QScrollArea() 42 42 self.top_scroll = Qt.QScrollArea()
self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) 43 43 self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
self.top_scroll_layout.addWidget(self.top_scroll) 44 44 self.top_scroll_layout.addWidget(self.top_scroll)
self.top_scroll.setWidgetResizable(True) 45 45 self.top_scroll.setWidgetResizable(True)
self.top_widget = Qt.QWidget() 46 46 self.top_widget = Qt.QWidget()
self.top_scroll.setWidget(self.top_widget) 47 47 self.top_scroll.setWidget(self.top_widget)
self.top_layout = Qt.QVBoxLayout(self.top_widget) 48 48 self.top_layout = Qt.QVBoxLayout(self.top_widget)
self.top_grid_layout = Qt.QGridLayout() 49 49 self.top_grid_layout = Qt.QGridLayout()
self.top_layout.addLayout(self.top_grid_layout) 50 50 self.top_layout.addLayout(self.top_grid_layout)
51 51
self.settings = Qt.QSettings("GNU Radio", "dds_gnuradio") 52 52 self.settings = Qt.QSettings("GNU Radio", "dds_gnuradio")
self.restoreGeometry(self.settings.value("geometry").toByteArray()) 53 53 self.restoreGeometry(self.settings.value("geometry").toByteArray())
54 54
################################################## 55 55 ##################################################
# Variables 56 56 # Variables
################################################## 57 57 ##################################################
self.port = port = 1001 58 58 self.port = port = 1001
self.offset_out1 = offset_out1 = 0 59 59 self.offset_out1 = offset_out1 = 0
self.f_dds = f_dds = 0 60 60 self.f_dds = f_dds = 0
self.addr = addr = "192.168.0.201" 61 61 self.addr = addr = "192.168.0.203"
self.a_dds = a_dds = 0 62 62 self.a_dds = a_dds = 0
63 63
################################################## 64 64 ##################################################
# Blocks 65 65 # Blocks
################################################## 66 66 ##################################################
self._offset_out1_range = Range(-2**13, 2**13-1, 1, 0, 200) 67 67 self._offset_out1_range = Range(-2**13, 2**13-1, 1, 0, 200)
self._offset_out1_win = RangeWidget(self._offset_out1_range, self.set_offset_out1, 'Offset DDS', "counter_slider", int) 68 68 self._offset_out1_win = RangeWidget(self._offset_out1_range, self.set_offset_out1, 'Offset DDS', "counter_slider", int)
self.top_grid_layout.addWidget(self._offset_out1_win, 2, 0) 69 69 self.top_grid_layout.addWidget(self._offset_out1_win, 2, 0)
self._f_dds_range = Range(0, 60000000, 1000, 0, 200) 70 70 self._f_dds_range = Range(0, 60000000, 1000, 0, 200)
self._f_dds_win = RangeWidget(self._f_dds_range, self.set_f_dds, 'DDS frequency', "counter_slider", float) 71 71 self._f_dds_win = RangeWidget(self._f_dds_range, self.set_f_dds, 'DDS frequency', "counter_slider", float)
self.top_grid_layout.addWidget(self._f_dds_win, 0, 0) 72 72 self.top_grid_layout.addWidget(self._f_dds_win, 0, 0)
self._a_dds_range = Range(0, 2**13-1, 1, 0, 200) 73 73 self._a_dds_range = Range(0, 2**13-1, 1, 0, 200)
self._a_dds_win = RangeWidget(self._a_dds_range, self.set_a_dds, 'DDS amplitude', "counter_slider", int) 74 74 self._a_dds_win = RangeWidget(self._a_dds_range, self.set_a_dds, 'DDS amplitude', "counter_slider", int)
self.top_grid_layout.addWidget(self._a_dds_win, 1, 0) 75 75 self.top_grid_layout.addWidget(self._a_dds_win, 1, 0)
self.nco_counter_send_conf_0 = redpitaya_gnuradio.nco_counter_send_conf( 76 76 self.nco_counter_send_conf_0 = redpitaya_gnuradio.nco_counter_send_conf(
addr=addr, 77 77 addr=addr,
port=port, 78 78 port=port,
device='/dev/dds_freq', 79 79 device='/dev/dds_freq',
freq_ref=125000000, 80 80 freq_ref=125000000,
freq_dds=f_dds, 81 81 freq_dds=f_dds,
acc_size=32, 82 82 acc_size=32,
offset=0, 83 83 offset=0,
pinc_sw=1, 84 84 pinc_sw=1,
poff_sw=1, 85 85 poff_sw=1,
) 86 86 )
87 87
self.add_const_set_offset_0_0 = redpitaya_gnuradio.add_const_set_offset( 88 88 self.add_const_set_offset_0_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 89 89 addr=addr,
port=port, 90 90 port=port,
device='/dev/dds_ampl', 91 91 device='/dev/dds_ampl',
const=a_dds, 92 92 const=a_dds,
) 93 93 )
94 94
self.add_const_set_offset_0 = redpitaya_gnuradio.add_const_set_offset( 95 95 self.add_const_set_offset_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 96 96 addr=addr,
port=port, 97 97 port=port,
device='/dev/dds_offset', 98 98 device='/dev/dds_offset',
const=offset_out1, 99 99 const=offset_out1,
) 100 100 )
101 101
102 102
def closeEvent(self, event): 103 103 def closeEvent(self, event):
self.settings = Qt.QSettings("GNU Radio", "dds_gnuradio") 104 104 self.settings = Qt.QSettings("GNU Radio", "dds_gnuradio")
self.settings.setValue("geometry", self.saveGeometry()) 105 105 self.settings.setValue("geometry", self.saveGeometry())
event.accept() 106 106 event.accept()
107 107
def get_port(self): 108 108 def get_port(self):
return self.port 109 109 return self.port
110 110
def set_port(self, port): 111 111 def set_port(self, port):
self.port = port 112 112 self.port = port
113 113
def get_offset_out1(self): 114 114 def get_offset_out1(self):
return self.offset_out1 115 115 return self.offset_out1
116 116
def set_offset_out1(self, offset_out1): 117 117 def set_offset_out1(self, offset_out1):
self.offset_out1 = offset_out1 118 118 self.offset_out1 = offset_out1
self.add_const_set_offset_0.set_const(device='/dev/dds_offset', const=self.offset_out1) 119 119 self.add_const_set_offset_0.set_const(device='/dev/dds_offset', const=self.offset_out1)
120 120
def get_f_dds(self): 121 121 def get_f_dds(self):
return self.f_dds 122 122 return self.f_dds
123 123
def set_f_dds(self, f_dds): 124 124 def set_f_dds(self, f_dds):
self.f_dds = f_dds 125 125 self.f_dds = f_dds
self.nco_counter_send_conf_0.set_nco(device='/dev/dds_freq', freq_ref=125000000, freq_dds=self.f_dds, acc_size=32, offset=0, pinc_sw=1, poff_sw=1) 126 126 self.nco_counter_send_conf_0.set_nco(device='/dev/dds_freq', freq_ref=125000000, freq_dds=self.f_dds, acc_size=32, offset=0, pinc_sw=1, poff_sw=1)
127 127
def get_addr(self): 128 128 def get_addr(self):
return self.addr 129 129 return self.addr
130 130
def set_addr(self, addr): 131 131 def set_addr(self, addr):
self.addr = addr 132 132 self.addr = addr
133 133
def get_a_dds(self): 134 134 def get_a_dds(self):
return self.a_dds 135 135 return self.a_dds
redpitaya/client/double_pid_vco.grc
File was created 1 <?xml version='1.0' encoding='utf-8'?>
2 <?grc format='1' created='3.7.10'?>
3 <flow_graph>
4 <timestamp>Thu Feb 2 22:54:58 2017</timestamp>
5 <block>
6 <key>options</key>
7 <param>
8 <key>author</key>
9 <value></value>
10 </param>
11 <param>
12 <key>window_size</key>
13 <value>1000, 3500</value>
14 </param>
15 <param>
16 <key>category</key>
17 <value>[GRC Hier Blocks]</value>
18 </param>
19 <param>
20 <key>comment</key>
21 <value></value>
22 </param>
23 <param>
24 <key>description</key>
25 <value></value>
26 </param>
27 <param>
28 <key>_enabled</key>
29 <value>True</value>
30 </param>
31 <param>
32 <key>_coordinate</key>
33 <value>(8, 24)</value>
34 </param>
35 <param>
36 <key>_rotation</key>
37 <value>0</value>
38 </param>
39 <param>
40 <key>generate_options</key>
41 <value>qt_gui</value>
42 </param>
43 <param>
44 <key>hier_block_src_path</key>
45 <value>.:</value>
46 </param>
47 <param>
48 <key>id</key>
49 <value>double_pid_vco</value>
50 </param>
51 <param>
52 <key>max_nouts</key>
53 <value>0</value>
54 </param>
55 <param>
56 <key>qt_qss_theme</key>
57 <value></value>
58 </param>
59 <param>
60 <key>realtime_scheduling</key>
61 <value></value>
62 </param>
63 <param>
64 <key>run_command</key>
65 <value>{python} -u {filename}</value>
66 </param>
67 <param>
68 <key>run_options</key>
69 <value>prompt</value>
70 </param>
71 <param>
72 <key>run</key>
73 <value>True</value>
74 </param>
75 <param>
76 <key>thread_safe_setters</key>
77 <value></value>
78 </param>
79 <param>
80 <key>title</key>
81 <value></value>
82 </param>
83 </block>
84 <block>
85 <key>variable_qtgui_range</key>
86 <param>
87 <key>comment</key>
88 <value></value>
89 </param>
90 <param>
91 <key>value</key>
92 <value>0</value>
93 </param>
94 <param>
95 <key>_enabled</key>
96 <value>True</value>
97 </param>
98 <param>
99 <key>_coordinate</key>
100 <value>(280, 1068)</value>
101 </param>
102 <param>
103 <key>gui_hint</key>
104 <value>5,0</value>
105 </param>
106 <param>
107 <key>_rotation</key>
108 <value>0</value>
109 </param>
110 <param>
111 <key>id</key>
112 <value>adc1_offset</value>
113 </param>
114 <param>
115 <key>label</key>
116 <value>adc1_offset</value>
117 </param>
118 <param>
119 <key>min_len</key>
120 <value>200</value>
121 </param>
122 <param>
123 <key>orient</key>
124 <value>Qt.Horizontal</value>
125 </param>
126 <param>
127 <key>start</key>
128 <value>-2**13</value>
129 </param>
130 <param>
131 <key>step</key>
132 <value>1</value>
133 </param>
134 <param>
135 <key>stop</key>
136 <value>2**13-1</value>
137 </param>
138 <param>
139 <key>rangeType</key>
140 <value>int</value>
141 </param>
142 <param>
143 <key>widget</key>
144 <value>counter_slider</value>
145 </param>
146 </block>
147 <block>
148 <key>variable_qtgui_range</key>
149 <param>
150 <key>comment</key>
151 <value></value>
152 </param>
153 <param>
154 <key>value</key>
155 <value>0</value>
156 </param>
157 <param>
158 <key>_enabled</key>
159 <value>True</value>
160 </param>
161 <param>
162 <key>_coordinate</key>
163 <value>(624, 1068)</value>
164 </param>
165 <param>
166 <key>gui_hint</key>
167 <value>5,1</value>
168 </param>
169 <param>
170 <key>_rotation</key>
171 <value>0</value>
172 </param>
173 <param>
174 <key>id</key>
175 <value>adc2_offset</value>
176 </param>
177 <param>
178 <key>label</key>
179 <value>adc2_offset</value>
180 </param>
181 <param>
182 <key>min_len</key>
183 <value>200</value>
184 </param>
185 <param>
186 <key>orient</key>
187 <value>Qt.Horizontal</value>
188 </param>
189 <param>
190 <key>start</key>
191 <value>-2**13</value>
192 </param>
193 <param>
194 <key>step</key>
195 <value>1</value>
196 </param>
197 <param>
198 <key>stop</key>
199 <value>2**13-1</value>
200 </param>
201 <param>
202 <key>rangeType</key>
203 <value>int</value>
204 </param>
205 <param>
206 <key>widget</key>
207 <value>counter_slider</value>
208 </param>
209 </block>
210 <block>
211 <key>variable</key>
212 <param>
213 <key>comment</key>
214 <value></value>
215 </param>
216 <param>
217 <key>_enabled</key>
218 <value>True</value>
219 </param>
220 <param>
221 <key>_coordinate</key>
222 <value>(8, 104)</value>
223 </param>
224 <param>
225 <key>_rotation</key>
226 <value>0</value>
227 </param>
228 <param>
229 <key>id</key>
230 <value>addr</value>
231 </param>
232 <param>
233 <key>value</key>
234 <value>"192.168.0.203"</value>
235 </param>
236 </block>
237 <block>
238 <key>variable_qtgui_range</key>
239 <param>
240 <key>comment</key>
241 <value></value>
242 </param>
243 <param>
244 <key>value</key>
245 <value>0</value>
246 </param>
247 <param>
248 <key>_enabled</key>
249 <value>True</value>
250 </param>
251 <param>
252 <key>_coordinate</key>
253 <value>(280, 588)</value>
254 </param>
255 <param>
256 <key>gui_hint</key>
257 <value>3,0</value>
258 </param>
259 <param>
260 <key>_rotation</key>
261 <value>0</value>
262 </param>
263 <param>
264 <key>id</key>
265 <value>dds1_ampl</value>
266 </param>
267 <param>
268 <key>label</key>
269 <value>dds1_ampl</value>
270 </param>
271 <param>
272 <key>min_len</key>
273 <value>200</value>
274 </param>
275 <param>
276 <key>orient</key>
277 <value>Qt.Horizontal</value>
278 </param>
279 <param>
280 <key>start</key>
281 <value>0</value>
282 </param>
283 <param>
284 <key>step</key>
285 <value>1</value>
286 </param>
287 <param>
288 <key>stop</key>
289 <value>2**13-1</value>
290 </param>
291 <param>
292 <key>rangeType</key>
293 <value>int</value>
294 </param>
295 <param>
296 <key>widget</key>
297 <value>counter_slider</value>
298 </param>
299 </block>
300 <block>
301 <key>variable_qtgui_range</key>
302 <param>
303 <key>comment</key>
304 <value></value>
305 </param>
306 <param>
307 <key>value</key>
308 <value>39500000</value>
309 </param>
310 <param>
311 <key>_enabled</key>
312 <value>True</value>
313 </param>
314 <param>
315 <key>_coordinate</key>
316 <value>(280, 2708)</value>
317 </param>
318 <param>
319 <key>gui_hint</key>
320 <value>12,0</value>
321 </param>
322 <param>
323 <key>_rotation</key>
324 <value>0</value>
325 </param>
326 <param>
327 <key>id</key>
328 <value>dds1_f0</value>
329 </param>
330 <param>
331 <key>label</key>
332 <value>dds1_f0</value>
333 </param>
334 <param>
335 <key>min_len</key>
336 <value>200</value>
337 </param>
338 <param>
339 <key>orient</key>
340 <value>Qt.Horizontal</value>
341 </param>
342 <param>
343 <key>start</key>
344 <value>0</value>
345 </param>
346 <param>
347 <key>step</key>
348 <value>1</value>
349 </param>
350 <param>
351 <key>stop</key>
352 <value>60000000</value>
353 </param>
354 <param>
355 <key>rangeType</key>
356 <value>int</value>
357 </param>
358 <param>
359 <key>widget</key>
360 <value>counter_slider</value>
361 </param>
362 </block>
363 <block>
364 <key>variable_qtgui_range</key>
365 <param>
366 <key>comment</key>
367 <value></value>
368 </param>
369 <param>
370 <key>value</key>
371 <value>39500000</value>
372 </param>
373 <param>
374 <key>_enabled</key>
375 <value>True</value>
376 </param>
377 <param>
378 <key>_coordinate</key>
379 <value>(280, 28)</value>
380 </param>
381 <param>
382 <key>gui_hint</key>
383 <value>0,0</value>
384 </param>
385 <param>
386 <key>_rotation</key>
387 <value>0</value>
388 </param>
389 <param>
390 <key>id</key>
391 <value>dds1_nco</value>
392 </param>
393 <param>
394 <key>label</key>
395 <value>dds1_nco</value>
396 </param>
397 <param>
398 <key>min_len</key>
399 <value>200</value>
400 </param>
401 <param>
402 <key>orient</key>
403 <value>Qt.Horizontal</value>
404 </param>
405 <param>
406 <key>start</key>
407 <value>0</value>
408 </param>
409 <param>
410 <key>step</key>
411 <value>1</value>
412 </param>
413 <param>
414 <key>stop</key>
415 <value>60000000</value>
416 </param>
417 <param>
418 <key>rangeType</key>
419 <value>int</value>
420 </param>
421 <param>
422 <key>widget</key>
423 <value>counter_slider</value>
424 </param>
425 </block>
426 <block>
427 <key>variable_qtgui_range</key>
428 <param>
429 <key>comment</key>
430 <value></value>
431 </param>
432 <param>
433 <key>value</key>
434 <value>0</value>
435 </param>
436 <param>
437 <key>_enabled</key>
438 <value>True</value>
439 </param>
440 <param>
441 <key>_coordinate</key>
442 <value>(280, 828)</value>
443 </param>
444 <param>
445 <key>gui_hint</key>
446 <value>4,0</value>
447 </param>
448 <param>
449 <key>_rotation</key>
450 <value>0</value>
451 </param>
452 <param>
453 <key>id</key>
454 <value>dds1_offset</value>
455 </param>
456 <param>
457 <key>label</key>
458 <value>dds1_offset</value>
459 </param>
460 <param>
461 <key>min_len</key>
462 <value>200</value>
463 </param>
464 <param>
465 <key>orient</key>
466 <value>Qt.Horizontal</value>
467 </param>
468 <param>
469 <key>start</key>
470 <value>-2**13</value>
471 </param>
472 <param>
473 <key>step</key>
474 <value>1</value>
475 </param>
476 <param>
477 <key>stop</key>
478 <value>2**13-1</value>
479 </param>
480 <param>
481 <key>rangeType</key>
482 <value>int</value>
483 </param>
484 <param>
485 <key>widget</key>
486 <value>counter_slider</value>
487 </param>
488 </block>
489 <block>
490 <key>variable_qtgui_check_box</key>
491 <param>
492 <key>comment</key>
493 <value></value>
494 </param>
495 <param>
496 <key>value</key>
497 <value>1</value>
498 </param>
499 <param>
500 <key>_enabled</key>
501 <value>True</value>
502 </param>
503 <param>
504 <key>false</key>
505 <value>0</value>
506 </param>
507 <param>
508 <key>_coordinate</key>
509 <value>(280, 164)</value>
510 </param>
511 <param>
512 <key>gui_hint</key>
513 <value>1,0</value>
514 </param>
515 <param>
516 <key>_rotation</key>
517 <value>0</value>
518 </param>
519 <param>
520 <key>id</key>
521 <value>dds1_pinc_sw</value>
522 </param>
523 <param>
524 <key>label</key>
525 <value>dds1_pinc_sw</value>
526 </param>
527 <param>
528 <key>true</key>
529 <value>1</value>
530 </param>
531 <param>
532 <key>type</key>
533 <value>int</value>
534 </param>
535 </block>
536 <block>
537 <key>variable_qtgui_check_box</key>
538 <param>
539 <key>comment</key>
540 <value></value>
541 </param>
542 <param>
543 <key>value</key>
544 <value>1</value>
545 </param>
546 <param>
547 <key>_enabled</key>
548 <value>True</value>
549 </param>
550 <param>
551 <key>false</key>
552 <value>0</value>
553 </param>
554 <param>
555 <key>_coordinate</key>
556 <value>(280, 284)</value>
557 </param>
558 <param>
559 <key>gui_hint</key>
560 <value>2, 0</value>
561 </param>
562 <param>
563 <key>_rotation</key>
564 <value>0</value>
565 </param>
566 <param>
567 <key>id</key>
568 <value>dds1_poff_sw</value>
569 </param>
570 <param>
571 <key>label</key>
572 <value>dds1_poff_sw</value>
573 </param>
574 <param>
575 <key>true</key>
576 <value>1</value>
577 </param>
578 <param>
579 <key>type</key>
580 <value>int</value>
581 </param>
582 </block>
583 <block>
584 <key>variable_qtgui_range</key>
585 <param>
586 <key>comment</key>
587 <value></value>
588 </param>
589 <param>
590 <key>value</key>
591 <value>0</value>
592 </param>
593 <param>
594 <key>_enabled</key>
595 <value>True</value>
596 </param>
597 <param>
598 <key>_coordinate</key>
599 <value>(280, 2948)</value>
600 </param>
601 <param>
602 <key>gui_hint</key>
603 <value>13,0</value>
604 </param>
605 <param>
606 <key>_rotation</key>
607 <value>0</value>
608 </param>
609 <param>
610 <key>id</key>
611 <value>dds1_range</value>
612 </param>
613 <param>
614 <key>label</key>
615 <value>dds1_range</value>
616 </param>
617 <param>
618 <key>min_len</key>
619 <value>200</value>
620 </param>
621 <param>
622 <key>orient</key>
623 <value>Qt.Horizontal</value>
624 </param>
625 <param>
626 <key>start</key>
627 <value>-2**13</value>
628 </param>
629 <param>
630 <key>step</key>
631 <value>1</value>
632 </param>
633 <param>
634 <key>stop</key>
635 <value>2**13-1</value>
636 </param>
637 <param>
638 <key>rangeType</key>
639 <value>int</value>
640 </param>
641 <param>
642 <key>widget</key>
643 <value>counter_slider</value>
644 </param>
645 </block>
646 <block>
647 <key>variable_qtgui_range</key>
648 <param>
649 <key>comment</key>
650 <value></value>
651 </param>
652 <param>
653 <key>value</key>
654 <value>0</value>
655 </param>
656 <param>
657 <key>_enabled</key>
658 <value>True</value>
659 </param>
660 <param>
661 <key>_coordinate</key>
662 <value>(624, 588)</value>
663 </param>
664 <param>
665 <key>gui_hint</key>
666 <value>3,1</value>
667 </param>
668 <param>
669 <key>_rotation</key>
670 <value>0</value>
671 </param>
672 <param>
673 <key>id</key>
674 <value>dds2_ampl</value>
675 </param>
676 <param>
677 <key>label</key>
678 <value>dds2_ampl</value>
679 </param>
680 <param>
681 <key>min_len</key>
682 <value>200</value>
683 </param>
684 <param>
685 <key>orient</key>
686 <value>Qt.Horizontal</value>
687 </param>
688 <param>
689 <key>start</key>
690 <value>0</value>
691 </param>
692 <param>
693 <key>step</key>
694 <value>1</value>
695 </param>
696 <param>
697 <key>stop</key>
698 <value>2**13-1</value>
699 </param>
700 <param>
701 <key>rangeType</key>
702 <value>int</value>
703 </param>
704 <param>
705 <key>widget</key>
706 <value>counter_slider</value>
707 </param>
708 </block>
709 <block>
710 <key>variable_qtgui_range</key>
711 <param>
712 <key>comment</key>
713 <value></value>
714 </param>
715 <param>
716 <key>value</key>
717 <value>40750000</value>
718 </param>
719 <param>
720 <key>_enabled</key>
721 <value>True</value>
722 </param>
723 <param>
724 <key>_coordinate</key>
725 <value>(624, 2708)</value>
726 </param>
727 <param>
728 <key>gui_hint</key>
729 <value>12,1</value>
730 </param>
731 <param>
732 <key>_rotation</key>
733 <value>0</value>
734 </param>
735 <param>
736 <key>id</key>
737 <value>dds2_f0</value>
738 </param>
739 <param>
740 <key>label</key>
741 <value>dds2_f0</value>
742 </param>
743 <param>
744 <key>min_len</key>
745 <value>200</value>
746 </param>
747 <param>
748 <key>orient</key>
749 <value>Qt.Horizontal</value>
750 </param>
751 <param>
752 <key>start</key>
753 <value>0</value>
754 </param>
755 <param>
756 <key>step</key>
757 <value>1</value>
758 </param>
759 <param>
760 <key>stop</key>
761 <value>60000000</value>
762 </param>
763 <param>
764 <key>rangeType</key>
765 <value>int</value>
766 </param>
767 <param>
768 <key>widget</key>
769 <value>counter_slider</value>
770 </param>
771 </block>
772 <block>
773 <key>variable_qtgui_range</key>
774 <param>
775 <key>comment</key>
776 <value></value>
777 </param>
778 <param>
779 <key>value</key>
780 <value>40750000</value>
781 </param>
782 <param>
783 <key>_enabled</key>
784 <value>True</value>
785 </param>
786 <param>
787 <key>_coordinate</key>
788 <value>(624, 28)</value>
789 </param>
790 <param>
791 <key>gui_hint</key>
792 <value>0,1</value>
793 </param>
794 <param>
795 <key>_rotation</key>
796 <value>0</value>
797 </param>
798 <param>
799 <key>id</key>
800 <value>dds2_nco</value>
801 </param>
802 <param>
803 <key>label</key>
804 <value>dds2_nco</value>
805 </param>
806 <param>
807 <key>min_len</key>
808 <value>200</value>
809 </param>
810 <param>
811 <key>orient</key>
812 <value>Qt.Horizontal</value>
813 </param>
814 <param>
815 <key>start</key>
816 <value>0</value>
817 </param>
818 <param>
819 <key>step</key>
820 <value>1</value>
821 </param>
822 <param>
823 <key>stop</key>
824 <value>60000000</value>
825 </param>
826 <param>
827 <key>rangeType</key>
828 <value>int</value>
829 </param>
830 <param>
831 <key>widget</key>
832 <value>counter_slider</value>
833 </param>
834 </block>
835 <block>
836 <key>variable_qtgui_range</key>
837 <param>
838 <key>comment</key>
839 <value></value>
840 </param>
841 <param>
842 <key>value</key>
843 <value>0</value>
844 </param>
845 <param>
846 <key>_enabled</key>
847 <value>True</value>
848 </param>
849 <param>
850 <key>_coordinate</key>
851 <value>(624, 828)</value>
852 </param>
853 <param>
854 <key>gui_hint</key>
855 <value>4,1</value>
856 </param>
857 <param>
858 <key>_rotation</key>
859 <value>0</value>
860 </param>
861 <param>
862 <key>id</key>
863 <value>dds2_offset</value>
864 </param>
865 <param>
866 <key>label</key>
867 <value>dds2_offset</value>
868 </param>
869 <param>
870 <key>min_len</key>
871 <value>200</value>
872 </param>
873 <param>
874 <key>orient</key>
875 <value>Qt.Horizontal</value>
876 </param>
877 <param>
878 <key>start</key>
879 <value>-2**13</value>
880 </param>
881 <param>
882 <key>step</key>
883 <value>1</value>
884 </param>
885 <param>
886 <key>stop</key>
887 <value>2**13-1</value>
888 </param>
889 <param>
890 <key>rangeType</key>
891 <value>int</value>
892 </param>
893 <param>
894 <key>widget</key>
895 <value>counter_slider</value>
896 </param>
897 </block>
898 <block>
899 <key>variable_qtgui_check_box</key>
900 <param>
901 <key>comment</key>
902 <value></value>
903 </param>
904 <param>
905 <key>value</key>
906 <value>1</value>
907 </param>
908 <param>
909 <key>_enabled</key>
910 <value>True</value>
911 </param>
912 <param>
913 <key>false</key>
914 <value>0</value>
915 </param>
916 <param>
917 <key>_coordinate</key>
918 <value>(624, 164)</value>
919 </param>
920 <param>
921 <key>gui_hint</key>
922 <value>1,1</value>
923 </param>
924 <param>
925 <key>_rotation</key>
926 <value>0</value>
927 </param>
928 <param>
929 <key>id</key>
930 <value>dds2_pinc_sw</value>
931 </param>
932 <param>
933 <key>label</key>
934 <value>dds2_pinc_sw</value>
935 </param>
936 <param>
937 <key>true</key>
938 <value>1</value>
939 </param>
940 <param>
941 <key>type</key>
942 <value>int</value>
943 </param>
944 </block>
945 <block>
946 <key>variable_qtgui_check_box</key>
947 <param>
948 <key>comment</key>
949 <value></value>
950 </param>
951 <param>
952 <key>value</key>
953 <value>1</value>
954 </param>
955 <param>
956 <key>_enabled</key>
957 <value>True</value>
958 </param>
959 <param>
960 <key>false</key>
961 <value>0</value>
962 </param>
963 <param>
964 <key>_coordinate</key>
965 <value>(624, 284)</value>
966 </param>
967 <param>
968 <key>gui_hint</key>
969 <value>2, 1</value>
970 </param>
971 <param>
972 <key>_rotation</key>
973 <value>0</value>
974 </param>
975 <param>
976 <key>id</key>
977 <value>dds2_poff_sw</value>
978 </param>
979 <param>
980 <key>label</key>
981 <value>dds2_poff_sw</value>
982 </param>
983 <param>
984 <key>true</key>
985 <value>1</value>
986 </param>
987 <param>
988 <key>type</key>
989 <value>int</value>
990 </param>
991 </block>
992 <block>
993 <key>variable_qtgui_range</key>
994 <param>
995 <key>comment</key>
996 <value></value>
997 </param>
998 <param>
999 <key>value</key>
1000 <value>0</value>
1001 </param>
1002 <param>
1003 <key>_enabled</key>
1004 <value>True</value>
1005 </param>
1006 <param>
1007 <key>_coordinate</key>
1008 <value>(624, 2948)</value>
1009 </param>
1010 <param>
1011 <key>gui_hint</key>
1012 <value>13,1</value>
1013 </param>
1014 <param>
1015 <key>_rotation</key>
1016 <value>0</value>
1017 </param>
1018 <param>
1019 <key>id</key>
1020 <value>dds2_range</value>
1021 </param>
1022 <param>
1023 <key>label</key>
1024 <value>dds2_range</value>
1025 </param>
1026 <param>
1027 <key>min_len</key>
1028 <value>200</value>
1029 </param>
1030 <param>
1031 <key>orient</key>
1032 <value>Qt.Horizontal</value>
1033 </param>
1034 <param>
1035 <key>start</key>
1036 <value>-2**13</value>
1037 </param>
1038 <param>
1039 <key>step</key>
1040 <value>1</value>
1041 </param>
1042 <param>
1043 <key>stop</key>
1044 <value>2**13-1</value>
1045 </param>
1046 <param>
1047 <key>rangeType</key>
1048 <value>int</value>
1049 </param>
1050 <param>
1051 <key>widget</key>
1052 <value>counter_slider</value>
1053 </param>
1054 </block>
1055 <block>
1056 <key>variable_qtgui_range</key>
1057 <param>
1058 <key>comment</key>
1059 <value></value>
1060 </param>
1061 <param>
1062 <key>value</key>
1063 <value>0</value>
1064 </param>
1065 <param>
1066 <key>_enabled</key>
1067 <value>True</value>
1068 </param>
1069 <param>
1070 <key>_coordinate</key>
1071 <value>(280, 1780)</value>
1072 </param>
1073 <param>
1074 <key>gui_hint</key>
1075 <value>8,0</value>
1076 </param>
1077 <param>
1078 <key>_rotation</key>
1079 <value>0</value>
1080 </param>
1081 <param>
1082 <key>id</key>
1083 <value>pid1_kd</value>
1084 </param>
1085 <param>
1086 <key>label</key>
1087 <value>pid1_kd</value>
1088 </param>
1089 <param>
1090 <key>min_len</key>
1091 <value>200</value>
1092 </param>
1093 <param>
1094 <key>orient</key>
1095 <value>Qt.Horizontal</value>
1096 </param>
1097 <param>
1098 <key>start</key>
1099 <value>0</value>
1100 </param>
1101 <param>
1102 <key>step</key>
1103 <value>1</value>
1104 </param>
1105 <param>
1106 <key>stop</key>
1107 <value>2**13-1</value>
1108 </param>
1109 <param>
1110 <key>rangeType</key>
1111 <value>int</value>
1112 </param>
1113 <param>
1114 <key>widget</key>
1115 <value>counter_slider</value>
1116 </param>
1117 </block>
1118 <block>
1119 <key>variable_qtgui_range</key>
1120 <param>
1121 <key>comment</key>
1122 <value></value>
1123 </param>
1124 <param>
1125 <key>value</key>
1126 <value>0</value>
1127 </param>
1128 <param>
1129 <key>_enabled</key>
1130 <value>True</value>
1131 </param>
1132 <param>
1133 <key>_coordinate</key>
1134 <value>(280, 1540)</value>
1135 </param>
1136 <param>
1137 <key>gui_hint</key>
1138 <value>7,0</value>
1139 </param>
1140 <param>
1141 <key>_rotation</key>
1142 <value>0</value>
1143 </param>
1144 <param>
1145 <key>id</key>
1146 <value>pid1_ki</value>
1147 </param>
1148 <param>
1149 <key>label</key>
1150 <value>pid1_ki</value>
1151 </param>
1152 <param>
1153 <key>min_len</key>
1154 <value>200</value>
1155 </param>
1156 <param>
1157 <key>orient</key>
1158 <value>Qt.Horizontal</value>
1159 </param>
1160 <param>
1161 <key>start</key>
1162 <value>0</value>
1163 </param>
1164 <param>
1165 <key>step</key>
1166 <value>1</value>
1167 </param>
1168 <param>
1169 <key>stop</key>
1170 <value>2**13-1</value>
1171 </param>
1172 <param>
1173 <key>rangeType</key>
1174 <value>int</value>
1175 </param>
1176 <param>
1177 <key>widget</key>
1178 <value>counter_slider</value>
1179 </param>
1180 </block>
1181 <block>
1182 <key>variable_qtgui_range</key>
1183 <param>
1184 <key>comment</key>
1185 <value></value>
1186 </param>
1187 <param>
1188 <key>value</key>
1189 <value>0</value>
1190 </param>
1191 <param>
1192 <key>_enabled</key>
1193 <value>True</value>
1194 </param>
1195 <param>
1196 <key>_coordinate</key>
1197 <value>(280, 1308)</value>
1198 </param>
1199 <param>
1200 <key>gui_hint</key>
1201 <value>6,0</value>
1202 </param>
1203 <param>
1204 <key>_rotation</key>
1205 <value>0</value>
1206 </param>
1207 <param>
1208 <key>id</key>
1209 <value>pid1_kp</value>
1210 </param>
1211 <param>
1212 <key>label</key>
1213 <value>pid1_kp</value>
1214 </param>
1215 <param>
1216 <key>min_len</key>
1217 <value>200</value>
1218 </param>
1219 <param>
1220 <key>orient</key>
1221 <value>Qt.Horizontal</value>
1222 </param>
1223 <param>
1224 <key>start</key>
1225 <value>0</value>
1226 </param>
1227 <param>
1228 <key>step</key>
1229 <value>1</value>
1230 </param>
1231 <param>
1232 <key>stop</key>
1233 <value>2**13-1</value>
1234 </param>
1235 <param>
1236 <key>rangeType</key>
1237 <value>int</value>
1238 </param>
1239 <param>
1240 <key>widget</key>
1241 <value>counter_slider</value>
1242 </param>
1243 </block>
1244 <block>
1245 <key>variable_qtgui_push_button</key>
1246 <param>
1247 <key>comment</key>
1248 <value></value>
1249 </param>
1250 <param>
1251 <key>value</key>
1252 <value>0</value>
1253 </param>
1254 <param>
1255 <key>_enabled</key>
1256 <value>True</value>
1257 </param>
1258 <param>
1259 <key>_coordinate</key>
1260 <value>(280, 2484)</value>
1261 </param>
1262 <param>
1263 <key>gui_hint</key>
1264 <value>11,0</value>
1265 </param>
1266 <param>
1267 <key>_rotation</key>
1268 <value>0</value>
1269 </param>
1270 <param>
1271 <key>id</key>
1272 <value>pid1_rst_int</value>
1273 </param>
1274 <param>
1275 <key>label</key>
1276 <value>pid1_rst_int</value>
1277 </param>
1278 <param>
1279 <key>pressed</key>
1280 <value>1</value>
1281 </param>
1282 <param>
1283 <key>released</key>
1284 <value>0</value>
1285 </param>
1286 <param>
1287 <key>type</key>
1288 <value>int</value>
1289 </param>
1290 </block>
1291 <block>
1292 <key>variable_qtgui_range</key>
1293 <param>
1294 <key>comment</key>
1295 <value></value>
1296 </param>
1297 <param>
1298 <key>value</key>
1299 <value>0</value>
1300 </param>
1301 <param>
1302 <key>_enabled</key>
1303 <value>True</value>
1304 </param>
1305 <param>
1306 <key>_coordinate</key>
1307 <value>(280, 2020)</value>
1308 </param>
1309 <param>
1310 <key>gui_hint</key>
1311 <value>9,0</value>
1312 </param>
1313 <param>
1314 <key>_rotation</key>
1315 <value>0</value>
1316 </param>
1317 <param>
1318 <key>id</key>
1319 <value>pid1_setpoint</value>
1320 </param>
1321 <param>
1322 <key>label</key>
1323 <value>pid1_setpoint</value>
1324 </param>
1325 <param>
1326 <key>min_len</key>
1327 <value>200</value>
1328 </param>
1329 <param>
1330 <key>orient</key>
1331 <value>Qt.Horizontal</value>
1332 </param>
1333 <param>
1334 <key>start</key>
1335 <value>-2**13</value>
1336 </param>
1337 <param>
1338 <key>step</key>
1339 <value>1</value>
1340 </param>
1341 <param>
1342 <key>stop</key>
1343 <value>2**13-1</value>
1344 </param>
1345 <param>
1346 <key>rangeType</key>
1347 <value>int</value>
1348 </param>
1349 <param>
1350 <key>widget</key>
1351 <value>counter_slider</value>
1352 </param>
1353 </block>
1354 <block>
1355 <key>variable_qtgui_check_box</key>
1356 <param>
1357 <key>comment</key>
1358 <value></value>
1359 </param>
1360 <param>
1361 <key>value</key>
1362 <value>0</value>
1363 </param>
1364 <param>
1365 <key>_enabled</key>
1366 <value>True</value>
1367 </param>
1368 <param>
1369 <key>false</key>
1370 <value>0</value>
1371 </param>
1372 <param>
1373 <key>_coordinate</key>
1374 <value>(280, 2260)</value>
1375 </param>
1376 <param>
1377 <key>gui_hint</key>
1378 <value>10,0</value>
1379 </param>
1380 <param>
1381 <key>_rotation</key>
1382 <value>0</value>
1383 </param>
1384 <param>
1385 <key>id</key>
1386 <value>pid1_sign</value>
1387 </param>
1388 <param>
1389 <key>label</key>
1390 <value>pid1_sign</value>
1391 </param>
1392 <param>
1393 <key>true</key>
1394 <value>1</value>
1395 </param>
1396 <param>
1397 <key>type</key>
1398 <value>int</value>
1399 </param>
1400 </block>
1401 <block>
1402 <key>variable_qtgui_range</key>
1403 <param>
1404 <key>comment</key>
1405 <value></value>
1406 </param>
1407 <param>
1408 <key>value</key>
1409 <value>0</value>
1410 </param>
1411 <param>
1412 <key>_enabled</key>
1413 <value>True</value>
1414 </param>
1415 <param>
1416 <key>_coordinate</key>
1417 <value>(624, 1780)</value>
1418 </param>
1419 <param>
1420 <key>gui_hint</key>
1421 <value>8,1</value>
1422 </param>
1423 <param>
1424 <key>_rotation</key>
1425 <value>0</value>
1426 </param>
1427 <param>
1428 <key>id</key>
1429 <value>pid2_kd</value>
1430 </param>
1431 <param>
1432 <key>label</key>
1433 <value>pid2_kd</value>
1434 </param>
1435 <param>
1436 <key>min_len</key>
1437 <value>200</value>
1438 </param>
1439 <param>
1440 <key>orient</key>
1441 <value>Qt.Horizontal</value>
1442 </param>
1443 <param>
1444 <key>start</key>
1445 <value>0</value>
1446 </param>
1447 <param>
1448 <key>step</key>
1449 <value>1</value>
1450 </param>
1451 <param>
1452 <key>stop</key>
1453 <value>2**13-1</value>
1454 </param>
1455 <param>
1456 <key>rangeType</key>
1457 <value>int</value>
1458 </param>
1459 <param>
1460 <key>widget</key>
1461 <value>counter_slider</value>
1462 </param>
1463 </block>
1464 <block>
1465 <key>variable_qtgui_range</key>
1466 <param>
1467 <key>comment</key>
1468 <value></value>
1469 </param>
1470 <param>
1471 <key>value</key>
1472 <value>0</value>
1473 </param>
1474 <param>
1475 <key>_enabled</key>
1476 <value>True</value>
1477 </param>
1478 <param>
1479 <key>_coordinate</key>
1480 <value>(624, 1540)</value>
1481 </param>
1482 <param>
1483 <key>gui_hint</key>
1484 <value>7,1</value>
1485 </param>
1486 <param>
1487 <key>_rotation</key>
1488 <value>0</value>
1489 </param>
1490 <param>
1491 <key>id</key>
1492 <value>pid2_ki</value>
1493 </param>
1494 <param>
1495 <key>label</key>
1496 <value>pid2_ki</value>
1497 </param>
1498 <param>
1499 <key>min_len</key>
1500 <value>200</value>
1501 </param>
1502 <param>
1503 <key>orient</key>
1504 <value>Qt.Horizontal</value>
1505 </param>
1506 <param>
1507 <key>start</key>
1508 <value>0</value>
1509 </param>
1510 <param>
1511 <key>step</key>
1512 <value>1</value>
1513 </param>
1514 <param>
1515 <key>stop</key>
1516 <value>2**13-1</value>
1517 </param>
1518 <param>
1519 <key>rangeType</key>
1520 <value>int</value>
1521 </param>
1522 <param>
1523 <key>widget</key>
1524 <value>counter_slider</value>
1525 </param>
1526 </block>
1527 <block>
1528 <key>variable_qtgui_range</key>
1529 <param>
1530 <key>comment</key>
1531 <value></value>
1532 </param>
1533 <param>
1534 <key>value</key>
1535 <value>0</value>
1536 </param>
1537 <param>
1538 <key>_enabled</key>
1539 <value>True</value>
1540 </param>
1541 <param>
1542 <key>_coordinate</key>
1543 <value>(624, 1308)</value>
1544 </param>
1545 <param>
1546 <key>gui_hint</key>
1547 <value>6,1</value>
1548 </param>
1549 <param>
1550 <key>_rotation</key>
1551 <value>0</value>
1552 </param>
1553 <param>
1554 <key>id</key>
1555 <value>pid2_kp</value>
1556 </param>
1557 <param>
1558 <key>label</key>
1559 <value>pid2_kp</value>
1560 </param>
1561 <param>
1562 <key>min_len</key>
1563 <value>200</value>
1564 </param>
1565 <param>
1566 <key>orient</key>
1567 <value>Qt.Horizontal</value>
1568 </param>
1569 <param>
1570 <key>start</key>
1571 <value>0</value>
1572 </param>
1573 <param>
1574 <key>step</key>
1575 <value>1</value>
1576 </param>
1577 <param>
1578 <key>stop</key>
1579 <value>2**13-1</value>
1580 </param>
1581 <param>
1582 <key>rangeType</key>
1583 <value>int</value>
1584 </param>
1585 <param>
1586 <key>widget</key>
1587 <value>counter_slider</value>
1588 </param>
1589 </block>
1590 <block>
1591 <key>variable_qtgui_push_button</key>
1592 <param>
1593 <key>comment</key>
1594 <value></value>
1595 </param>
1596 <param>
1597 <key>value</key>
1598 <value>0</value>
1599 </param>
1600 <param>
1601 <key>_enabled</key>
1602 <value>True</value>
1603 </param>
1604 <param>
1605 <key>_coordinate</key>
1606 <value>(624, 2484)</value>
1607 </param>
1608 <param>
1609 <key>gui_hint</key>
1610 <value>11,1</value>
1611 </param>
1612 <param>
1613 <key>_rotation</key>
1614 <value>0</value>
1615 </param>
1616 <param>
1617 <key>id</key>
1618 <value>pid2_rst_int</value>
1619 </param>
1620 <param>
1621 <key>label</key>
1622 <value>pid2_rst_int</value>
1623 </param>
1624 <param>
1625 <key>pressed</key>
1626 <value>1</value>
1627 </param>
1628 <param>
1629 <key>released</key>
1630 <value>0</value>
1631 </param>
1632 <param>
1633 <key>type</key>
1634 <value>int</value>
1635 </param>
1636 </block>
1637 <block>
1638 <key>variable_qtgui_range</key>
1639 <param>
1640 <key>comment</key>
1641 <value></value>
1642 </param>
1643 <param>
1644 <key>value</key>
1645 <value>0</value>
1646 </param>
1647 <param>
1648 <key>_enabled</key>
1649 <value>True</value>
1650 </param>
1651 <param>
1652 <key>_coordinate</key>
1653 <value>(624, 2020)</value>
1654 </param>
1655 <param>
1656 <key>gui_hint</key>
1657 <value>9,1</value>
1658 </param>
1659 <param>
1660 <key>_rotation</key>
1661 <value>0</value>
1662 </param>
1663 <param>
1664 <key>id</key>
1665 <value>pid2_setpoint</value>
1666 </param>
1667 <param>
1668 <key>label</key>
1669 <value>pid2_setpoint</value>
1670 </param>
1671 <param>
1672 <key>min_len</key>
1673 <value>200</value>
1674 </param>
1675 <param>
1676 <key>orient</key>
1677 <value>Qt.Horizontal</value>
1678 </param>
1679 <param>
1680 <key>start</key>
1681 <value>-2**13</value>
1682 </param>
1683 <param>
1684 <key>step</key>
1685 <value>1</value>
1686 </param>
1687 <param>
1688 <key>stop</key>
1689 <value>2**13-1</value>
1690 </param>
1691 <param>
1692 <key>rangeType</key>
1693 <value>int</value>
1694 </param>
1695 <param>
1696 <key>widget</key>
1697 <value>counter_slider</value>
1698 </param>
1699 </block>
1700 <block>
1701 <key>variable_qtgui_check_box</key>
1702 <param>
1703 <key>comment</key>
1704 <value></value>
1705 </param>
1706 <param>
1707 <key>value</key>
1708 <value>0</value>
1709 </param>
1710 <param>
1711 <key>_enabled</key>
1712 <value>True</value>
1713 </param>
1714 <param>
1715 <key>false</key>
1716 <value>0</value>
1717 </param>
1718 <param>
1719 <key>_coordinate</key>
1720 <value>(624, 2260)</value>
1721 </param>
1722 <param>
1723 <key>gui_hint</key>
1724 <value>10,1</value>
1725 </param>
1726 <param>
1727 <key>_rotation</key>
1728 <value>0</value>
1729 </param>
1730 <param>
1731 <key>id</key>
1732 <value>pid2_sign</value>
1733 </param>
1734 <param>
1735 <key>label</key>
1736 <value>pid2_sign</value>
1737 </param>
1738 <param>
1739 <key>true</key>
1740 <value>1</value>
1741 </param>
1742 <param>
1743 <key>type</key>
1744 <value>int</value>
1745 </param>
1746 </block>
1747 <block>
1748 <key>variable</key>
1749 <param>
1750 <key>comment</key>
1751 <value></value>
1752 </param>
1753 <param>
1754 <key>_enabled</key>
1755 <value>True</value>
1756 </param>
1757 <param>
1758 <key>_coordinate</key>
1759 <value>(8, 176)</value>
1760 </param>
1761 <param>
1762 <key>_rotation</key>
1763 <value>0</value>
1764 </param>
1765 <param>
1766 <key>id</key>
1767 <value>port</value>
1768 </param>
1769 <param>
1770 <key>value</key>
1771 <value>1001</value>
1772 </param>
1773 </block>
1774 <block>
1775 <key>add_const_set_offset</key>
1776 <param>
1777 <key>addr</key>
1778 <value>addr</value>
1779 </param>
1780 <param>
1781 <key>alias</key>
1782 <value></value>
1783 </param>
1784 <param>
1785 <key>comment</key>
1786 <value></value>
1787 </param>
1788 <param>
1789 <key>const</key>
1790 <value>adc1_offset</value>
1791 </param>
1792 <param>
1793 <key>device</key>
1794 <value>/dev/adc1_offset</value>
1795 </param>
1796 <param>
1797 <key>_enabled</key>
1798 <value>True</value>
1799 </param>
1800 <param>
1801 <key>_coordinate</key>
1802 <value>(280, 1204)</value>
1803 </param>
1804 <param>
1805 <key>_rotation</key>
1806 <value>0</value>
1807 </param>
1808 <param>
1809 <key>id</key>
1810 <value>add_const_set_offset_0_0_0</value>
1811 </param>
1812 <param>
1813 <key>port</key>
1814 <value>port</value>
1815 </param>
1816 </block>
1817 <block>
1818 <key>add_const_set_offset</key>
1819 <param>
1820 <key>addr</key>
1821 <value>addr</value>
1822 </param>
1823 <param>
1824 <key>alias</key>
1825 <value></value>
1826 </param>
1827 <param>
1828 <key>comment</key>
1829 <value></value>
1830 </param>
1831 <param>
1832 <key>const</key>
1833 <value>adc2_offset</value>
1834 </param>
1835 <param>
1836 <key>device</key>
1837 <value>/dev/adc2_offset</value>
1838 </param>
1839 <param>
1840 <key>_enabled</key>
1841 <value>True</value>
1842 </param>
1843 <param>
1844 <key>_coordinate</key>
1845 <value>(624, 1204)</value>
1846 </param>
1847 <param>
1848 <key>_rotation</key>
1849 <value>0</value>
1850 </param>
1851 <param>
1852 <key>id</key>
1853 <value>add_const_set_offset_0_0_0_0</value>
1854 </param>
1855 <param>
1856 <key>port</key>
1857 <value>port</value>
1858 </param>
1859 </block>
1860 <block>
1861 <key>add_const_set_offset</key>
1862 <param>
1863 <key>addr</key>
1864 <value>addr</value>
1865 </param>
1866 <param>
1867 <key>alias</key>
1868 <value></value>
1869 </param>
1870 <param>
1871 <key>comment</key>
1872 <value></value>
1873 </param>
1874 <param>
1875 <key>const</key>
1876 <value>dds1_ampl</value>
1877 </param>
1878 <param>
1879 <key>device</key>
1880 <value>/dev/dds1_ampl</value>
1881 </param>
1882 <param>
1883 <key>_enabled</key>
1884 <value>True</value>
1885 </param>
1886 <param>
1887 <key>_coordinate</key>
1888 <value>(280, 724)</value>
1889 </param>
1890 <param>
1891 <key>_rotation</key>
1892 <value>0</value>
1893 </param>
1894 <param>
1895 <key>id</key>
1896 <value>add_const_set_offset_0_0_0_0_0</value>
1897 </param>
1898 <param>
1899 <key>port</key>
1900 <value>port</value>
1901 </param>
1902 </block>
1903 <block>
1904 <key>add_const_set_offset</key>
1905 <param>
1906 <key>addr</key>
1907 <value>addr</value>
1908 </param>
1909 <param>
1910 <key>alias</key>
1911 <value></value>
1912 </param>
1913 <param>
1914 <key>comment</key>
1915 <value></value>
1916 </param>
1917 <param>
1918 <key>const</key>
1919 <value>dds2_ampl</value>
1920 </param>
1921 <param>
1922 <key>device</key>
1923 <value>/dev/dds2_ampl</value>
1924 </param>
1925 <param>
1926 <key>_enabled</key>
1927 <value>True</value>
1928 </param>
1929 <param>
1930 <key>_coordinate</key>
1931 <value>(624, 724)</value>
1932 </param>
1933 <param>
1934 <key>_rotation</key>
1935 <value>0</value>
1936 </param>
1937 <param>
1938 <key>id</key>
1939 <value>add_const_set_offset_0_0_0_0_0_0</value>
1940 </param>
1941 <param>
1942 <key>port</key>
1943 <value>port</value>
1944 </param>
1945 </block>
1946 <block>
1947 <key>add_const_set_offset</key>
1948 <param>
1949 <key>addr</key>
1950 <value>addr</value>
1951 </param>
1952 <param>
1953 <key>alias</key>
1954 <value></value>
1955 </param>
1956 <param>
1957 <key>comment</key>
1958 <value></value>
1959 </param>
1960 <param>
1961 <key>const</key>
1962 <value>dds1_offset</value>
1963 </param>
1964 <param>
1965 <key>device</key>
1966 <value>/dev/dds1_offset</value>
1967 </param>
1968 <param>
1969 <key>_enabled</key>
1970 <value>True</value>
1971 </param>
1972 <param>
1973 <key>_coordinate</key>
1974 <value>(280, 964)</value>
1975 </param>
1976 <param>
1977 <key>_rotation</key>
1978 <value>0</value>
1979 </param>
1980 <param>
1981 <key>id</key>
1982 <value>add_const_set_offset_0_0_0_0_1</value>
1983 </param>
1984 <param>
1985 <key>port</key>
1986 <value>port</value>
1987 </param>
1988 </block>
1989 <block>
1990 <key>add_const_set_offset</key>
1991 <param>
1992 <key>addr</key>
1993 <value>addr</value>
1994 </param>
1995 <param>
1996 <key>alias</key>
1997 <value></value>
1998 </param>
1999 <param>
2000 <key>comment</key>
2001 <value></value>
2002 </param>
2003 <param>
2004 <key>const</key>
2005 <value>int(dds1_f0/(125e6/2**32))</value>
2006 </param>
2007 <param>
2008 <key>device</key>
2009 <value>/dev/dds1_f0</value>
2010 </param>
2011 <param>
2012 <key>_enabled</key>
2013 <value>True</value>
2014 </param>
2015 <param>
2016 <key>_coordinate</key>
2017 <value>(280, 2844)</value>
2018 </param>
2019 <param>
2020 <key>_rotation</key>
2021 <value>0</value>
2022 </param>
2023 <param>
2024 <key>id</key>
2025 <value>add_const_set_offset_0_0_0_0_1_0</value>
2026 </param>
2027 <param>
2028 <key>port</key>
2029 <value>port</value>
2030 </param>
2031 </block>
2032 <block>
2033 <key>add_const_set_offset</key>
2034 <param>
2035 <key>addr</key>
2036 <value>addr</value>
2037 </param>
2038 <param>
2039 <key>alias</key>
2040 <value></value>
2041 </param>
2042 <param>
2043 <key>comment</key>
2044 <value></value>
2045 </param>
2046 <param>
2047 <key>const</key>
2048 <value>dds1_range</value>
2049 </param>
2050 <param>
2051 <key>device</key>
2052 <value>/dev/dds1_range</value>
2053 </param>
2054 <param>
2055 <key>_enabled</key>
2056 <value>True</value>
2057 </param>
2058 <param>
2059 <key>_coordinate</key>
2060 <value>(280, 3084)</value>
2061 </param>
2062 <param>
2063 <key>_rotation</key>
2064 <value>0</value>
2065 </param>
2066 <param>
2067 <key>id</key>
2068 <value>add_const_set_offset_0_0_0_0_1_0_0</value>
2069 </param>
2070 <param>
2071 <key>port</key>
2072 <value>port</value>
2073 </param>
2074 </block>
2075 <block>
2076 <key>add_const_set_offset</key>
2077 <param>
2078 <key>addr</key>
2079 <value>addr</value>
2080 </param>
2081 <param>
2082 <key>alias</key>
2083 <value></value>
2084 </param>
2085 <param>
2086 <key>comment</key>
2087 <value></value>
2088 </param>
2089 <param>
2090 <key>const</key>
2091 <value>dds2_range</value>
2092 </param>
2093 <param>
2094 <key>device</key>
2095 <value>/dev/dds2_range</value>
2096 </param>
2097 <param>
2098 <key>_enabled</key>
2099 <value>True</value>
2100 </param>
2101 <param>
2102 <key>_coordinate</key>
2103 <value>(624, 3084)</value>
2104 </param>
2105 <param>
2106 <key>_rotation</key>
2107 <value>0</value>
2108 </param>
2109 <param>
2110 <key>id</key>
2111 <value>add_const_set_offset_0_0_0_0_1_0_0_0</value>
2112 </param>
2113 <param>
2114 <key>port</key>
2115 <value>port</value>
2116 </param>
2117 </block>
2118 <block>
2119 <key>add_const_set_offset</key>
2120 <param>
2121 <key>addr</key>
2122 <value>addr</value>
2123 </param>
2124 <param>
2125 <key>alias</key>
2126 <value></value>
2127 </param>
2128 <param>
2129 <key>comment</key>
2130 <value></value>
2131 </param>
2132 <param>
2133 <key>const</key>
2134 <value>int(dds2_f0/(125e6/2**32))</value>
2135 </param>
2136 <param>
2137 <key>device</key>
2138 <value>/dev/dds2_f0</value>
2139 </param>
2140 <param>
2141 <key>_enabled</key>
2142 <value>True</value>
2143 </param>
2144 <param>
2145 <key>_coordinate</key>
2146 <value>(624, 2844)</value>
2147 </param>
2148 <param>
2149 <key>_rotation</key>
2150 <value>0</value>
2151 </param>
2152 <param>
2153 <key>id</key>
2154 <value>add_const_set_offset_0_0_0_0_1_0_1</value>
2155 </param>
2156 <param>
2157 <key>port</key>
2158 <value>port</value>
2159 </param>
2160 </block>
2161 <block>
2162 <key>add_const_set_offset</key>
2163 <param>
2164 <key>addr</key>
2165 <value>addr</value>
2166 </param>
2167 <param>
2168 <key>alias</key>
2169 <value></value>
2170 </param>
2171 <param>
2172 <key>comment</key>
2173 <value></value>
2174 </param>
2175 <param>
2176 <key>const</key>
2177 <value>dds2_offset</value>
2178 </param>
2179 <param>
2180 <key>device</key>
2181 <value>/dev/dds2_offset</value>
2182 </param>
2183 <param>
2184 <key>_enabled</key>
2185 <value>True</value>
2186 </param>
2187 <param>
2188 <key>_coordinate</key>
2189 <value>(624, 964)</value>
2190 </param>
2191 <param>
2192 <key>_rotation</key>
2193 <value>0</value>
2194 </param>
2195 <param>
2196 <key>id</key>
2197 <value>add_const_set_offset_0_0_0_0_1_1</value>
2198 </param>
2199 <param>
2200 <key>port</key>
2201 <value>port</value>
2202 </param>
2203 </block>
2204 <block>
2205 <key>add_const_set_offset</key>
2206 <param>
2207 <key>addr</key>
2208 <value>addr</value>
2209 </param>
2210 <param>
2211 <key>alias</key>
2212 <value></value>
2213 </param>
2214 <param>
2215 <key>comment</key>
2216 <value></value>
2217 </param>
2218 <param>
2219 <key>const</key>
2220 <value>pid1_setpoint</value>
2221 </param>
2222 <param>
2223 <key>device</key>
2224 <value>/dev/pid1_setpoint</value>
2225 </param>
2226 <param>
2227 <key>_enabled</key>
2228 <value>True</value>
2229 </param>
2230 <param>
2231 <key>_coordinate</key>
2232 <value>(280, 2156)</value>
2233 </param>
2234 <param>
2235 <key>_rotation</key>
2236 <value>0</value>
2237 </param>
2238 <param>
2239 <key>id</key>
2240 <value>add_const_set_offset_0_0_0_1</value>
2241 </param>
2242 <param>
2243 <key>port</key>
2244 <value>port</value>
2245 </param>
2246 </block>
2247 <block>
2248 <key>add_const_set_offset</key>
2249 <param>
2250 <key>addr</key>
2251 <value>addr</value>
2252 </param>
2253 <param>
2254 <key>alias</key>
2255 <value></value>
2256 </param>
2257 <param>
2258 <key>comment</key>
2259 <value></value>
2260 </param>
2261 <param>
2262 <key>const</key>
2263 <value>pid1_kp</value>
2264 </param>
2265 <param>
2266 <key>device</key>
2267 <value>/dev/pid1_kp</value>
2268 </param>
2269 <param>
2270 <key>_enabled</key>
2271 <value>True</value>
2272 </param>
2273 <param>
2274 <key>_coordinate</key>
2275 <value>(280, 1444)</value>
2276 </param>
2277 <param>
2278 <key>_rotation</key>
2279 <value>0</value>
2280 </param>
2281 <param>
2282 <key>id</key>
2283 <value>add_const_set_offset_0_0_0_1_0</value>
2284 </param>
2285 <param>
2286 <key>port</key>
2287 <value>port</value>
2288 </param>
2289 </block>
2290 <block>
2291 <key>add_const_set_offset</key>
2292 <param>
2293 <key>addr</key>
2294 <value>addr</value>
2295 </param>
2296 <param>
2297 <key>alias</key>
2298 <value></value>
2299 </param>
2300 <param>
2301 <key>comment</key>
2302 <value></value>
2303 </param>
2304 <param>
2305 <key>const</key>
2306 <value>pid1_ki</value>
2307 </param>
2308 <param>
2309 <key>device</key>
2310 <value>/dev/pid1_ki</value>
2311 </param>
2312 <param>
2313 <key>_enabled</key>
2314 <value>True</value>
2315 </param>
2316 <param>
2317 <key>_coordinate</key>
2318 <value>(280, 1676)</value>
2319 </param>
2320 <param>
2321 <key>_rotation</key>
2322 <value>0</value>
2323 </param>
2324 <param>
2325 <key>id</key>
2326 <value>add_const_set_offset_0_0_0_1_0_0</value>
2327 </param>
2328 <param>
2329 <key>port</key>
2330 <value>port</value>
2331 </param>
2332 </block>
2333 <block>
2334 <key>add_const_set_offset</key>
2335 <param>
2336 <key>addr</key>
2337 <value>addr</value>
2338 </param>
2339 <param>
2340 <key>alias</key>
2341 <value></value>
2342 </param>
2343 <param>
2344 <key>comment</key>
2345 <value></value>
2346 </param>
2347 <param>
2348 <key>const</key>
2349 <value>pid1_kd</value>
2350 </param>
2351 <param>
2352 <key>device</key>
2353 <value>/dev/pid1_kd</value>
2354 </param>
2355 <param>
2356 <key>_enabled</key>
2357 <value>True</value>
2358 </param>
2359 <param>
2360 <key>_coordinate</key>
2361 <value>(280, 1916)</value>
2362 </param>
2363 <param>
2364 <key>_rotation</key>
2365 <value>0</value>
2366 </param>
2367 <param>
2368 <key>id</key>
2369 <value>add_const_set_offset_0_0_0_1_0_0_0</value>
2370 </param>
2371 <param>
2372 <key>port</key>
2373 <value>port</value>
2374 </param>
2375 </block>
2376 <block>
2377 <key>add_const_set_offset</key>
2378 <param>
2379 <key>addr</key>
2380 <value>addr</value>
2381 </param>
2382 <param>
2383 <key>alias</key>
2384 <value></value>
2385 </param>
2386 <param>
2387 <key>comment</key>
2388 <value></value>
2389 </param>
2390 <param>
2391 <key>const</key>
2392 <value>pid1_sign</value>
2393 </param>
2394 <param>
2395 <key>device</key>
2396 <value>/dev/pid1_sign</value>
2397 </param>
2398 <param>
2399 <key>_enabled</key>
2400 <value>True</value>
2401 </param>
2402 <param>
2403 <key>_coordinate</key>
2404 <value>(280, 2380)</value>
2405 </param>
2406 <param>
2407 <key>_rotation</key>
2408 <value>0</value>
2409 </param>
2410 <param>
2411 <key>id</key>
2412 <value>add_const_set_offset_0_0_0_1_0_0_0_0</value>
2413 </param>
2414 <param>
2415 <key>port</key>
2416 <value>port</value>
2417 </param>
2418 </block>
2419 <block>
2420 <key>add_const_set_offset</key>
2421 <param>
2422 <key>addr</key>
2423 <value>addr</value>
2424 </param>
2425 <param>
2426 <key>alias</key>
2427 <value></value>
2428 </param>
2429 <param>
2430 <key>comment</key>
2431 <value></value>
2432 </param>
2433 <param>
2434 <key>const</key>
2435 <value>pid1_rst_int</value>
2436 </param>
2437 <param>
2438 <key>device</key>
2439 <value>/dev/pid1_rst_int</value>
2440 </param>
2441 <param>
2442 <key>_enabled</key>
2443 <value>True</value>
2444 </param>
2445 <param>
2446 <key>_coordinate</key>
2447 <value>(280, 2604)</value>
2448 </param>
2449 <param>
2450 <key>_rotation</key>
2451 <value>0</value>
2452 </param>
2453 <param>
2454 <key>id</key>
2455 <value>add_const_set_offset_0_0_0_1_0_0_0_0_0</value>
2456 </param>
2457 <param>
2458 <key>port</key>
2459 <value>port</value>
2460 </param>
2461 </block>
2462 <block>
2463 <key>add_const_set_offset</key>
2464 <param>
2465 <key>addr</key>
2466 <value>addr</value>
2467 </param>
2468 <param>
2469 <key>alias</key>
2470 <value></value>
2471 </param>
2472 <param>
2473 <key>comment</key>
2474 <value></value>
2475 </param>
2476 <param>
2477 <key>const</key>
2478 <value>pid2_rst_int</value>
2479 </param>
2480 <param>
2481 <key>device</key>
2482 <value>/dev/pid2_rst_int</value>
2483 </param>
2484 <param>
2485 <key>_enabled</key>
2486 <value>True</value>
2487 </param>
2488 <param>
2489 <key>_coordinate</key>
2490 <value>(624, 2604)</value>
2491 </param>
2492 <param>
2493 <key>_rotation</key>
2494 <value>0</value>
2495 </param>
2496 <param>
2497 <key>id</key>
2498 <value>add_const_set_offset_0_0_0_1_0_0_0_0_0_0</value>
2499 </param>
2500 <param>
2501 <key>port</key>
2502 <value>port</value>
2503 </param>
2504 </block>
2505 <block>
2506 <key>add_const_set_offset</key>
2507 <param>
2508 <key>addr</key>
2509 <value>addr</value>
2510 </param>
2511 <param>
2512 <key>alias</key>
2513 <value></value>
2514 </param>
2515 <param>
2516 <key>comment</key>
2517 <value></value>
2518 </param>
2519 <param>
2520 <key>const</key>
2521 <value>pid2_sign</value>
2522 </param>
2523 <param>
2524 <key>device</key>
2525 <value>/dev/pid2_sign</value>
2526 </param>
2527 <param>
2528 <key>_enabled</key>
2529 <value>True</value>
2530 </param>
2531 <param>
2532 <key>_coordinate</key>
2533 <value>(624, 2380)</value>
2534 </param>
2535 <param>
2536 <key>_rotation</key>
2537 <value>0</value>
2538 </param>
2539 <param>
2540 <key>id</key>
2541 <value>add_const_set_offset_0_0_0_1_0_0_0_0_1</value>
2542 </param>
2543 <param>
2544 <key>port</key>
2545 <value>port</value>
2546 </param>
2547 </block>
2548 <block>
2549 <key>add_const_set_offset</key>
2550 <param>
2551 <key>addr</key>
2552 <value>addr</value>
2553 </param>
2554 <param>
2555 <key>alias</key>
2556 <value></value>
2557 </param>
2558 <param>
2559 <key>comment</key>
2560 <value></value>
2561 </param>
2562 <param>
2563 <key>const</key>
2564 <value>pid2_kd</value>
2565 </param>
2566 <param>
2567 <key>device</key>
2568 <value>/dev/pid2_kd</value>
2569 </param>
2570 <param>
2571 <key>_enabled</key>
2572 <value>True</value>
2573 </param>
2574 <param>
2575 <key>_coordinate</key>
2576 <value>(624, 1916)</value>
2577 </param>
2578 <param>
2579 <key>_rotation</key>
2580 <value>0</value>
2581 </param>
2582 <param>
2583 <key>id</key>
2584 <value>add_const_set_offset_0_0_0_1_0_0_0_1</value>
2585 </param>
2586 <param>
2587 <key>port</key>
2588 <value>port</value>
2589 </param>
2590 </block>
2591 <block>
2592 <key>add_const_set_offset</key>
2593 <param>
2594 <key>addr</key>
2595 <value>addr</value>
2596 </param>
2597 <param>
2598 <key>alias</key>
2599 <value></value>
2600 </param>
2601 <param>
2602 <key>comment</key>
2603 <value></value>
2604 </param>
2605 <param>
2606 <key>const</key>
2607 <value>pid2_ki</value>
2608 </param>
2609 <param>
2610 <key>device</key>
2611 <value>/dev/pid2_ki</value>
2612 </param>
2613 <param>
2614 <key>_enabled</key>
2615 <value>True</value>
2616 </param>
2617 <param>
2618 <key>_coordinate</key>
2619 <value>(624, 1676)</value>
2620 </param>
2621 <param>
2622 <key>_rotation</key>
2623 <value>0</value>
2624 </param>
2625 <param>
2626 <key>id</key>
2627 <value>add_const_set_offset_0_0_0_1_0_0_1</value>
2628 </param>
2629 <param>
2630 <key>port</key>
2631 <value>port</value>
2632 </param>
2633 </block>
2634 <block>
2635 <key>add_const_set_offset</key>
2636 <param>
2637 <key>addr</key>
2638 <value>addr</value>
2639 </param>
2640 <param>
2641 <key>alias</key>
2642 <value></value>
2643 </param>
2644 <param>
2645 <key>comment</key>
2646 <value></value>
2647 </param>
2648 <param>
2649 <key>const</key>
2650 <value>pid2_kp</value>
2651 </param>
2652 <param>
2653 <key>device</key>
2654 <value>/dev/pid2_kp</value>
2655 </param>
2656 <param>
2657 <key>_enabled</key>
2658 <value>True</value>
2659 </param>
2660 <param>
2661 <key>_coordinate</key>
2662 <value>(624, 1444)</value>
2663 </param>
2664 <param>
2665 <key>_rotation</key>
2666 <value>0</value>
2667 </param>
2668 <param>
2669 <key>id</key>
2670 <value>add_const_set_offset_0_0_0_1_0_1</value>
2671 </param>
2672 <param>
2673 <key>port</key>
2674 <value>port</value>
2675 </param>
2676 </block>
2677 <block>
2678 <key>add_const_set_offset</key>
2679 <param>
2680 <key>addr</key>
2681 <value>addr</value>
2682 </param>
2683 <param>
2684 <key>alias</key>
2685 <value></value>
2686 </param>
2687 <param>
2688 <key>comment</key>
2689 <value></value>
2690 </param>
2691 <param>
2692 <key>const</key>
2693 <value>pid2_setpoint</value>
2694 </param>
2695 <param>
2696 <key>device</key>
2697 <value>/dev/pid2_setpoint</value>
2698 </param>
2699 <param>
2700 <key>_enabled</key>
2701 <value>True</value>
2702 </param>
2703 <param>
2704 <key>_coordinate</key>
2705 <value>(624, 2156)</value>
2706 </param>
2707 <param>
2708 <key>_rotation</key>
2709 <value>0</value>
2710 </param>
2711 <param>
2712 <key>id</key>
2713 <value>add_const_set_offset_0_0_0_1_1</value>
2714 </param>
2715 <param>
2716 <key>port</key>
2717 <value>port</value>
2718 </param>
2719 </block>
2720 <block>
2721 <key>nco_counter_send_conf</key>
2722 <param>
2723 <key>acc_size</key>
2724 <value>32</value>
2725 </param>
2726 <param>
2727 <key>addr</key>
2728 <value>addr</value>
2729 </param>
2730 <param>
2731 <key>alias</key>
2732 <value></value>
2733 </param>
2734 <param>
2735 <key>comment</key>
2736 <value></value>
2737 </param>
2738 <param>
2739 <key>device</key>
2740 <value>/dev/dds1_nco</value>
2741 </param>
2742 <param>
2743 <key>_enabled</key>
2744 <value>True</value>
2745 </param>
2746 <param>
2747 <key>freq_dds</key>
2748 <value>dds1_nco</value>
2749 </param>
2750 <param>
2751 <key>freq_ref</key>
2752 <value>125000000</value>
2753 </param>
2754 <param>
2755 <key>_coordinate</key>
2756 <value>(280, 400)</value>
2757 </param>
2758 <param>
2759 <key>_rotation</key>
2760 <value>0</value>
2761 </param>
2762 <param>
2763 <key>id</key>
2764 <value>nco_counter_send_conf_0</value>
2765 </param>
2766 <param>
2767 <key>offset</key>
2768 <value>0</value>
2769 </param>
2770 <param>
2771 <key>pinc_sw</key>
2772 <value>dds1_pinc_sw</value>
2773 </param>
2774 <param>
2775 <key>poff_sw</key>
2776 <value>dds1_poff_sw</value>
2777 </param>
2778 <param>
2779 <key>port</key>
2780 <value>port</value>
2781 </param>
2782 </block>
2783 <block>
2784 <key>nco_counter_send_conf</key>
2785 <param>
2786 <key>acc_size</key>
2787 <value>32</value>
2788 </param>
2789 <param>
2790 <key>addr</key>
2791 <value>addr</value>
2792 </param>
2793 <param>
2794 <key>alias</key>
2795 <value></value>
2796 </param>
2797 <param>
2798 <key>comment</key>
2799 <value></value>
2800 </param>
2801 <param>
2802 <key>device</key>
2803 <value>/dev/dds2_nco</value>
2804 </param>
2805 <param>
2806 <key>_enabled</key>
2807 <value>True</value>
2808 </param>
2809 <param>
2810 <key>freq_dds</key>
2811 <value>dds2_nco</value>
2812 </param>
2813 <param>
2814 <key>freq_ref</key>
2815 <value>125000000</value>
2816 </param>
2817 <param>
2818 <key>_coordinate</key>
2819 <value>(624, 400)</value>
2820 </param>
2821 <param>
2822 <key>_rotation</key>
2823 <value>0</value>
2824 </param>
2825 <param>
2826 <key>id</key>
2827 <value>nco_counter_send_conf_0_0</value>
2828 </param>
2829 <param>
2830 <key>offset</key>
2831 <value>0</value>
2832 </param>
2833 <param>
2834 <key>pinc_sw</key>
2835 <value>dds2_pinc_sw</value>
2836 </param>
2837 <param>
2838 <key>poff_sw</key>
2839 <value>dds2_poff_sw</value>
2840 </param>
2841 <param>
2842 <key>port</key>
2843 <value>port</value>
2844 </param>
2845 </block>
2846 </flow_graph>
redpitaya/client/double_pid_vco.py
File was created 1 #!/usr/bin/env python2
2 # -*- coding: utf-8 -*-
3 ##################################################
4 # GNU Radio Python Flow Graph
5 # Title: Double Pid Vco
6 # Generated: Fri Apr 21 14:54:08 2017
7 ##################################################
8
9 if __name__ == '__main__':
10 import ctypes
11 import sys
12 if sys.platform.startswith('linux'):
13 try:
14 x11 = ctypes.cdll.LoadLibrary('libX11.so')
15 x11.XInitThreads()
16 except:
17 print "Warning: failed to XInitThreads()"
18
19 from PyQt4 import Qt
20 from gnuradio import eng_notation
21 from gnuradio import gr
22 from gnuradio.eng_option import eng_option
23 from gnuradio.filter import firdes
24 from gnuradio.qtgui import Range, RangeWidget
25 from optparse import OptionParser
26 import redpitaya_gnuradio
27 import sys
28
29
30 class double_pid_vco(gr.top_block, Qt.QWidget):
31
32 def __init__(self):
33 gr.top_block.__init__(self, "Double Pid Vco")
34 Qt.QWidget.__init__(self)
35 self.setWindowTitle("Double Pid Vco")
36 try:
37 self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
38 except:
39 pass
40 self.top_scroll_layout = Qt.QVBoxLayout()
41 self.setLayout(self.top_scroll_layout)
42 self.top_scroll = Qt.QScrollArea()
43 self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
44 self.top_scroll_layout.addWidget(self.top_scroll)
45 self.top_scroll.setWidgetResizable(True)
46 self.top_widget = Qt.QWidget()
47 self.top_scroll.setWidget(self.top_widget)
48 self.top_layout = Qt.QVBoxLayout(self.top_widget)
49 self.top_grid_layout = Qt.QGridLayout()
50 self.top_layout.addLayout(self.top_grid_layout)
51
52 self.settings = Qt.QSettings("GNU Radio", "double_pid_vco")
53 self.restoreGeometry(self.settings.value("geometry").toByteArray())
54
55 ##################################################
56 # Variables
57 ##################################################
58 self.port = port = 1001
59 self.pid2_sign = pid2_sign = 0
60 self.pid2_setpoint = pid2_setpoint = 0
61 self.pid2_rst_int = pid2_rst_int = 0
62 self.pid2_kp = pid2_kp = 0
63 self.pid2_ki = pid2_ki = 0
64 self.pid2_kd = pid2_kd = 0
65 self.pid1_sign = pid1_sign = 0
66 self.pid1_setpoint = pid1_setpoint = 0
67 self.pid1_rst_int = pid1_rst_int = 0
68 self.pid1_kp = pid1_kp = 0
69 self.pid1_ki = pid1_ki = 0
70 self.pid1_kd = pid1_kd = 0
71 self.dds2_range = dds2_range = 0
72 self.dds2_poff_sw = dds2_poff_sw = 1
73 self.dds2_pinc_sw = dds2_pinc_sw = 1
74 self.dds2_offset = dds2_offset = 0
75 self.dds2_nco = dds2_nco = 40750000
76 self.dds2_f0 = dds2_f0 = 40750000
77 self.dds2_ampl = dds2_ampl = 0
78 self.dds1_range = dds1_range = 0
79 self.dds1_poff_sw = dds1_poff_sw = 1
80 self.dds1_pinc_sw = dds1_pinc_sw = 1
81 self.dds1_offset = dds1_offset = 0
82 self.dds1_nco = dds1_nco = 39500000
83 self.dds1_f0 = dds1_f0 = 39500000
84 self.dds1_ampl = dds1_ampl = 0
85 self.addr = addr = "192.168.0.203"
86 self.adc2_offset = adc2_offset = 0
87 self.adc1_offset = adc1_offset = 0
88
89 ##################################################
90 # Blocks
91 ##################################################
92 _pid2_sign_check_box = Qt.QCheckBox('pid2_sign')
93 self._pid2_sign_choices = {True: 1, False: 0}
94 self._pid2_sign_choices_inv = dict((v,k) for k,v in self._pid2_sign_choices.iteritems())
95 self._pid2_sign_callback = lambda i: Qt.QMetaObject.invokeMethod(_pid2_sign_check_box, "setChecked", Qt.Q_ARG("bool", self._pid2_sign_choices_inv[i]))
96 self._pid2_sign_callback(self.pid2_sign)
97 _pid2_sign_check_box.stateChanged.connect(lambda i: self.set_pid2_sign(self._pid2_sign_choices[bool(i)]))
98 self.top_grid_layout.addWidget(_pid2_sign_check_box, 10,1)
99 self._pid2_setpoint_range = Range(-2**13, 2**13-1, 1, 0, 200)
100 self._pid2_setpoint_win = RangeWidget(self._pid2_setpoint_range, self.set_pid2_setpoint, 'pid2_setpoint', "counter_slider", int)
101 self.top_grid_layout.addWidget(self._pid2_setpoint_win, 9,1)
102 _pid2_rst_int_push_button = Qt.QPushButton('pid2_rst_int')
103 self._pid2_rst_int_choices = {'Pressed': 1, 'Released': 0}
104 _pid2_rst_int_push_button.pressed.connect(lambda: self.set_pid2_rst_int(self._pid2_rst_int_choices['Pressed']))
105 _pid2_rst_int_push_button.released.connect(lambda: self.set_pid2_rst_int(self._pid2_rst_int_choices['Released']))
106 self.top_grid_layout.addWidget(_pid2_rst_int_push_button, 11,1)
107 self._pid2_kp_range = Range(0, 2**13-1, 1, 0, 200)
108 self._pid2_kp_win = RangeWidget(self._pid2_kp_range, self.set_pid2_kp, 'pid2_kp', "counter_slider", int)
109 self.top_grid_layout.addWidget(self._pid2_kp_win, 6,1)
110 self._pid2_ki_range = Range(0, 2**13-1, 1, 0, 200)
111 self._pid2_ki_win = RangeWidget(self._pid2_ki_range, self.set_pid2_ki, 'pid2_ki', "counter_slider", int)
112 self.top_grid_layout.addWidget(self._pid2_ki_win, 7,1)
113 self._pid2_kd_range = Range(0, 2**13-1, 1, 0, 200)
114 self._pid2_kd_win = RangeWidget(self._pid2_kd_range, self.set_pid2_kd, 'pid2_kd', "counter_slider", int)
115 self.top_grid_layout.addWidget(self._pid2_kd_win, 8,1)
116 _pid1_sign_check_box = Qt.QCheckBox('pid1_sign')
117 self._pid1_sign_choices = {True: 1, False: 0}
118 self._pid1_sign_choices_inv = dict((v,k) for k,v in self._pid1_sign_choices.iteritems())
119 self._pid1_sign_callback = lambda i: Qt.QMetaObject.invokeMethod(_pid1_sign_check_box, "setChecked", Qt.Q_ARG("bool", self._pid1_sign_choices_inv[i]))
120 self._pid1_sign_callback(self.pid1_sign)
121 _pid1_sign_check_box.stateChanged.connect(lambda i: self.set_pid1_sign(self._pid1_sign_choices[bool(i)]))
122 self.top_grid_layout.addWidget(_pid1_sign_check_box, 10,0)
123 self._pid1_setpoint_range = Range(-2**13, 2**13-1, 1, 0, 200)
124 self._pid1_setpoint_win = RangeWidget(self._pid1_setpoint_range, self.set_pid1_setpoint, 'pid1_setpoint', "counter_slider", int)
125 self.top_grid_layout.addWidget(self._pid1_setpoint_win, 9,0)
126 _pid1_rst_int_push_button = Qt.QPushButton('pid1_rst_int')
127 self._pid1_rst_int_choices = {'Pressed': 1, 'Released': 0}
128 _pid1_rst_int_push_button.pressed.connect(lambda: self.set_pid1_rst_int(self._pid1_rst_int_choices['Pressed']))
129 _pid1_rst_int_push_button.released.connect(lambda: self.set_pid1_rst_int(self._pid1_rst_int_choices['Released']))
130 self.top_grid_layout.addWidget(_pid1_rst_int_push_button, 11,0)
131 self._pid1_kp_range = Range(0, 2**13-1, 1, 0, 200)
132 self._pid1_kp_win = RangeWidget(self._pid1_kp_range, self.set_pid1_kp, 'pid1_kp', "counter_slider", int)
133 self.top_grid_layout.addWidget(self._pid1_kp_win, 6,0)
134 self._pid1_ki_range = Range(0, 2**13-1, 1, 0, 200)
135 self._pid1_ki_win = RangeWidget(self._pid1_ki_range, self.set_pid1_ki, 'pid1_ki', "counter_slider", int)
136 self.top_grid_layout.addWidget(self._pid1_ki_win, 7,0)
137 self._pid1_kd_range = Range(0, 2**13-1, 1, 0, 200)
138 self._pid1_kd_win = RangeWidget(self._pid1_kd_range, self.set_pid1_kd, 'pid1_kd', "counter_slider", int)
139 self.top_grid_layout.addWidget(self._pid1_kd_win, 8,0)
140 self._dds2_range_range = Range(-2**13, 2**13-1, 1, 0, 200)
141 self._dds2_range_win = RangeWidget(self._dds2_range_range, self.set_dds2_range, 'dds2_range', "counter_slider", int)
142 self.top_grid_layout.addWidget(self._dds2_range_win, 13,1)
143 _dds2_poff_sw_check_box = Qt.QCheckBox('dds2_poff_sw')
144 self._dds2_poff_sw_choices = {True: 1, False: 0}
145 self._dds2_poff_sw_choices_inv = dict((v,k) for k,v in self._dds2_poff_sw_choices.iteritems())
146 self._dds2_poff_sw_callback = lambda i: Qt.QMetaObject.invokeMethod(_dds2_poff_sw_check_box, "setChecked", Qt.Q_ARG("bool", self._dds2_poff_sw_choices_inv[i]))
147 self._dds2_poff_sw_callback(self.dds2_poff_sw)
148 _dds2_poff_sw_check_box.stateChanged.connect(lambda i: self.set_dds2_poff_sw(self._dds2_poff_sw_choices[bool(i)]))
149 self.top_grid_layout.addWidget(_dds2_poff_sw_check_box, 2, 1)
150 _dds2_pinc_sw_check_box = Qt.QCheckBox('dds2_pinc_sw')
151 self._dds2_pinc_sw_choices = {True: 1, False: 0}
152 self._dds2_pinc_sw_choices_inv = dict((v,k) for k,v in self._dds2_pinc_sw_choices.iteritems())
153 self._dds2_pinc_sw_callback = lambda i: Qt.QMetaObject.invokeMethod(_dds2_pinc_sw_check_box, "setChecked", Qt.Q_ARG("bool", self._dds2_pinc_sw_choices_inv[i]))
154 self._dds2_pinc_sw_callback(self.dds2_pinc_sw)
155 _dds2_pinc_sw_check_box.stateChanged.connect(lambda i: self.set_dds2_pinc_sw(self._dds2_pinc_sw_choices[bool(i)]))
156 self.top_grid_layout.addWidget(_dds2_pinc_sw_check_box, 1,1)
157 self._dds2_offset_range = Range(-2**13, 2**13-1, 1, 0, 200)
158 self._dds2_offset_win = RangeWidget(self._dds2_offset_range, self.set_dds2_offset, 'dds2_offset', "counter_slider", int)
159 self.top_grid_layout.addWidget(self._dds2_offset_win, 4,1)
160 self._dds2_nco_range = Range(0, 60000000, 1, 40750000, 200)
161 self._dds2_nco_win = RangeWidget(self._dds2_nco_range, self.set_dds2_nco, 'dds2_nco', "counter_slider", int)
162 self.top_grid_layout.addWidget(self._dds2_nco_win, 0,1)
163 self._dds2_f0_range = Range(0, 60000000, 1, 40750000, 200)
164 self._dds2_f0_win = RangeWidget(self._dds2_f0_range, self.set_dds2_f0, 'dds2_f0', "counter_slider", int)
165 self.top_grid_layout.addWidget(self._dds2_f0_win, 12,1)
166 self._dds2_ampl_range = Range(0, 2**13-1, 1, 0, 200)
167 self._dds2_ampl_win = RangeWidget(self._dds2_ampl_range, self.set_dds2_ampl, 'dds2_ampl', "counter_slider", int)
168 self.top_grid_layout.addWidget(self._dds2_ampl_win, 3,1)
169 self._dds1_range_range = Range(-2**13, 2**13-1, 1, 0, 200)
170 self._dds1_range_win = RangeWidget(self._dds1_range_range, self.set_dds1_range, 'dds1_range', "counter_slider", int)
171 self.top_grid_layout.addWidget(self._dds1_range_win, 13,0)
172 _dds1_poff_sw_check_box = Qt.QCheckBox('dds1_poff_sw')
173 self._dds1_poff_sw_choices = {True: 1, False: 0}
174 self._dds1_poff_sw_choices_inv = dict((v,k) for k,v in self._dds1_poff_sw_choices.iteritems())
175 self._dds1_poff_sw_callback = lambda i: Qt.QMetaObject.invokeMethod(_dds1_poff_sw_check_box, "setChecked", Qt.Q_ARG("bool", self._dds1_poff_sw_choices_inv[i]))
176 self._dds1_poff_sw_callback(self.dds1_poff_sw)
177 _dds1_poff_sw_check_box.stateChanged.connect(lambda i: self.set_dds1_poff_sw(self._dds1_poff_sw_choices[bool(i)]))
178 self.top_grid_layout.addWidget(_dds1_poff_sw_check_box, 2, 0)
179 _dds1_pinc_sw_check_box = Qt.QCheckBox('dds1_pinc_sw')
180 self._dds1_pinc_sw_choices = {True: 1, False: 0}
181 self._dds1_pinc_sw_choices_inv = dict((v,k) for k,v in self._dds1_pinc_sw_choices.iteritems())
182 self._dds1_pinc_sw_callback = lambda i: Qt.QMetaObject.invokeMethod(_dds1_pinc_sw_check_box, "setChecked", Qt.Q_ARG("bool", self._dds1_pinc_sw_choices_inv[i]))
183 self._dds1_pinc_sw_callback(self.dds1_pinc_sw)
184 _dds1_pinc_sw_check_box.stateChanged.connect(lambda i: self.set_dds1_pinc_sw(self._dds1_pinc_sw_choices[bool(i)]))
185 self.top_grid_layout.addWidget(_dds1_pinc_sw_check_box, 1,0)
186 self._dds1_offset_range = Range(-2**13, 2**13-1, 1, 0, 200)
187 self._dds1_offset_win = RangeWidget(self._dds1_offset_range, self.set_dds1_offset, 'dds1_offset', "counter_slider", int)
188 self.top_grid_layout.addWidget(self._dds1_offset_win, 4,0)
189 self._dds1_nco_range = Range(0, 60000000, 1, 39500000, 200)
190 self._dds1_nco_win = RangeWidget(self._dds1_nco_range, self.set_dds1_nco, 'dds1_nco', "counter_slider", int)
191 self.top_grid_layout.addWidget(self._dds1_nco_win, 0,0)
192 self._dds1_f0_range = Range(0, 60000000, 1, 39500000, 200)
193 self._dds1_f0_win = RangeWidget(self._dds1_f0_range, self.set_dds1_f0, 'dds1_f0', "counter_slider", int)
194 self.top_grid_layout.addWidget(self._dds1_f0_win, 12,0)
195 self._dds1_ampl_range = Range(0, 2**13-1, 1, 0, 200)
196 self._dds1_ampl_win = RangeWidget(self._dds1_ampl_range, self.set_dds1_ampl, 'dds1_ampl', "counter_slider", int)
197 self.top_grid_layout.addWidget(self._dds1_ampl_win, 3,0)
198 self._adc2_offset_range = Range(-2**13, 2**13-1, 1, 0, 200)
199 self._adc2_offset_win = RangeWidget(self._adc2_offset_range, self.set_adc2_offset, 'adc2_offset', "counter_slider", int)
200 self.top_grid_layout.addWidget(self._adc2_offset_win, 5,1)
201 self._adc1_offset_range = Range(-2**13, 2**13-1, 1, 0, 200)
202 self._adc1_offset_win = RangeWidget(self._adc1_offset_range, self.set_adc1_offset, 'adc1_offset', "counter_slider", int)
203 self.top_grid_layout.addWidget(self._adc1_offset_win, 5,0)
204 self.nco_counter_send_conf_0_0 = redpitaya_gnuradio.nco_counter_send_conf(
205 addr=addr,
206 port=port,
207 device='/dev/dds2_nco',
208 freq_ref=125000000,
209 freq_dds=dds2_nco,
210 acc_size=32,
211 offset=0,
212 pinc_sw=dds2_pinc_sw,
213 poff_sw=dds2_poff_sw,
214 )
215
216 self.nco_counter_send_conf_0 = redpitaya_gnuradio.nco_counter_send_conf(
217 addr=addr,
218 port=port,
219 device='/dev/dds1_nco',
220 freq_ref=125000000,
221 freq_dds=dds1_nco,
222 acc_size=32,
223 offset=0,
224 pinc_sw=dds1_pinc_sw,
225 poff_sw=dds1_poff_sw,
226 )
227
228 self.add_const_set_offset_0_0_0_1_1 = redpitaya_gnuradio.add_const_set_offset(
229 addr=addr,
230 port=port,
231 device='/dev/pid2_setpoint',
232 const=pid2_setpoint,
233 )
234
235 self.add_const_set_offset_0_0_0_1_0_1 = redpitaya_gnuradio.add_const_set_offset(
236 addr=addr,
237 port=port,
238 device='/dev/pid2_kp',
239 const=pid2_kp,
240 )
241
242 self.add_const_set_offset_0_0_0_1_0_0_1 = redpitaya_gnuradio.add_const_set_offset(
243 addr=addr,
244 port=port,
245 device='/dev/pid2_ki',
246 const=pid2_ki,
247 )
248
249 self.add_const_set_offset_0_0_0_1_0_0_0_1 = redpitaya_gnuradio.add_const_set_offset(
250 addr=addr,
251 port=port,
252 device='/dev/pid2_kd',
253 const=pid2_kd,
254 )
255
256 self.add_const_set_offset_0_0_0_1_0_0_0_0_1 = redpitaya_gnuradio.add_const_set_offset(
257 addr=addr,
258 port=port,
259 device='/dev/pid2_sign',
260 const=pid2_sign,
261 )
262
263 self.add_const_set_offset_0_0_0_1_0_0_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
264 addr=addr,
265 port=port,
266 device='/dev/pid2_rst_int',
267 const=pid2_rst_int,
268 )
269
270 self.add_const_set_offset_0_0_0_1_0_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
271 addr=addr,
272 port=port,
273 device='/dev/pid1_rst_int',
274 const=pid1_rst_int,
275 )
276
277 self.add_const_set_offset_0_0_0_1_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
278 addr=addr,
279 port=port,
280 device='/dev/pid1_sign',
281 const=pid1_sign,
282 )
283
284 self.add_const_set_offset_0_0_0_1_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
285 addr=addr,
286 port=port,
287 device='/dev/pid1_kd',
288 const=pid1_kd,
289 )
290
291 self.add_const_set_offset_0_0_0_1_0_0 = redpitaya_gnuradio.add_const_set_offset(
292 addr=addr,
293 port=port,
294 device='/dev/pid1_ki',
295 const=pid1_ki,
296 )
297
298 self.add_const_set_offset_0_0_0_1_0 = redpitaya_gnuradio.add_const_set_offset(
299 addr=addr,
300 port=port,
301 device='/dev/pid1_kp',
302 const=pid1_kp,
303 )
304
305 self.add_const_set_offset_0_0_0_1 = redpitaya_gnuradio.add_const_set_offset(
306 addr=addr,
307 port=port,
308 device='/dev/pid1_setpoint',
309 const=pid1_setpoint,
310 )
311
312 self.add_const_set_offset_0_0_0_0_1_1 = redpitaya_gnuradio.add_const_set_offset(
313 addr=addr,
314 port=port,
315 device='/dev/dds2_offset',
316 const=dds2_offset,
317 )
318
319 self.add_const_set_offset_0_0_0_0_1_0_1 = redpitaya_gnuradio.add_const_set_offset(
320 addr=addr,
321 port=port,
322 device='/dev/dds2_f0',
323 const=int(dds2_f0/(125e6/2**32)),
324 )
325
326 self.add_const_set_offset_0_0_0_0_1_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
327 addr=addr,
328 port=port,
329 device='/dev/dds2_range',
330 const=dds2_range,
331 )
332
333 self.add_const_set_offset_0_0_0_0_1_0_0 = redpitaya_gnuradio.add_const_set_offset(
334 addr=addr,
335 port=port,
336 device='/dev/dds1_range',
337 const=dds1_range,
338 )
339
340 self.add_const_set_offset_0_0_0_0_1_0 = redpitaya_gnuradio.add_const_set_offset(
341 addr=addr,
342 port=port,
343 device='/dev/dds1_f0',
344 const=int(dds1_f0/(125e6/2**32)),
345 )
346
347 self.add_const_set_offset_0_0_0_0_1 = redpitaya_gnuradio.add_const_set_offset(
348 addr=addr,
349 port=port,
350 device='/dev/dds1_offset',
351 const=dds1_offset,
352 )
353
354 self.add_const_set_offset_0_0_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
355 addr=addr,
356 port=port,
357 device='/dev/dds2_ampl',
358 const=dds2_ampl,
359 )
360
361 self.add_const_set_offset_0_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
362 addr=addr,
363 port=port,
364 device='/dev/dds1_ampl',
365 const=dds1_ampl,
366 )
367
368 self.add_const_set_offset_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
369 addr=addr,
370 port=port,
371 device='/dev/adc2_offset',
372 const=adc2_offset,
373 )
374
375 self.add_const_set_offset_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
376 addr=addr,
377 port=port,
378 device='/dev/adc1_offset',
379 const=adc1_offset,
380 )
381
382
383 def closeEvent(self, event):
384 self.settings = Qt.QSettings("GNU Radio", "double_pid_vco")
385 self.settings.setValue("geometry", self.saveGeometry())
386 event.accept()
387
388 def get_port(self):
389 return self.port
390
391 def set_port(self, port):
392 self.port = port
393
394 def get_pid2_sign(self):
395 return self.pid2_sign
396
397 def set_pid2_sign(self, pid2_sign):
398 self.pid2_sign = pid2_sign
399 self._pid2_sign_callback(self.pid2_sign)
400 self.add_const_set_offset_0_0_0_1_0_0_0_0_1.set_const(device='/dev/pid2_sign', const=self.pid2_sign)
401
402 def get_pid2_setpoint(self):
403 return self.pid2_setpoint
404
405 def set_pid2_setpoint(self, pid2_setpoint):
406 self.pid2_setpoint = pid2_setpoint
407 self.add_const_set_offset_0_0_0_1_1.set_const(device='/dev/pid2_setpoint', const=self.pid2_setpoint)
408
409 def get_pid2_rst_int(self):
410 return self.pid2_rst_int
411
412 def set_pid2_rst_int(self, pid2_rst_int):
413 self.pid2_rst_int = pid2_rst_int
414 self.add_const_set_offset_0_0_0_1_0_0_0_0_0_0.set_const(device='/dev/pid2_rst_int', const=self.pid2_rst_int)
415
416 def get_pid2_kp(self):
417 return self.pid2_kp
418
419 def set_pid2_kp(self, pid2_kp):
420 self.pid2_kp = pid2_kp
421 self.add_const_set_offset_0_0_0_1_0_1.set_const(device='/dev/pid2_kp', const=self.pid2_kp)
422
423 def get_pid2_ki(self):
424 return self.pid2_ki
425
426 def set_pid2_ki(self, pid2_ki):
427 self.pid2_ki = pid2_ki
428 self.add_const_set_offset_0_0_0_1_0_0_1.set_const(device='/dev/pid2_ki', const=self.pid2_ki)
429
430 def get_pid2_kd(self):
431 return self.pid2_kd
432
433 def set_pid2_kd(self, pid2_kd):
434 self.pid2_kd = pid2_kd
435 self.add_const_set_offset_0_0_0_1_0_0_0_1.set_const(device='/dev/pid2_kd', const=self.pid2_kd)
436
437 def get_pid1_sign(self):
438 return self.pid1_sign
439
440 def set_pid1_sign(self, pid1_sign):
441 self.pid1_sign = pid1_sign
442 self._pid1_sign_callback(self.pid1_sign)
443 self.add_const_set_offset_0_0_0_1_0_0_0_0.set_const(device='/dev/pid1_sign', const=self.pid1_sign)
444
445 def get_pid1_setpoint(self):
446 return self.pid1_setpoint
447
448 def set_pid1_setpoint(self, pid1_setpoint):
449 self.pid1_setpoint = pid1_setpoint
450 self.add_const_set_offset_0_0_0_1.set_const(device='/dev/pid1_setpoint', const=self.pid1_setpoint)
451
452 def get_pid1_rst_int(self):
453 return self.pid1_rst_int
454
455 def set_pid1_rst_int(self, pid1_rst_int):
456 self.pid1_rst_int = pid1_rst_int
457 self.add_const_set_offset_0_0_0_1_0_0_0_0_0.set_const(device='/dev/pid1_rst_int', const=self.pid1_rst_int)
458
459 def get_pid1_kp(self):
460 return self.pid1_kp
461
462 def set_pid1_kp(self, pid1_kp):
463 self.pid1_kp = pid1_kp
464 self.add_const_set_offset_0_0_0_1_0.set_const(device='/dev/pid1_kp', const=self.pid1_kp)
465
466 def get_pid1_ki(self):
467 return self.pid1_ki
468
469 def set_pid1_ki(self, pid1_ki):
470 self.pid1_ki = pid1_ki
471 self.add_const_set_offset_0_0_0_1_0_0.set_const(device='/dev/pid1_ki', const=self.pid1_ki)
472
473 def get_pid1_kd(self):
474 return self.pid1_kd
475
476 def set_pid1_kd(self, pid1_kd):
477 self.pid1_kd = pid1_kd
478 self.add_const_set_offset_0_0_0_1_0_0_0.set_const(device='/dev/pid1_kd', const=self.pid1_kd)
479
480 def get_dds2_range(self):
481 return self.dds2_range
482
483 def set_dds2_range(self, dds2_range):
484 self.dds2_range = dds2_range
485 self.add_const_set_offset_0_0_0_0_1_0_0_0.set_const(device='/dev/dds2_range', const=self.dds2_range)
486
487 def get_dds2_poff_sw(self):
488 return self.dds2_poff_sw
489
490 def set_dds2_poff_sw(self, dds2_poff_sw):
491 self.dds2_poff_sw = dds2_poff_sw
492 self._dds2_poff_sw_callback(self.dds2_poff_sw)
493 self.nco_counter_send_conf_0_0.set_nco(device='/dev/dds2_nco', freq_ref=125000000, freq_dds=self.dds2_nco, acc_size=32, offset=0, pinc_sw=self.dds2_pinc_sw, poff_sw=self.dds2_poff_sw)
494
495 def get_dds2_pinc_sw(self):
496 return self.dds2_pinc_sw
497
498 def set_dds2_pinc_sw(self, dds2_pinc_sw):
499 self.dds2_pinc_sw = dds2_pinc_sw
500 self._dds2_pinc_sw_callback(self.dds2_pinc_sw)
501 self.nco_counter_send_conf_0_0.set_nco(device='/dev/dds2_nco', freq_ref=125000000, freq_dds=self.dds2_nco, acc_size=32, offset=0, pinc_sw=self.dds2_pinc_sw, poff_sw=self.dds2_poff_sw)
502
503 def get_dds2_offset(self):
504 return self.dds2_offset
505
506 def set_dds2_offset(self, dds2_offset):
507 self.dds2_offset = dds2_offset
508 self.add_const_set_offset_0_0_0_0_1_1.set_const(device='/dev/dds2_offset', const=self.dds2_offset)
509
510 def get_dds2_nco(self):
511 return self.dds2_nco
512
513 def set_dds2_nco(self, dds2_nco):
514 self.dds2_nco = dds2_nco
515 self.nco_counter_send_conf_0_0.set_nco(device='/dev/dds2_nco', freq_ref=125000000, freq_dds=self.dds2_nco, acc_size=32, offset=0, pinc_sw=self.dds2_pinc_sw, poff_sw=self.dds2_poff_sw)
516
517 def get_dds2_f0(self):
518 return self.dds2_f0
519
520 def set_dds2_f0(self, dds2_f0):
521 self.dds2_f0 = dds2_f0
522 self.add_const_set_offset_0_0_0_0_1_0_1.set_const(device='/dev/dds2_f0', const=int(self.dds2_f0/(125e6/2**32)))
523
redpitaya/client/iq_demod_only.py
#!/usr/bin/env python2 1 1 #!/usr/bin/env python2
# -*- coding: utf-8 -*- 2 2 # -*- coding: utf-8 -*-
################################################## 3 3 ##################################################
# GNU Radio Python Flow Graph 4 4 # GNU Radio Python Flow Graph
# Title: Iq Demod Only 5 5 # Title: Iq Demod Only
# Generated: Thu Apr 20 16:31:50 2017 6 6 # Generated: Fri Apr 21 11:41:10 2017
################################################## 7 7 ##################################################
8 8
if __name__ == '__main__': 9 9 if __name__ == '__main__':
import ctypes 10 10 import ctypes
import sys 11 11 import sys
if sys.platform.startswith('linux'): 12 12 if sys.platform.startswith('linux'):
try: 13 13 try:
x11 = ctypes.cdll.LoadLibrary('libX11.so') 14 14 x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads() 15 15 x11.XInitThreads()
except: 16 16 except:
print "Warning: failed to XInitThreads()" 17 17 print "Warning: failed to XInitThreads()"
18 18
from PyQt4 import Qt 19 19 from PyQt4 import Qt
from gnuradio import eng_notation 20 20 from gnuradio import eng_notation
from gnuradio import gr 21 21 from gnuradio import gr
from gnuradio.eng_option import eng_option 22 22 from gnuradio.eng_option import eng_option
from gnuradio.filter import firdes 23 23 from gnuradio.filter import firdes
from gnuradio.qtgui import Range, RangeWidget 24 24 from gnuradio.qtgui import Range, RangeWidget
from optparse import OptionParser 25 25 from optparse import OptionParser
import redpitaya_gnuradio 26 26 import redpitaya_gnuradio
import sys 27 27 import sys
28 28
29 29
class iq_demod_only(gr.top_block, Qt.QWidget): 30 30 class iq_demod_only(gr.top_block, Qt.QWidget):
31 31
def __init__(self): 32 32 def __init__(self):
gr.top_block.__init__(self, "Iq Demod Only") 33 33 gr.top_block.__init__(self, "Iq Demod Only")
Qt.QWidget.__init__(self) 34 34 Qt.QWidget.__init__(self)
self.setWindowTitle("Iq Demod Only") 35 35 self.setWindowTitle("Iq Demod Only")
try: 36 36 try:
self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) 37 37 self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
except: 38 38 except:
pass 39 39 pass
self.top_scroll_layout = Qt.QVBoxLayout() 40 40 self.top_scroll_layout = Qt.QVBoxLayout()
self.setLayout(self.top_scroll_layout) 41 41 self.setLayout(self.top_scroll_layout)
self.top_scroll = Qt.QScrollArea() 42 42 self.top_scroll = Qt.QScrollArea()
self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) 43 43 self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
self.top_scroll_layout.addWidget(self.top_scroll) 44 44 self.top_scroll_layout.addWidget(self.top_scroll)
self.top_scroll.setWidgetResizable(True) 45 45 self.top_scroll.setWidgetResizable(True)
self.top_widget = Qt.QWidget() 46 46 self.top_widget = Qt.QWidget()
self.top_scroll.setWidget(self.top_widget) 47 47 self.top_scroll.setWidget(self.top_widget)
self.top_layout = Qt.QVBoxLayout(self.top_widget) 48 48 self.top_layout = Qt.QVBoxLayout(self.top_widget)
self.top_grid_layout = Qt.QGridLayout() 49 49 self.top_grid_layout = Qt.QGridLayout()
self.top_layout.addLayout(self.top_grid_layout) 50 50 self.top_layout.addLayout(self.top_grid_layout)
51 51
self.settings = Qt.QSettings("GNU Radio", "iq_demod_only") 52 52 self.settings = Qt.QSettings("GNU Radio", "iq_demod_only")
self.restoreGeometry(self.settings.value("geometry").toByteArray()) 53 53 self.restoreGeometry(self.settings.value("geometry").toByteArray())
54 54
################################################## 55 55 ##################################################
# Variables 56 56 # Variables
################################################## 57 57 ##################################################
self.port = port = 1001 58 58 self.port = port = 1001
self.f_dds = f_dds = 0 59 59 self.f_dds = f_dds = 0
self.demod_f = demod_f = 0 60 60 self.demod_f = demod_f = 0
self.dds_offset = dds_offset = 0 61 61 self.dds_offset = dds_offset = 0
self.dds_ampl = dds_ampl = 0 62 62 self.dds_ampl = dds_ampl = 0
self.addr = addr = "192.168.0.201" 63 63 self.addr = addr = "192.168.0.201"
self.adc1_offset = adc1_offset = 0 64 64 self.adc1_offset = adc1_offset = 0
65 65
################################################## 66 66 ##################################################
# Blocks 67 67 # Blocks
################################################## 68 68 ##################################################
self._f_dds_range = Range(0, 60000000, 1000, 0, 200) 69 69 self._f_dds_range = Range(0, 60000000, 1000, 0, 200)
self._f_dds_win = RangeWidget(self._f_dds_range, self.set_f_dds, 'f_dds', "counter_slider", float) 70 70 self._f_dds_win = RangeWidget(self._f_dds_range, self.set_f_dds, 'f_dds', "counter_slider", float)
self.top_grid_layout.addWidget(self._f_dds_win, 0, 0) 71 71 self.top_grid_layout.addWidget(self._f_dds_win, 0, 0)
self._demod_f_range = Range(0, 60000000, 1000, 0, 200) 72 72 self._demod_f_range = Range(0, 60000000, 1000, 0, 200)
self._demod_f_win = RangeWidget(self._demod_f_range, self.set_demod_f, 'demod_f', "counter_slider", float) 73 73 self._demod_f_win = RangeWidget(self._demod_f_range, self.set_demod_f, 'demod_f', "counter_slider", float)
self.top_grid_layout.addWidget(self._demod_f_win, 1, 1) 74 74 self.top_grid_layout.addWidget(self._demod_f_win, 1, 1)
self._dds_offset_range = Range(-2**13, 2**13-1, 1, 0, 200) 75 75 self._dds_offset_range = Range(-2**13, 2**13-1, 1, 0, 200)
self._dds_offset_win = RangeWidget(self._dds_offset_range, self.set_dds_offset, 'dds_offset', "counter_slider", int) 76 76 self._dds_offset_win = RangeWidget(self._dds_offset_range, self.set_dds_offset, 'dds_offset', "counter_slider", int)
self.top_grid_layout.addWidget(self._dds_offset_win, 2, 0) 77 77 self.top_grid_layout.addWidget(self._dds_offset_win, 2, 0)
self._dds_ampl_range = Range(0, 2**13-1, 1, 0, 200) 78 78 self._dds_ampl_range = Range(0, 2**13-1, 1, 0, 200)
self._dds_ampl_win = RangeWidget(self._dds_ampl_range, self.set_dds_ampl, 'dds_ampl', "counter_slider", int) 79 79 self._dds_ampl_win = RangeWidget(self._dds_ampl_range, self.set_dds_ampl, 'dds_ampl', "counter_slider", int)
self.top_grid_layout.addWidget(self._dds_ampl_win, 1, 0) 80 80 self.top_grid_layout.addWidget(self._dds_ampl_win, 1, 0)
self._adc1_offset_range = Range(-2**13, 2**13-1, 1, 0, 200) 81 81 self._adc1_offset_range = Range(-2**13, 2**13-1, 1, 0, 200)
self._adc1_offset_win = RangeWidget(self._adc1_offset_range, self.set_adc1_offset, 'adc1_offset', "counter_slider", int) 82 82 self._adc1_offset_win = RangeWidget(self._adc1_offset_range, self.set_adc1_offset, 'adc1_offset', "counter_slider", int)
self.top_grid_layout.addWidget(self._adc1_offset_win, 0, 1) 83 83 self.top_grid_layout.addWidget(self._adc1_offset_win, 0, 1)
self.nco_counter_send_conf_0_0 = redpitaya_gnuradio.nco_counter_send_conf( 84 84 self.nco_counter_send_conf_0_0 = redpitaya_gnuradio.nco_counter_send_conf(
addr=addr, 85 85 addr=addr,
port=port, 86 86 port=port,
device='/dev/demod_nco', 87 87 device='/dev/demod_nco',
freq_ref=125000000, 88 88 freq_ref=125000000,
freq_dds=demod_f, 89 89 freq_dds=demod_f,
acc_size=32, 90 90 acc_size=32,
offset=0, 91 91 offset=0,
pinc_sw=1, 92 92 pinc_sw=1,
poff_sw=1, 93 93 poff_sw=1,
) 94 94 )
95 95
self.nco_counter_send_conf_0 = redpitaya_gnuradio.nco_counter_send_conf( 96 96 self.nco_counter_send_conf_0 = redpitaya_gnuradio.nco_counter_send_conf(
addr=addr, 97 97 addr=addr,
port=port, 98 98 port=port,
device='/dev/dds_nco', 99 99 device='/dev/dds_nco',
freq_ref=125000000, 100 100 freq_ref=125000000,
freq_dds=f_dds, 101 101 freq_dds=f_dds,
acc_size=32, 102 102 acc_size=32,
offset=0, 103 103 offset=0,
pinc_sw=1, 104 104 pinc_sw=1,
poff_sw=1, 105 105 poff_sw=1,
) 106 106 )
107 107
self.add_const_set_offset_0_1 = redpitaya_gnuradio.add_const_set_offset( 108 108 self.add_const_set_offset_0_1 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 109 109 addr=addr,
port=port, 110 110 port=port,
device='/dev/adc1_offset', 111 111 device='/dev/adc1_offset',
const=adc1_offset, 112 112 const=adc1_offset,
) 113 113 )
114 114
self.add_const_set_offset_0_0 = redpitaya_gnuradio.add_const_set_offset( 115 115 self.add_const_set_offset_0_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 116 116 addr=addr,
port=port, 117 117 port=port,
device='/dev/dds_ampl', 118 118 device='/dev/dds_ampl',
const=dds_ampl, 119 119 const=dds_ampl,
) 120 120 )
121 121
self.add_const_set_offset_0 = redpitaya_gnuradio.add_const_set_offset( 122 122 self.add_const_set_offset_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 123 123 addr=addr,
port=port, 124 124 port=port,
device='/dev/dds_offset', 125 125 device='/dev/dds_offset',
const=dds_offset, 126 126 const=dds_offset,
) 127 127 )
128 128
129 129
def closeEvent(self, event): 130 130 def closeEvent(self, event):
self.settings = Qt.QSettings("GNU Radio", "iq_demod_only") 131 131 self.settings = Qt.QSettings("GNU Radio", "iq_demod_only")
self.settings.setValue("geometry", self.saveGeometry()) 132 132 self.settings.setValue("geometry", self.saveGeometry())
event.accept() 133 133 event.accept()
134 134
def get_port(self): 135 135 def get_port(self):
return self.port 136 136 return self.port
137 137
def set_port(self, port): 138 138 def set_port(self, port):
self.port = port 139 139 self.port = port
140 140
def get_f_dds(self): 141 141 def get_f_dds(self):
return self.f_dds 142 142 return self.f_dds
143 143
def set_f_dds(self, f_dds): 144 144 def set_f_dds(self, f_dds):
self.f_dds = f_dds 145 145 self.f_dds = f_dds
self.nco_counter_send_conf_0.set_nco(device='/dev/dds_nco', freq_ref=125000000, freq_dds=self.f_dds, acc_size=32, offset=0, pinc_sw=1, poff_sw=1) 146 146 self.nco_counter_send_conf_0.set_nco(device='/dev/dds_nco', freq_ref=125000000, freq_dds=self.f_dds, acc_size=32, offset=0, pinc_sw=1, poff_sw=1)
147 147
def get_demod_f(self): 148 148 def get_demod_f(self):
return self.demod_f 149 149 return self.demod_f
150 150
def set_demod_f(self, demod_f): 151 151 def set_demod_f(self, demod_f):
self.demod_f = demod_f 152 152 self.demod_f = demod_f
self.nco_counter_send_conf_0_0.set_nco(device='/dev/demod_nco', freq_ref=125000000, freq_dds=self.demod_f, acc_size=32, offset=0, pinc_sw=1, poff_sw=1) 153 153 self.nco_counter_send_conf_0_0.set_nco(device='/dev/demod_nco', freq_ref=125000000, freq_dds=self.demod_f, acc_size=32, offset=0, pinc_sw=1, poff_sw=1)
154 154
def get_dds_offset(self): 155 155 def get_dds_offset(self):
return self.dds_offset 156 156 return self.dds_offset
157 157
def set_dds_offset(self, dds_offset): 158 158 def set_dds_offset(self, dds_offset):
self.dds_offset = dds_offset 159 159 self.dds_offset = dds_offset
self.add_const_set_offset_0.set_const(device='/dev/dds_offset', const=self.dds_offset) 160 160 self.add_const_set_offset_0.set_const(device='/dev/dds_offset', const=self.dds_offset)
161 161
def get_dds_ampl(self): 162 162 def get_dds_ampl(self):
return self.dds_ampl 163 163 return self.dds_ampl
164 164
def set_dds_ampl(self, dds_ampl): 165 165 def set_dds_ampl(self, dds_ampl):
self.dds_ampl = dds_ampl 166 166 self.dds_ampl = dds_ampl
self.add_const_set_offset_0_0.set_const(device='/dev/dds_ampl', const=self.dds_ampl) 167 167 self.add_const_set_offset_0_0.set_const(device='/dev/dds_ampl', const=self.dds_ampl)
168 168
def get_addr(self): 169 169 def get_addr(self):
redpitaya/client/pid_vco.py
#!/usr/bin/env python2 1 1 #!/usr/bin/env python2
# -*- coding: utf-8 -*- 2 2 # -*- coding: utf-8 -*-
################################################## 3 3 ##################################################
# GNU Radio Python Flow Graph 4 4 # GNU Radio Python Flow Graph
# Title: Pid Vco 5 5 # Title: Pid Vco
# Generated: Tue Apr 11 15:32:11 2017 6 6 # Generated: Fri Apr 21 12:38:53 2017
################################################## 7 7 ##################################################
8 8
if __name__ == '__main__': 9 9 if __name__ == '__main__':
import ctypes 10 10 import ctypes
import sys 11 11 import sys
if sys.platform.startswith('linux'): 12 12 if sys.platform.startswith('linux'):
try: 13 13 try:
x11 = ctypes.cdll.LoadLibrary('libX11.so') 14 14 x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads() 15 15 x11.XInitThreads()
except: 16 16 except:
print "Warning: failed to XInitThreads()" 17 17 print "Warning: failed to XInitThreads()"
18 18
from PyQt4 import Qt 19 19 from PyQt4 import Qt
from gnuradio import eng_notation 20 20 from gnuradio import eng_notation
from gnuradio import gr 21 21 from gnuradio import gr
from gnuradio.eng_option import eng_option 22 22 from gnuradio.eng_option import eng_option
from gnuradio.filter import firdes 23 23 from gnuradio.filter import firdes
from gnuradio.qtgui import Range, RangeWidget 24 24 from gnuradio.qtgui import Range, RangeWidget
from optparse import OptionParser 25 25 from optparse import OptionParser
import redpitaya_gnuradio 26 26 import redpitaya_gnuradio
import sys 27 27 import sys
28 28
29 29
class pid_vco(gr.top_block, Qt.QWidget): 30 30 class pid_vco(gr.top_block, Qt.QWidget):
31 31
def __init__(self): 32 32 def __init__(self):
gr.top_block.__init__(self, "Pid Vco") 33 33 gr.top_block.__init__(self, "Pid Vco")
Qt.QWidget.__init__(self) 34 34 Qt.QWidget.__init__(self)
self.setWindowTitle("Pid Vco") 35 35 self.setWindowTitle("Pid Vco")
try: 36 36 try:
self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) 37 37 self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
except: 38 38 except:
pass 39 39 pass
self.top_scroll_layout = Qt.QVBoxLayout() 40 40 self.top_scroll_layout = Qt.QVBoxLayout()
self.setLayout(self.top_scroll_layout) 41 41 self.setLayout(self.top_scroll_layout)
self.top_scroll = Qt.QScrollArea() 42 42 self.top_scroll = Qt.QScrollArea()
self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) 43 43 self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
self.top_scroll_layout.addWidget(self.top_scroll) 44 44 self.top_scroll_layout.addWidget(self.top_scroll)
self.top_scroll.setWidgetResizable(True) 45 45 self.top_scroll.setWidgetResizable(True)
self.top_widget = Qt.QWidget() 46 46 self.top_widget = Qt.QWidget()
self.top_scroll.setWidget(self.top_widget) 47 47 self.top_scroll.setWidget(self.top_widget)
self.top_layout = Qt.QVBoxLayout(self.top_widget) 48 48 self.top_layout = Qt.QVBoxLayout(self.top_widget)
self.top_grid_layout = Qt.QGridLayout() 49 49 self.top_grid_layout = Qt.QGridLayout()
self.top_layout.addLayout(self.top_grid_layout) 50 50 self.top_layout.addLayout(self.top_grid_layout)
51 51
self.settings = Qt.QSettings("GNU Radio", "pid_vco") 52 52 self.settings = Qt.QSettings("GNU Radio", "pid_vco")
self.restoreGeometry(self.settings.value("geometry").toByteArray()) 53 53 self.restoreGeometry(self.settings.value("geometry").toByteArray())
54 54
################################################## 55 55 ##################################################
# Variables 56 56 # Variables
################################################## 57 57 ##################################################
self.port = port = 1001 58 58 self.port = port = 1001
self.poff = poff = 0 59 59 self.poff = poff = 0
self.pinc = pinc = 0 60 60 self.pinc = pinc = 0
self.pid_sign = pid_sign = 0 61 61 self.pid_sign = pid_sign = 0
self.pid_setpoint = pid_setpoint = 0 62 62 self.pid_setpoint = pid_setpoint = 0
self.pid_rst_int = pid_rst_int = 0 63 63 self.pid_rst_int = pid_rst_int = 0
self.pid_kp = pid_kp = 0 64 64 self.pid_kp = pid_kp = 0
self.pid_ki = pid_ki = 0 65 65 self.pid_ki = pid_ki = 0
self.pid_kd = pid_kd = 0 66 66 self.pid_kd = pid_kd = 0
self.dds_range = dds_range = 0 67 67 self.dds_range = dds_range = 0
self.dds_offset = dds_offset = 0 68 68 self.dds_offset = dds_offset = 0
self.dds_nco = dds_nco = 0 69 69 self.dds_nco = dds_nco = 0
self.dds_f0 = dds_f0 = 0 70 70 self.dds_f0 = dds_f0 = 0
self.dds_ampl = dds_ampl = 0 71 71 self.dds_ampl = dds_ampl = 0
self.dac1_offset = dac1_offset = 0 72 72 self.dac1_offset = dac1_offset = 0
self.addr = addr = "192.168.0.203" 73 73 self.addr = addr = "192.168.0.203"
self.adc1_offset = adc1_offset = 0 74 74 self.adc1_offset = adc1_offset = 0
75 75
################################################## 76 76 ##################################################
# Blocks 77 77 # Blocks
################################################## 78 78 ##################################################
_poff_check_box = Qt.QCheckBox('poff') 79 79 _poff_check_box = Qt.QCheckBox('poff')
self._poff_choices = {True: 1, False: 0} 80 80 self._poff_choices = {True: 1, False: 0}
self._poff_choices_inv = dict((v,k) for k,v in self._poff_choices.iteritems()) 81 81 self._poff_choices_inv = dict((v,k) for k,v in self._poff_choices.iteritems())
self._poff_callback = lambda i: Qt.QMetaObject.invokeMethod(_poff_check_box, "setChecked", Qt.Q_ARG("bool", self._poff_choices_inv[i])) 82 82 self._poff_callback = lambda i: Qt.QMetaObject.invokeMethod(_poff_check_box, "setChecked", Qt.Q_ARG("bool", self._poff_choices_inv[i]))
self._poff_callback(self.poff) 83 83 self._poff_callback(self.poff)
_poff_check_box.stateChanged.connect(lambda i: self.set_poff(self._poff_choices[bool(i)])) 84 84 _poff_check_box.stateChanged.connect(lambda i: self.set_poff(self._poff_choices[bool(i)]))
self.top_grid_layout.addWidget(_poff_check_box, 2, 4) 85 85 self.top_grid_layout.addWidget(_poff_check_box, 2, 4)
_pinc_check_box = Qt.QCheckBox('pinc') 86 86 _pinc_check_box = Qt.QCheckBox('pinc')
self._pinc_choices = {True: 1, False: 0} 87 87 self._pinc_choices = {True: 1, False: 0}
self._pinc_choices_inv = dict((v,k) for k,v in self._pinc_choices.iteritems()) 88 88 self._pinc_choices_inv = dict((v,k) for k,v in self._pinc_choices.iteritems())
self._pinc_callback = lambda i: Qt.QMetaObject.invokeMethod(_pinc_check_box, "setChecked", Qt.Q_ARG("bool", self._pinc_choices_inv[i])) 89 89 self._pinc_callback = lambda i: Qt.QMetaObject.invokeMethod(_pinc_check_box, "setChecked", Qt.Q_ARG("bool", self._pinc_choices_inv[i]))
self._pinc_callback(self.pinc) 90 90 self._pinc_callback(self.pinc)
_pinc_check_box.stateChanged.connect(lambda i: self.set_pinc(self._pinc_choices[bool(i)])) 91 91 _pinc_check_box.stateChanged.connect(lambda i: self.set_pinc(self._pinc_choices[bool(i)]))
self.top_grid_layout.addWidget(_pinc_check_box, 1, 4) 92 92 self.top_grid_layout.addWidget(_pinc_check_box, 1, 4)
_pid_sign_check_box = Qt.QCheckBox('pid_sign') 93 93 _pid_sign_check_box = Qt.QCheckBox('pid_sign')
self._pid_sign_choices = {True: 1, False: 0} 94 94 self._pid_sign_choices = {True: 1, False: 0}
self._pid_sign_choices_inv = dict((v,k) for k,v in self._pid_sign_choices.iteritems()) 95 95 self._pid_sign_choices_inv = dict((v,k) for k,v in self._pid_sign_choices.iteritems())
self._pid_sign_callback = lambda i: Qt.QMetaObject.invokeMethod(_pid_sign_check_box, "setChecked", Qt.Q_ARG("bool", self._pid_sign_choices_inv[i])) 96 96 self._pid_sign_callback = lambda i: Qt.QMetaObject.invokeMethod(_pid_sign_check_box, "setChecked", Qt.Q_ARG("bool", self._pid_sign_choices_inv[i]))
self._pid_sign_callback(self.pid_sign) 97 97 self._pid_sign_callback(self.pid_sign)
_pid_sign_check_box.stateChanged.connect(lambda i: self.set_pid_sign(self._pid_sign_choices[bool(i)])) 98 98 _pid_sign_check_box.stateChanged.connect(lambda i: self.set_pid_sign(self._pid_sign_choices[bool(i)]))
self.top_grid_layout.addWidget(_pid_sign_check_box, 3, 2) 99 99 self.top_grid_layout.addWidget(_pid_sign_check_box, 3, 2)
self._pid_setpoint_range = Range(-2**13, 2**13-1, 1, 0, 200) 100 100 self._pid_setpoint_range = Range(-2**13, 2**13-1, 1, 0, 200)
self._pid_setpoint_win = RangeWidget(self._pid_setpoint_range, self.set_pid_setpoint, 'pid_setpoint', "counter_slider", int) 101 101 self._pid_setpoint_win = RangeWidget(self._pid_setpoint_range, self.set_pid_setpoint, 'pid_setpoint', "counter_slider", int)
self.top_grid_layout.addWidget(self._pid_setpoint_win, 2, 2) 102 102 self.top_grid_layout.addWidget(self._pid_setpoint_win, 2, 2)
_pid_rst_int_push_button = Qt.QPushButton('pid_rst_int') 103 103 _pid_rst_int_push_button = Qt.QPushButton('pid_rst_int')
self._pid_rst_int_choices = {'Pressed': 1, 'Released': 0} 104 104 self._pid_rst_int_choices = {'Pressed': 1, 'Released': 0}
_pid_rst_int_push_button.pressed.connect(lambda: self.set_pid_rst_int(self._pid_rst_int_choices['Pressed'])) 105 105 _pid_rst_int_push_button.pressed.connect(lambda: self.set_pid_rst_int(self._pid_rst_int_choices['Pressed']))
_pid_rst_int_push_button.released.connect(lambda: self.set_pid_rst_int(self._pid_rst_int_choices['Released'])) 106 106 _pid_rst_int_push_button.released.connect(lambda: self.set_pid_rst_int(self._pid_rst_int_choices['Released']))
self.top_grid_layout.addWidget(_pid_rst_int_push_button, 4, 2) 107 107 self.top_grid_layout.addWidget(_pid_rst_int_push_button, 4, 2)
self._pid_kp_range = Range(0, 2**14-1, 1, 0, 200) 108 108 self._pid_kp_range = Range(0, 2**14-1, 1, 0, 200)
self._pid_kp_win = RangeWidget(self._pid_kp_range, self.set_pid_kp, 'pid_kp', "counter_slider", int) 109 109 self._pid_kp_win = RangeWidget(self._pid_kp_range, self.set_pid_kp, 'pid_kp', "counter_slider", int)
self.top_grid_layout.addWidget(self._pid_kp_win, 2, 1) 110 110 self.top_grid_layout.addWidget(self._pid_kp_win, 2, 1)
self._pid_ki_range = Range(0, 2**14-1, 1, 0, 200) 111 111 self._pid_ki_range = Range(0, 2**14-1, 1, 0, 200)
self._pid_ki_win = RangeWidget(self._pid_ki_range, self.set_pid_ki, 'pid_ki', "counter_slider", int) 112 112 self._pid_ki_win = RangeWidget(self._pid_ki_range, self.set_pid_ki, 'pid_ki', "counter_slider", int)
self.top_grid_layout.addWidget(self._pid_ki_win, 3, 1) 113 113 self.top_grid_layout.addWidget(self._pid_ki_win, 3, 1)
self._pid_kd_range = Range(0, 2**14-1, 1, 0, 200) 114 114 self._pid_kd_range = Range(0, 2**14-1, 1, 0, 200)
self._pid_kd_win = RangeWidget(self._pid_kd_range, self.set_pid_kd, 'pid_kd', "counter_slider", int) 115 115 self._pid_kd_win = RangeWidget(self._pid_kd_range, self.set_pid_kd, 'pid_kd', "counter_slider", int)
self.top_grid_layout.addWidget(self._pid_kd_win, 4, 1) 116 116 self.top_grid_layout.addWidget(self._pid_kd_win, 4, 1)
self._dds_range_range = Range(-2**13, 2**13-1, 1, 0, 200) 117 117 self._dds_range_range = Range(-2**13, 2**13-1, 1, 0, 200)
self._dds_range_win = RangeWidget(self._dds_range_range, self.set_dds_range, 'dds_range', "counter_slider", int) 118 118 self._dds_range_win = RangeWidget(self._dds_range_range, self.set_dds_range, 'dds_range', "counter_slider", int)
self.top_grid_layout.addWidget(self._dds_range_win, 5, 3) 119 119 self.top_grid_layout.addWidget(self._dds_range_win, 5, 3)
self._dds_offset_range = Range(-2**13, 2**13-1, 1, 0, 200) 120 120 self._dds_offset_range = Range(-2**13, 2**13-1, 1, 0, 200)
self._dds_offset_win = RangeWidget(self._dds_offset_range, self.set_dds_offset, 'dds_offset', "counter_slider", int) 121 121 self._dds_offset_win = RangeWidget(self._dds_offset_range, self.set_dds_offset, 'dds_offset', "counter_slider", int)
self.top_grid_layout.addWidget(self._dds_offset_win, 3, 3) 122 122 self.top_grid_layout.addWidget(self._dds_offset_win, 3, 3)
self._dds_nco_range = Range(0, 60000000, 1, 0, 200) 123 123 self._dds_nco_range = Range(0, 60000000, 1, 0, 200)
self._dds_nco_win = RangeWidget(self._dds_nco_range, self.set_dds_nco, 'dds_nco', "counter_slider", int) 124 124 self._dds_nco_win = RangeWidget(self._dds_nco_range, self.set_dds_nco, 'dds_nco', "counter_slider", int)
self.top_grid_layout.addWidget(self._dds_nco_win, 2, 3) 125 125 self.top_grid_layout.addWidget(self._dds_nco_win, 2, 3)
self._dds_f0_range = Range(0, 60000000, 1, 0, 200) 126 126 self._dds_f0_range = Range(0, 60000000, 1, 0, 200)
self._dds_f0_win = RangeWidget(self._dds_f0_range, self.set_dds_f0, 'dds_f0', "counter_slider", int) 127 127 self._dds_f0_win = RangeWidget(self._dds_f0_range, self.set_dds_f0, 'dds_f0', "counter_slider", int)
self.top_grid_layout.addWidget(self._dds_f0_win, 4, 3) 128 128 self.top_grid_layout.addWidget(self._dds_f0_win, 4, 3)
self._dds_ampl_range = Range(0, 2**13-1, 1, 0, 200) 129 129 self._dds_ampl_range = Range(0, 2**13-1, 1, 0, 200)
self._dds_ampl_win = RangeWidget(self._dds_ampl_range, self.set_dds_ampl, 'dds_ampl', "counter_slider", int) 130 130 self._dds_ampl_win = RangeWidget(self._dds_ampl_range, self.set_dds_ampl, 'dds_ampl', "counter_slider", int)
self.top_grid_layout.addWidget(self._dds_ampl_win, 1, 3) 131 131 self.top_grid_layout.addWidget(self._dds_ampl_win, 1, 3)
self._dac1_offset_range = Range(-2**13, 2**13-1, 1, 0, 200) 132 132 self._dac1_offset_range = Range(-2**13, 2**13-1, 1, 0, 200)
self._dac1_offset_win = RangeWidget(self._dac1_offset_range, self.set_dac1_offset, 'dac1_offset', "counter_slider", int) 133 133 self._dac1_offset_win = RangeWidget(self._dac1_offset_range, self.set_dac1_offset, 'dac1_offset', "counter_slider", int)
self.top_grid_layout.addWidget(self._dac1_offset_win, 1, 2) 134 134 self.top_grid_layout.addWidget(self._dac1_offset_win, 1, 2)
self._adc1_offset_range = Range(-2**13, 2**13-1, 1, 0, 200) 135 135 self._adc1_offset_range = Range(-2**13, 2**13-1, 1, 0, 200)
self._adc1_offset_win = RangeWidget(self._adc1_offset_range, self.set_adc1_offset, 'adc1_offset', "counter_slider", int) 136 136 self._adc1_offset_win = RangeWidget(self._adc1_offset_range, self.set_adc1_offset, 'adc1_offset', "counter_slider", int)
self.top_grid_layout.addWidget(self._adc1_offset_win, 1, 1) 137 137 self.top_grid_layout.addWidget(self._adc1_offset_win, 1, 1)
self.nco_counter_send_conf_0 = redpitaya_gnuradio.nco_counter_send_conf( 138 138 self.nco_counter_send_conf_0 = redpitaya_gnuradio.nco_counter_send_conf(
addr=addr, 139 139 addr=addr,
port=port, 140 140 port=port,
device='/dev/dds_nco', 141 141 device='/dev/dds_nco',
freq_ref=125000000, 142 142 freq_ref=125000000,
freq_dds=dds_nco, 143 143 freq_dds=dds_nco,
acc_size=32, 144 144 acc_size=32,
offset=0, 145 145 offset=0,
pinc_sw=pinc, 146 146 pinc_sw=pinc,
poff_sw=poff, 147 147 poff_sw=poff,
) 148 148 )
149 149
self.add_const_set_offset_0_0_0_1_0_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset( 150 150 self.add_const_set_offset_0_0_0_1_0_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 151 151 addr=addr,
port=port, 152 152 port=port,
device='/dev/pid_rst_int', 153 153 device='/dev/pid_rst_int',
const=pid_rst_int, 154 154 const=pid_rst_int,
) 155 155 )
156 156
self.add_const_set_offset_0_0_0_1_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset( 157 157 self.add_const_set_offset_0_0_0_1_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 158 158 addr=addr,
port=port, 159 159 port=port,
device='/dev/pid_sign', 160 160 device='/dev/pid_sign',
const=pid_sign, 161 161 const=pid_sign,
) 162 162 )
163 163
self.add_const_set_offset_0_0_0_1_0_0_0 = redpitaya_gnuradio.add_const_set_offset( 164 164 self.add_const_set_offset_0_0_0_1_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 165 165 addr=addr,
port=port, 166 166 port=port,
device='/dev/pid_kd', 167 167 device='/dev/pid_kd',
const=pid_kd, 168 168 const=pid_kd,
) 169 169 )
170 170
self.add_const_set_offset_0_0_0_1_0_0 = redpitaya_gnuradio.add_const_set_offset( 171 171 self.add_const_set_offset_0_0_0_1_0_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 172 172 addr=addr,
port=port, 173 173 port=port,
device='/dev/pid_ki', 174 174 device='/dev/pid_ki',
const=pid_ki, 175 175 const=pid_ki,
) 176 176 )
177 177
self.add_const_set_offset_0_0_0_1_0 = redpitaya_gnuradio.add_const_set_offset( 178 178 self.add_const_set_offset_0_0_0_1_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 179 179 addr=addr,
port=port, 180 180 port=port,
device='/dev/pid_kp', 181 181 device='/dev/pid_kp',
const=pid_kp, 182 182 const=pid_kp,
) 183 183 )
184 184
self.add_const_set_offset_0_0_0_1 = redpitaya_gnuradio.add_const_set_offset( 185 185 self.add_const_set_offset_0_0_0_1 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 186 186 addr=addr,
port=port, 187 187 port=port,
device='/dev/pid_setpoint', 188 188 device='/dev/pid_setpoint',
const=pid_setpoint, 189 189 const=pid_setpoint,
) 190 190 )
191 191
self.add_const_set_offset_0_0_0_0_1_0_0 = redpitaya_gnuradio.add_const_set_offset( 192 192 self.add_const_set_offset_0_0_0_0_1_0_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 193 193 addr=addr,
port=port, 194 194 port=port,
device='/dev/dds_range', 195 195 device='/dev/dds_range',
const=dds_range, 196 196 const=dds_range,
) 197 197 )
198 198
self.add_const_set_offset_0_0_0_0_1_0 = redpitaya_gnuradio.add_const_set_offset( 199 199 self.add_const_set_offset_0_0_0_0_1_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 200 200 addr=addr,
port=port, 201 201 port=port,
device='/dev/dds_f0', 202 202 device='/dev/dds_f0',
const=int(dds_f0/(125e6/2**32)), 203 203 const=int(dds_f0/(125e6/2**32)),
) 204 204 )
205 205
self.add_const_set_offset_0_0_0_0_1 = redpitaya_gnuradio.add_const_set_offset( 206 206 self.add_const_set_offset_0_0_0_0_1 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 207 207 addr=addr,
port=port, 208 208 port=port,
device='/dev/dds_offset', 209 209 device='/dev/dds_offset',
const=dds_offset, 210 210 const=dds_offset,
) 211 211 )
212 212
self.add_const_set_offset_0_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset( 213 213 self.add_const_set_offset_0_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 214 214 addr=addr,
port=port, 215 215 port=port,
device='/dev/dds_ampl', 216 216 device='/dev/dds_ampl',
const=dds_ampl, 217 217 const=dds_ampl,
) 218 218 )
219 219
self.add_const_set_offset_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset( 220 220 self.add_const_set_offset_0_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 221 221 addr=addr,
port=port, 222 222 port=port,
device='/dev/dac1_offset', 223 223 device='/dev/dac1_offset',
const=dac1_offset, 224 224 const=dac1_offset,
) 225 225 )
226 226
self.add_const_set_offset_0_0_0 = redpitaya_gnuradio.add_const_set_offset( 227 227 self.add_const_set_offset_0_0_0 = redpitaya_gnuradio.add_const_set_offset(
addr=addr, 228 228 addr=addr,
port=port, 229 229 port=port,
device='/dev/adc1_offset', 230 230 device='/dev/adc1_offset',
const=adc1_offset, 231 231 const=adc1_offset,
) 232 232 )
233 233
234 234
def closeEvent(self, event): 235 235 def closeEvent(self, event):
self.settings = Qt.QSettings("GNU Radio", "pid_vco") 236 236 self.settings = Qt.QSettings("GNU Radio", "pid_vco")
self.settings.setValue("geometry", self.saveGeometry()) 237 237 self.settings.setValue("geometry", self.saveGeometry())
event.accept() 238 238 event.accept()
239 239
def get_port(self): 240 240 def get_port(self):
return self.port 241 241 return self.port
242 242
def set_port(self, port): 243 243 def set_port(self, port):
self.port = port 244 244 self.port = port
245 245
def get_poff(self): 246 246 def get_poff(self):
return self.poff 247 247 return self.poff
248 248
def set_poff(self, poff): 249 249 def set_poff(self, poff):
self.poff = poff 250 250 self.poff = poff
self._poff_callback(self.poff) 251 251 self._poff_callback(self.poff)
self.nco_counter_send_conf_0.set_nco(device='/dev/dds_nco', freq_ref=125000000, freq_dds=self.dds_nco, acc_size=32, offset=0, pinc_sw=self.pinc, poff_sw=self.poff) 252 252 self.nco_counter_send_conf_0.set_nco(device='/dev/dds_nco', freq_ref=125000000, freq_dds=self.dds_nco, acc_size=32, offset=0, pinc_sw=self.pinc, poff_sw=self.poff)
253 253
def get_pinc(self): 254 254 def get_pinc(self):
return self.pinc 255 255 return self.pinc
256 256
def set_pinc(self, pinc): 257 257 def set_pinc(self, pinc):
self.pinc = pinc 258 258 self.pinc = pinc
self._pinc_callback(self.pinc) 259 259 self._pinc_callback(self.pinc)
self.nco_counter_send_conf_0.set_nco(device='/dev/dds_nco', freq_ref=125000000, freq_dds=self.dds_nco, acc_size=32, offset=0, pinc_sw=self.pinc, poff_sw=self.poff) 260 260 self.nco_counter_send_conf_0.set_nco(device='/dev/dds_nco', freq_ref=125000000, freq_dds=self.dds_nco, acc_size=32, offset=0, pinc_sw=self.pinc, poff_sw=self.poff)
261 261
def get_pid_sign(self): 262 262 def get_pid_sign(self):
return self.pid_sign 263 263 return self.pid_sign
264 264
def set_pid_sign(self, pid_sign): 265 265 def set_pid_sign(self, pid_sign):
self.pid_sign = pid_sign 266 266 self.pid_sign = pid_sign
self._pid_sign_callback(self.pid_sign) 267 267 self._pid_sign_callback(self.pid_sign)
self.add_const_set_offset_0_0_0_1_0_0_0_0.set_const(device='/dev/pid_sign', const=self.pid_sign) 268 268 self.add_const_set_offset_0_0_0_1_0_0_0_0.set_const(device='/dev/pid_sign', const=self.pid_sign)
269 269
def get_pid_setpoint(self): 270 270 def get_pid_setpoint(self):
return self.pid_setpoint 271 271 return self.pid_setpoint
272 272
def set_pid_setpoint(self, pid_setpoint): 273 273 def set_pid_setpoint(self, pid_setpoint):
self.pid_setpoint = pid_setpoint 274 274 self.pid_setpoint = pid_setpoint
self.add_const_set_offset_0_0_0_1.set_const(device='/dev/pid_setpoint', const=self.pid_setpoint) 275 275 self.add_const_set_offset_0_0_0_1.set_const(device='/dev/pid_setpoint', const=self.pid_setpoint)
276 276
def get_pid_rst_int(self): 277 277 def get_pid_rst_int(self):
return self.pid_rst_int 278 278 return self.pid_rst_int
279 279
def set_pid_rst_int(self, pid_rst_int): 280 280 def set_pid_rst_int(self, pid_rst_int):
self.pid_rst_int = pid_rst_int 281 281 self.pid_rst_int = pid_rst_int
self.add_const_set_offset_0_0_0_1_0_0_0_0_0.set_const(device='/dev/pid_rst_int', const=self.pid_rst_int) 282 282 self.add_const_set_offset_0_0_0_1_0_0_0_0_0.set_const(device='/dev/pid_rst_int', const=self.pid_rst_int)
283 283
def get_pid_kp(self): 284 284 def get_pid_kp(self):
return self.pid_kp 285 285 return self.pid_kp
286 286
def set_pid_kp(self, pid_kp): 287 287 def set_pid_kp(self, pid_kp):
self.pid_kp = pid_kp 288 288 self.pid_kp = pid_kp
self.add_const_set_offset_0_0_0_1_0.set_const(device='/dev/pid_kp', const=self.pid_kp) 289 289 self.add_const_set_offset_0_0_0_1_0.set_const(device='/dev/pid_kp', const=self.pid_kp)
290 290
def get_pid_ki(self): 291 291 def get_pid_ki(self):
return self.pid_ki 292 292 return self.pid_ki
293 293
def set_pid_ki(self, pid_ki): 294 294 def set_pid_ki(self, pid_ki):
self.pid_ki = pid_ki 295 295 self.pid_ki = pid_ki
self.add_const_set_offset_0_0_0_1_0_0.set_const(device='/dev/pid_ki', const=self.pid_ki) 296 296 self.add_const_set_offset_0_0_0_1_0_0.set_const(device='/dev/pid_ki', const=self.pid_ki)
297 297
def get_pid_kd(self): 298 298 def get_pid_kd(self):
return self.pid_kd 299 299 return self.pid_kd
300 300
def set_pid_kd(self, pid_kd): 301 301 def set_pid_kd(self, pid_kd):
self.pid_kd = pid_kd 302 302 self.pid_kd = pid_kd
self.add_const_set_offset_0_0_0_1_0_0_0.set_const(device='/dev/pid_kd', const=self.pid_kd) 303 303 self.add_const_set_offset_0_0_0_1_0_0_0.set_const(device='/dev/pid_kd', const=self.pid_kd)
304 304
def get_dds_range(self): 305 305 def get_dds_range(self):
return self.dds_range 306 306 return self.dds_range
307 307
def set_dds_range(self, dds_range): 308 308 def set_dds_range(self, dds_range):
self.dds_range = dds_range 309 309 self.dds_range = dds_range
self.add_const_set_offset_0_0_0_0_1_0_0.set_const(device='/dev/dds_range', const=self.dds_range) 310 310 self.add_const_set_offset_0_0_0_0_1_0_0.set_const(device='/dev/dds_range', const=self.dds_range)
311 311
def get_dds_offset(self): 312 312 def get_dds_offset(self):
return self.dds_offset 313 313 return self.dds_offset
314 314
def set_dds_offset(self, dds_offset): 315 315 def set_dds_offset(self, dds_offset):
self.dds_offset = dds_offset 316 316 self.dds_offset = dds_offset
self.add_const_set_offset_0_0_0_0_1.set_const(device='/dev/dds_offset', const=self.dds_offset) 317 317 self.add_const_set_offset_0_0_0_0_1.set_const(device='/dev/dds_offset', const=self.dds_offset)
318 318
def get_dds_nco(self): 319 319 def get_dds_nco(self):