pycom / pycom-libraries

MicroPython libraries and examples that work out of the box on Pycom's IoT modules
334 stars 375 forks source link

Loramesh doesn't honor lora argument #88

Closed mgranberryto closed 5 years ago

mgranberryto commented 5 years ago

The Loramesh example includes a bug in initializing the LoRa stack.

  if lora is not None:
    self.lora = LoRa(mode=LoRa.LORA, region=LoRa.EU868, bandwidth=LoRa.BW_125KHZ, sf=7)
  else:
    self.lora = lora

This should be:

  if lora is None:
    self.lora = LoRa(mode=LoRa.LORA, region=LoRa.EU868, bandwidth=LoRa.BW_125KHZ, sf=7)
  else:
    self.lora = lora
catalinio commented 5 years ago

:) Thanks for spotting this!

catalinio commented 5 years ago

Solved in commit https://github.com/pycom/pycom-libraries/commit/652e0639f8b3adb1326fdba1c8f896948b698d86