@@ -80,6 +80,7 class RCConfiguration(Configuration): | |||
|
80 | 80 | time_before = models.PositiveIntegerField(verbose_name='Time before [μS]', default=12) |
|
81 | 81 | time_after = models.PositiveIntegerField(verbose_name='Time after [μS]', default=1) |
|
82 | 82 | sync = models.PositiveIntegerField(verbose_name='Synchro delay', default=0) |
|
83 | ch_monitor = models.PositiveIntegerField(verbose_name='Channel Monitor', validators=[MinValueValidator(0), MaxValueValidator(15)], default=6) | |
|
83 | 84 | sampling_reference = models.CharField(verbose_name='Sampling Reference', choices=SAMPLING_REFS, default='none', max_length=40) |
|
84 | 85 | control_tx = models.BooleanField(verbose_name='Control Switch TX', default=False) |
|
85 | 86 | control_sw = models.BooleanField(verbose_name='Control Switch SW', default=False) |
@@ -578,6 +579,9 class RCConfiguration(Configuration): | |||
|
578 | 579 | print("write device") |
|
579 | 580 | |
|
580 | 581 | if not raw: |
|
582 | ||
|
583 | ||
|
584 | ||
|
581 | 585 | clock = RCClock.objects.get(rc_configuration=self) |
|
582 | 586 | if clock.mode: |
|
583 | 587 | data = {'default': clock.frequency} |
@@ -594,6 +598,18 class RCConfiguration(Configuration): | |||
|
594 | 598 | #if payload['setfreq'] == 'fail': |
|
595 | 599 | if payload['programming'] == 'fail': |
|
596 | 600 | self.message = 'RC write: error programming CGS chip' |
|
601 | ||
|
602 | ############################################################## | |
|
603 | data = {'setwindow': self.ch_monitor} | |
|
604 | print(data) | |
|
605 | payload = self.request('setwin', 'post', data=json.dumps(data)) | |
|
606 | ||
|
607 | if payload['setwindow'] == 'ok': | |
|
608 | self.message = 'RC write: {}'.format(payload['setwindow']) | |
|
609 | else: | |
|
610 | if payload['command'] != 'wrong format or key': | |
|
611 | self.message = 'Error RC monitor channel: {}'.format(payload['command']) | |
|
612 | ############################################################## | |
|
597 | 613 | |
|
598 | 614 | values = [] |
|
599 | 615 | print('wait delay values...') |
@@ -33,7 +33,7 def conf(request, conf_id): | |||
|
33 | 33 | kwargs['dev_conf'] = conf |
|
34 | 34 | kwargs['rc_lines'] = lines |
|
35 | 35 | kwargs['dev_conf_keys'] = ['ipp_unit', 'ntx', 'clock_divider', 'clock', |
|
36 | 'time_before', 'time_after', 'sync', 'sampling_reference', | |
|
36 | 'time_before', 'time_after', 'sync', 'ch_monitor', 'sampling_reference', | |
|
37 | 37 | 'control_tx', 'control_sw'] |
|
38 | 38 | |
|
39 | 39 | kwargs['title'] = 'Configuration' |
General Comments 0
You need to be logged in to leave comments.
Login now