mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 12:06:08 +00:00
daq: fix resistor_values and sample_rate_hz parameters list
resistor_values is an array of float and not int as the shunt resistors are most of the time lower than 1 Ohm. With kind=list_of_ints, all resistor values are rounded to 0. Replace it by list_of_numbers sample_rate_hz is an int used to get sample period and to compute energy. Changes its type from str to int With these 2 fixes, the daq instrument has been successfully tested with NI DAQ6211 Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
This commit is contained in:
parent
117f0f9fc4
commit
741193c441
@ -20,6 +20,8 @@ from collections import defaultdict
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from wa.utils.types import list_of_numbers
|
||||
|
||||
from devlib import DerivedEnergyMeasurements
|
||||
from devlib.instrument import CONTINUOUS
|
||||
from devlib.instrument.energy_probe import EnergyProbeInstrument
|
||||
@ -65,7 +67,7 @@ class DAQBackend(EnergyInstrumentBackend):
|
||||
name = 'daq'
|
||||
|
||||
parameters = [
|
||||
Parameter('resistor_values', kind=list_of_ints,
|
||||
Parameter('resistor_values', kind=list_of_numbers,
|
||||
global_alias='daq_resistor_values',
|
||||
description="""
|
||||
The values of resistors (in Ohms) across which the voltages
|
||||
@ -106,7 +108,7 @@ class DAQBackend(EnergyInstrumentBackend):
|
||||
Specifies the voltage range for the resistor voltage channel
|
||||
on the DAQ (please refer to :ref:`daq_setup` for details).
|
||||
"""),
|
||||
Parameter('sample_rate_hz', kind=str, default=10000,
|
||||
Parameter('sample_rate_hz', kind=int, default=10000,
|
||||
global_alias='daq_sampling_rate',
|
||||
description="""
|
||||
Specify the sample rate in Hz.
|
||||
|
Loading…
x
Reference in New Issue
Block a user