Commit 77603816e36da2f31d1a2508018ea51d91953743
1 parent
9058343c56
Exists in
master
add TEMPERATURE_AIR_K
Showing 1 changed file with 6 additions and 3 deletions Side-by-side Diff
instruments/T7Pro.py
... | ... | @@ -4,11 +4,11 @@ |
4 | 4 | |
5 | 5 | #============================================================================== |
6 | 6 | |
7 | -ALL_VAL_TYPE = ['RES', 'TEMP PT100 K', 'TEMP PT100 C'] | |
8 | -ALL_CHANNELS = ['1', '2', '3', '4'] | |
7 | +ALL_VAL_TYPE = ['RES', 'TEMP PT100 K', 'TEMP PT100 C', 'TEMP AIR K'] | |
8 | +ALL_CHANNELS = ['1', '2', '3', '4', 'TEMP AIR K'] | |
9 | 9 | |
10 | 10 | ADDRESS = "192.168.0.25" |
11 | -CONF_CHANNELS = [["AIN0", "AIN10"], ["AIN2", "AIN11"], ["AIN4", "AIN12"], ["AIN6", "AIN13"]] | |
11 | +CONF_CHANNELS = [["AIN0", "AIN10"], ["AIN2", "AIN11"], ["AIN4", "AIN12"], ["AIN6", "AIN13"], ["TEMPERATURE_AIR_K"]] | |
12 | 12 | VISHAY_CHANNELS = [1000., 1000., 1079., 10000.] |
13 | 13 | |
14 | 14 | #============================================================================== |
... | ... | @@ -76,6 +76,9 @@ |
76 | 76 | elif self.vtypes[self.channels.index(ch)] == 'TEMP PT100 C': |
77 | 77 | raw = self.read(CONF_CHANNELS[ALL_CHANNELS.index(ch)]) |
78 | 78 | strMes = strMes + str(((VISHAY_CHANNELS[ALL_CHANNELS.index(ch)]*raw[0]/raw[1])/100.-1)/0.003850) + ';' |
79 | + elif self.vtypes[self.channels.index(ch)] == 'TEMP AIR K': | |
80 | + raw = self.read(CONF_CHANNELS[ALL_CHANNELS.index(ch)]) | |
81 | + strMes = strMes + str(raw[0]) + ';' | |
79 | 82 | |
80 | 83 | strMes = strMes[0:-1] + '\n' |
81 | 84 | return(strMes) |