This causes the following lircd.conf to be converted incorrectly. http://lirc.sourceforge.net/remotes/cambridge_audio/X40A Signed-off-by: Sean Young <sean@xxxxxxxx> --- contrib/lircd2toml.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/lircd2toml.py b/contrib/lircd2toml.py index f9408ecc..72ee50e3 100755 --- a/contrib/lircd2toml.py +++ b/contrib/lircd2toml.py @@ -404,18 +404,18 @@ class Converter: bits = int(self.remote['bits'][0]) - toggle_bit = 0 - if 'toggle_bit_mask' in self.remote: - toggle_bit = ffs(int(self.remote['toggle_bit_mask'][0])) - if 'toggle_bit' in self.remote: - toggle_bit = bits - int(self.remote['toggle_bit'][0]) - pre_data = 0 if 'pre_data_bits' in self.remote: pre_data_bits = int(self.remote['pre_data_bits'][0]) pre_data = int(self.remote['pre_data'][0]) << bits bits += pre_data_bits + toggle_bit = 0 + if 'toggle_bit_mask' in self.remote: + toggle_bit = ffs(int(self.remote['toggle_bit_mask'][0])) + if 'toggle_bit' in self.remote: + toggle_bit = bits - int(self.remote['toggle_bit'][0]) + if 'plead' in self.remote: plead = self.remote['plead'][0] one_pulse = self.remote['one'][0] -- 2.20.1