Skip to content

Commit 1a6bbbf

Browse files
WIP: add interact() phase, so that interaction can be scripted
1 parent 3f69395 commit 1a6bbbf

File tree

1 file changed

+3
-0
lines changed
  • software/glasgow/applet/interface/freq_counter

1 file changed

+3
-0
lines changed

software/glasgow/applet/interface/freq_counter/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ async def run(self, device, args):
139139
iface = await device.demultiplexer.claim_interface(self, self.mux_interface, args, pull_low={args.pin_i})
140140
freq_ctr = FrequencyCounterInterface(self, device, iface)
141141

142+
return freq_ctr
143+
144+
async def interact(self, device, args, freq_ctr):
142145
signal_freq, precision = await freq_ctr.measure(args.duration)
143146
print('signal frequency: {:>7.3f} {:1}Hz'.format( *num_to_si(signal_freq) ))
144147
print('precision: +/- {:>7.3f} {:1}Hz'.format( *num_to_si(precision) ))

0 commit comments

Comments
 (0)