Skip to content
Snippets Groups Projects
Commit a3d3184d authored by Paulus Kruger's avatar Paulus Kruger
Browse files

fix monitor mask bug

parent bc2df747
No related branches found
No related tags found
No related merge requests found
Pipeline #85276 passed
...@@ -358,7 +358,7 @@ variables: ...@@ -358,7 +358,7 @@ variables:
dim: 32 dim: 32
monitor: true monitor: true
read_parallel: true read_parallel: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_3V3 - name: RCU_PWR_3V3
description: RCU 3.3V voltage (V) description: RCU 3.3V voltage (V)
...@@ -371,7 +371,7 @@ variables: ...@@ -371,7 +371,7 @@ variables:
dim: 32 dim: 32
read_parallel: true read_parallel: true
monitor: true monitor: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_1V8 - name: RCU_PWR_1V8
description: RCU 1.8V voltage (V) description: RCU 1.8V voltage (V)
...@@ -384,7 +384,7 @@ variables: ...@@ -384,7 +384,7 @@ variables:
dim: 32 dim: 32
read_parallel: true read_parallel: true
monitor: true monitor: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_2V5 - name: RCU_PWR_2V5
description: RCU 2.5V voltage (V) description: RCU 2.5V voltage (V)
...@@ -397,7 +397,7 @@ variables: ...@@ -397,7 +397,7 @@ variables:
dim: 32 dim: 32
read_parallel: true read_parallel: true
monitor: true monitor: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_ANT_VOUT - name: RCU_PWR_ANT_VOUT
description: Voltage on antenna output of RCU (V). Controlled by ANT_PWR_ON. description: Voltage on antenna output of RCU (V). Controlled by ANT_PWR_ON.
...@@ -411,7 +411,7 @@ variables: ...@@ -411,7 +411,7 @@ variables:
dim2: [3,32] dim2: [3,32]
read_parallel: true read_parallel: true
monitor: true monitor: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_ANT_VIN - name: RCU_PWR_ANT_VIN
description: RCU antenna voltage before switch (V) description: RCU antenna voltage before switch (V)
...@@ -425,7 +425,7 @@ variables: ...@@ -425,7 +425,7 @@ variables:
dim2: [3,32] dim2: [3,32]
read_parallel: true read_parallel: true
monitor: true monitor: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_ANT_IOUT - name: RCU_PWR_ANT_IOUT
description: Current drawn on antenna output of RCU (A). 15mA offset due to LED on RCU description: Current drawn on antenna output of RCU (A). 15mA offset due to LED on RCU
...@@ -439,7 +439,7 @@ variables: ...@@ -439,7 +439,7 @@ variables:
dim2: [3,32] dim2: [3,32]
read_parallel: true read_parallel: true
monitor: true monitor: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_DIGITAL_on - name: RCU_PWR_DIGITAL_on
description: RCU digital power enable. Controlled by calling RCU_on/RCU_off description: RCU digital power enable. Controlled by calling RCU_on/RCU_off
......
...@@ -317,7 +317,7 @@ variables: ...@@ -317,7 +317,7 @@ variables:
dim: 32 dim: 32
monitor: true monitor: true
read_parallel: true read_parallel: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_3V3 - name: RCU_PWR_3V3
description: RCU 3.3V voltage (V) description: RCU 3.3V voltage (V)
...@@ -330,7 +330,7 @@ variables: ...@@ -330,7 +330,7 @@ variables:
dim: 32 dim: 32
read_parallel: true read_parallel: true
monitor: true monitor: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_1V8 - name: RCU_PWR_1V8
description: RCU 1.8V voltage (V) description: RCU 1.8V voltage (V)
...@@ -343,7 +343,7 @@ variables: ...@@ -343,7 +343,7 @@ variables:
dim: 32 dim: 32
read_parallel: true read_parallel: true
monitor: true monitor: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_2V5 - name: RCU_PWR_2V5
description: RCU 2.5V voltage (V) description: RCU 2.5V voltage (V)
...@@ -356,7 +356,7 @@ variables: ...@@ -356,7 +356,7 @@ variables:
dim: 32 dim: 32
read_parallel: true read_parallel: true
monitor: true monitor: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_ANT_VOUT - name: RCU_PWR_ANT_VOUT
description: Voltage on antenna output of RCU (V). Controlled by ANT_PWR_ON. description: Voltage on antenna output of RCU (V). Controlled by ANT_PWR_ON.
...@@ -370,7 +370,7 @@ variables: ...@@ -370,7 +370,7 @@ variables:
dim2: [3,32] dim2: [3,32]
read_parallel: true read_parallel: true
monitor: true monitor: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_ANT_VIN - name: RCU_PWR_ANT_VIN
description: RCU antenna voltage before switch (V) description: RCU antenna voltage before switch (V)
...@@ -384,7 +384,7 @@ variables: ...@@ -384,7 +384,7 @@ variables:
dim2: [3,32] dim2: [3,32]
read_parallel: true read_parallel: true
monitor: true monitor: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_ANT_IOUT - name: RCU_PWR_ANT_IOUT
description: Current drawn on antenna output of RCU (A). 15mA offset due to LED on RCU description: Current drawn on antenna output of RCU (A). 15mA offset due to LED on RCU
...@@ -398,7 +398,7 @@ variables: ...@@ -398,7 +398,7 @@ variables:
dim2: [3,32] dim2: [3,32]
read_parallel: true read_parallel: true
monitor: true monitor: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_DIGITAL_on - name: RCU_PWR_DIGITAL_on
description: RCU digital power enable. Controlled by calling RCU_on/RCU_off description: RCU digital power enable. Controlled by calling RCU_on/RCU_off
...@@ -422,7 +422,7 @@ variables: ...@@ -422,7 +422,7 @@ variables:
dtype: boolean dtype: boolean
dim: 32 dim: 32
monitor: true monitor: true
mask: RECVTR_I2C_error # mask: RECVTR_I2C_error
- name: RCU_PWR_ANALOG_on - name: RCU_PWR_ANALOG_on
description: RCU analog power enable. Controlled by RCU_on/off description: RCU analog power enable. Controlled by RCU_on/off
......
...@@ -191,6 +191,8 @@ class yamlreader(yamlconfig): ...@@ -191,6 +191,8 @@ class yamlreader(yamlconfig):
mask=Find(self.conf['variables'],'name',mask) mask=Find(self.conf['variables'],'name',mask)
if not(mask): continue; if not(mask): continue;
mask=mask.get('OPCR',None) mask=mask.get('OPCR',None)
if (mask is None):
mask=mask.get('OPCW',None)
if (mask==None): continue; if (mask==None): continue;
v['maskOPC']=mask v['maskOPC']=mask
if not self.monitorvarid is None: if not self.monitorvarid is None:
...@@ -319,6 +321,8 @@ class yamlreader(yamlconfig): ...@@ -319,6 +321,8 @@ class yamlreader(yamlconfig):
v=self.conf['variables'][self.monitorvarcnt]; v=self.conf['variables'][self.monitorvarcnt];
if v.get('monitor'): if v.get('monitor'):
mask=(v['maskOPC'].get_value() if v.get('maskOPC') else []) mask=(v['maskOPC'].get_value() if v.get('maskOPC') else [])
if isinstance(mask,list) and (len(mask)>0) and isinstance(mask[0],int):
mask=[m==0 for m in mask]
# print("monitor",v['name'],mask) # print("monitor",v['name'],mask)
# self.SetBusy() # self.SetBusy()
self.lastRecv=time.time() self.lastRecv=time.time()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment