mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 10:10:46 +00:00
platforms/arm: JunoEnergyInstrument fixes
- Make sure commands are updated after installing readenergy binary during setup. - Add the missing channels argument to reset(). - Set the sample rate for the MeasurementCsv inside get_data().
This commit is contained in:
parent
75ff31c6c7
commit
56a5f8ab12
@ -245,9 +245,11 @@ class JunoEnergyInstrument(Instrument):
|
||||
def setup(self):
|
||||
self.binary = self.target.install(os.path.join(PACKAGE_BIN_DIRECTORY,
|
||||
self.target.abi, self.binname))
|
||||
self.command = '{} -o {}'.format(self.binary, self.on_target_file)
|
||||
self.command2 = '{}'.format(self.binary)
|
||||
|
||||
def reset(self, sites=None, kinds=None):
|
||||
super(JunoEnergyInstrument, self).reset(sites, kinds)
|
||||
def reset(self, sites=None, kinds=None, channels=None):
|
||||
super(JunoEnergyInstrument, self).reset(sites, kinds, channels)
|
||||
self.target.killall(self.binname, as_root=True)
|
||||
|
||||
def start(self):
|
||||
@ -282,7 +284,7 @@ class JunoEnergyInstrument(Instrument):
|
||||
write_row = [row[c] for c in select_columns]
|
||||
writer.writerow(write_row)
|
||||
|
||||
return MeasurementsCsv(output_file, self.active_channels)
|
||||
return MeasurementsCsv(output_file, self.active_channels, sample_rate_hz=10)
|
||||
|
||||
def take_measurement(self):
|
||||
result = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user