alexmaloteaux / the-bus-pirate

Automatically exported from code.google.com/p/the-bus-pirate
Other
0 stars 1 forks source link

BitBang.py bug/typo on line 125/126 #68

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

       def raw_set_pins(self, pins):
           self.port.write(chr(0x80 | config))

What is the expected output? What do you see instead?

  File "/usr/local/lib/python2.7/dist-packages/pyBusPirateLite/BitBang.py", line 126, in raw_set_pins
    self.port.write(chr(0x80 | config))
NameError: global name 'config' is not defined

Please provide any additional information below.

Either change config to pins on line 126 or pins to config on line 125

Original issue reported on code.google.com by mohcl...@gmail.com on 21 Feb 2012 at 3:12

GoogleCodeExporter commented 8 years ago
I have successfully read the frequency of a RH10D humidity sensor.

hacky code below which discovered this buggette.

       i2c.BBmode()
        print "Requesting Freq check"
        i2c.raw_cfg_pins(PinCfg.AUX);
        i2c.raw_set_pins(BBIOPins.AUX | BBIOPins.PULLUP | BBIOPins.POWER);
        i2c.port.write("\x16")
        i2c.timeout(2)

        raw_data = i2c.response(4, True)

Original comment by mohcl...@gmail.com on 21 Feb 2012 at 3:14

GoogleCodeExporter commented 8 years ago
This is a duplicate of issue 47

Original comment by berh...@gmail.com on 26 Feb 2013 at 1:16