Skip to content

Testbenches: define `type` in `init`

Ben Bruers requested to merge bbrueers/powertools:moveTypeToConf into activeTB

For the end-cap powerboards the input phase is inverted for R0 and R1 compared to R2, R3, R4, R5 and the barrel. So far, the phase was manually changed in the equip_testbench.json to account for this. This MR adds automatisation to the phase changing per type.

To do so, a change in the initalisation of the testbench was needed. Originally, the PBType was set by the function setPBPanelType once the testbench was defined. However, the input command phase for the powerboards is defined in the intialisation of the testbenches, in the function init_devices. If hence calling setPBPanelType after the initialisation, the phase could not be altered any more.

To address this, the pbType is now an optional argument of the init function of the testbenches. The function setPBPanelType was made protected. In initDevices called by init the phase is adjusted according to which type is used.

To propagate the pbType to init, the function PBv3TBConf::getPBv3TB also takes the pbType as an argument.

Depends on !171 as using the new base class for the 20210504 test benches.

Merge request reports