gschorcht / lis3mdl-esp-idf

LIS3MDL driver for ESP-IDF (ESP32)
6 stars 4 forks source link

Please consider moving the `components/lis3mdl` directory to separate repository #2

Open DavidAntliff opened 5 years ago

DavidAntliff commented 5 years ago

Thank you for writing this driver and making it available.

I have a suggestion that I think will improve the usability of this driver.

It can be useful to separate ESP-IDF drivers into two repositories - one for the actual driver (set up as an IDF component) and another for the example application (which depends on the driver). This allows the driver to be easily integrated with third-party projects as a git submodule installed into the project's component directory. The example can do this too.

For example: https://github.com/DavidAntliff/esp32-tsl2561-example (the example project) and https://github.com/DavidAntliff/esp32-tsl2561 (the driver itself, as an IDF component, referenced as a git submodule).

This structure also enables the use of other git-related tools like git repo, so it's not constrained to git submodules.

As it is now, users of the driver will have to essentially "copy/paste" a single directory from your repository, which unfortunately detaches the source from the original github repository.

DavidAntliff commented 5 years ago

I see that it's slightly more complicated than I first thought, because there is a dependency by the driver on the esp8266_wrapper component when compiled for the ESP32. I suppose one way to handle this is to make both of these separate repositories, however I wonder if there's a better way?