From: Uwe Hermann Date: Tue, 8 Oct 2013 21:20:15 +0000 (+0200) Subject: onewire_link: Default the 'overdrive' option to 'no'. X-Git-Tag: libsigrokdecode-0.3.0~283 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=01520fa9a6e0fe3eb17dd107a408e6b7e726850a;p=libsigrokdecode.git onewire_link: Default the 'overdrive' option to 'no'. --- diff --git a/decoders/onewire_link/pd.py b/decoders/onewire_link/pd.py index e7bf8b3..284d329 100644 --- a/decoders/onewire_link/pd.py +++ b/decoders/onewire_link/pd.py @@ -38,7 +38,7 @@ class Decoder(srd.Decoder): {'id': 'pwr', 'name': 'PWR', 'desc': '1-Wire power supply pin'}, ] options = { - 'overdrive': ['Overdrive', 1], + 'overdrive': ['Overdrive mode', 'no'], # Time options (specified in microseconds): 'cnt_normal_bit': ['Normal mode sample bit time (us)', 15], 'cnt_normal_slot': ['Normal mode data slot time (us)', 60], @@ -87,7 +87,7 @@ class Decoder(srd.Decoder): self.samplerate = metadata['samplerate'] # Check if samplerate is appropriate. - if self.options['overdrive']: + if self.options['overdrive'] == 'yes': if self.samplerate < 2000000: self.putm([1, ['Sampling rate is too low. Must be above ' + '2MHz for proper overdrive mode decoding.']])