Skip to content

Commit df3be46

Browse files
committed
Cleanup the mapping.
1 parent e0adf32 commit df3be46

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

aspThreads.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,7 @@ def __init__(self, sub20SN, config, temp_logfile='/data/board-temp.txt',
461461
self.pic_monitoring = pic_monitoring
462462

463463
# SPI setup and data variables
464-
mini_mapping = {self.sub20SN: self.config['sub20_antenna_mapping'][self.sub20SN]}
465-
self._spi = SPIProcessingThread(mini_mapping)
464+
self._spi = SPIProcessingThread(self.spi_mini_mapping)
466465
self.configured = False
467466
self.fee_currents = []
468467

@@ -480,7 +479,8 @@ def updateConfig(self, config=None):
480479
if config is None:
481480
return True
482481

483-
self.mapping = config['sub20_rs485_mapping']
482+
self.spi_mini_mapping = {self.sub20SN: config['sub20_antenna_mapping'][self.sub20SN]}
483+
self.rs485_mapping = config['sub20_rs485_mapping']
484484
self.monitorPeriod = config['chassis_period']
485485

486486
def start(self):
@@ -545,7 +545,7 @@ def monitorThread(self):
545545

546546
## Record the board temperatures and power consumption while we are at it
547547
if self.pic_monitoring and loop_counter == 0:
548-
#status, temps = rs485Temperature(self.mapping, maxRetry=MAX_RS485_RETRY)
548+
#status, temps = rs485Temperature(self.rs485_mapping, maxRetry=MAX_RS485_RETRY)
549549
status, temps = False, []
550550

551551
if status:
@@ -557,7 +557,7 @@ def monitorThread(self):
557557
except Exception as e:
558558
aspThreadsLogger.error("%s: monitorThread failed to update board temperature log - %s", type(self).__name__, str(e))
559559

560-
status, fees = rs485Power(self.mapping, maxRetry=MAX_RS485_RETRY)
560+
status, fees = rs485Power(self.rs485_mapping, maxRetry=MAX_RS485_RETRY)
561561

562562
if status:
563563
self.fee_currents = fees

0 commit comments

Comments
 (0)