pySX127x icon indicating copy to clipboard operation
pySX127x copied to clipboard

overhead class with little different

Open wiryonolau opened this issue 4 years ago • 1 comments

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.

wiryonolau avatar Sep 29 '20 08:09 wiryonolau

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.

mayeranalytics avatar Sep 23 '22 05:09 mayeranalytics