Commit 71c75635ed773ec551260c64ba09257f709242bb
1 parent
0cfef1bd2d
Exists in
master
FPC1000: une coherent definition of CONF
Showing 1 changed file with 2 additions and 3 deletions Side-by-side Diff
instruments/FPC1000.py
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | ALL_CHANNELS = ['1', '2', '3', '4'] |
| 8 | 8 | |
| 9 | 9 | ADDRESS = "192.168.0.17" |
| 10 | -CONF_VAL_TYPE = ['CALC:MARK1:Y?', 'CALC:MARK2:Y?', 'CALC:MARK3:Y?', 'CALC:MARK4:Y?'] | |
| 10 | +CONF_VAL_TYPE = ['CALC:MARKi:Y?'] | |
| 11 | 11 | |
| 12 | 12 | #============================================================================== |
| 13 | 13 | |
| ... | ... | @@ -43,8 +43,7 @@ |
| 43 | 43 | def getValue(self): |
| 44 | 44 | mes = '' |
| 45 | 45 | for ch in self.channels: |
| 46 | - #self.send('CALC:MARK1:MAX:PEAK') | |
| 47 | - self.send(CONF_VAL_TYPE[int(ch)-1]) | |
| 46 | + self.send(CONF_VAL_TYPE[ALL_VAL_TYPE.index(self.vtypes[self.channels.index(ch)])].replace('i', str(ch))) | |
| 48 | 47 | mesTemp = self.read() |
| 49 | 48 | mes = mes + '\t' + mesTemp.replace('\n', '') |
| 50 | 49 | return mes + '\n' |