pySX127x
pySX127x copied to clipboard
overhead class with little different
Hi is there a reason of separating LoRa and LoRa2, BOARD with BOARD2
I check the class it only use different configuration ( pin ,etc ). All the function is exactly the same.
It should be easy to make it more compact and more object oriented.
Instead of create BOARD outside of class, we could pass it to the LoRa class as variable. The BOARD also can be created using configuration parameters.
There's no deep reason for this. Running two or more LoRa instances on different boards within the same program seems meaningless because it's physically impossible on normal hardware. For this purpose it would be OO for the sake of OO. The ability to configure BOARD is a good point, though. It never seemed to be an issue in practice, though.