arduino-libraries / Arduino_BMI270_BMM150

GNU Lesser General Public License v2.1
19 stars 13 forks source link

Added configuration parameter to select the sensor present #47

Closed maidnl closed 1 week ago

maidnl commented 1 week ago

Added configuration parameter on begin to select the sensor mounted on the board:

Default value -> Both present

github-actions[bot] commented 1 week ago

Memory usage change @ b65a10bd64619363b8cc3582442af0b353b9e361

Board flash % RAM for global variables %
arduino:mbed_edge:edge_control :small_red_triangle: +64 - +64 +0.01 - +0.01 0 - 0 0.0 - 0.0
arduino:mbed_nano:nano33ble :small_red_triangle: +64 - +64 +0.01 - +0.01 0 - 0 0.0 - 0.0
arduino:mbed_nano:nanorp2040connect :small_red_triangle: +104 - +104 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:mbed_portenta:envie_m7:target_core=cm4 N/A N/A N/A N/A
arduino:samd:mkr1000 :small_red_triangle: +100 - +100 +0.04 - +0.04 0 - 0 0.0 - 0.0
arduino:samd:mkrfox1200 :small_red_triangle: +100 - +100 +0.04 - +0.04 0 - 0 0.0 - 0.0
arduino:samd:mkrgsm1400 :small_red_triangle: +100 - +100 +0.04 - +0.04 0 - 0 0.0 - 0.0
arduino:samd:mkrnb1500 :small_red_triangle: +100 - +100 +0.04 - +0.04 0 - 0 0.0 - 0.0
arduino:samd:mkrvidor4000 :small_red_triangle: +100 - +100 +0.04 - +0.04 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1300 :small_red_triangle: +100 - +100 +0.04 - +0.04 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1310 :small_red_triangle: +100 - +100 +0.04 - +0.04 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 :small_red_triangle: +100 - +100 +0.04 - +0.04 0 - 0 0.0 - 0.0
arduino:samd:mkrzero :small_red_triangle: +100 - +100 +0.04 - +0.04 0 - 0 0.0 - 0.0
esp32:esp32:esp32 :small_red_triangle: +128 - +128 +0.01 - +0.01 0 - 0 0.0 - 0.0
rp2040:rp2040:rpipico :small_red_triangle: +96 - +96 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table Board|`examples/SimpleAccelerometer`
flash|%|`examples/SimpleAccelerometer`
RAM for global variables|%|`examples/SimpleGyroscope`
flash|%|`examples/SimpleGyroscope`
RAM for global variables|%|`examples/SimpleMagnetometer`
flash|%|`examples/SimpleMagnetometer`
RAM for global variables|% -|-|-|-|-|-|-|-|-|-|-|-|- `arduino:mbed_edge:edge_control`|64|0.01|0|0.0|64|0.01|0|0.0|64|0.01|0|0.0 `arduino:mbed_nano:nano33ble`|64|0.01|0|0.0|64|0.01|0|0.0|64|0.01|0|0.0 `arduino:mbed_nano:nanorp2040connect`|104|0.0|0|0.0|104|0.0|0|0.0|104|0.0|0|0.0 `arduino:mbed_portenta:envie_m7`|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A `arduino:mbed_portenta:envie_m7:target_core=cm4`|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A `arduino:samd:mkr1000`|100|0.04|0|0.0|100|0.04|0|0.0|100|0.04|0|0.0 `arduino:samd:mkrfox1200`|100|0.04|0|0.0|100|0.04|0|0.0|100|0.04|0|0.0 `arduino:samd:mkrgsm1400`|100|0.04|0|0.0|100|0.04|0|0.0|100|0.04|0|0.0 `arduino:samd:mkrnb1500`|100|0.04|0|0.0|100|0.04|0|0.0|100|0.04|0|0.0 `arduino:samd:mkrvidor4000`|100|0.04|0|0.0|100|0.04|0|0.0|100|0.04|0|0.0 `arduino:samd:mkrwan1300`|100|0.04|0|0.0|100|0.04|0|0.0|100|0.04|0|0.0 `arduino:samd:mkrwan1310`|100|0.04|0|0.0|100|0.04|0|0.0|100|0.04|0|0.0 `arduino:samd:mkrwifi1010`|100|0.04|0|0.0|100|0.04|0|0.0|100|0.04|0|0.0 `arduino:samd:mkrzero`|100|0.04|0|0.0|100|0.04|0|0.0|100|0.04|0|0.0 `esp32:esp32:esp32`|128|0.01|0|0.0|128|0.01|0|0.0|128|0.01|0|0.0 `rp2040:rp2040:rpipico`|96|0.0|0|0.0|96|0.0|0|0.0|96|0.0|0|0.0
Click for full report CSV ``` Board,examples/SimpleAccelerometer
flash,%,examples/SimpleAccelerometer
RAM for global variables,%,examples/SimpleGyroscope
flash,%,examples/SimpleGyroscope
RAM for global variables,%,examples/SimpleMagnetometer
flash,%,examples/SimpleMagnetometer
RAM for global variables,% arduino:mbed_edge:edge_control,64,0.01,0,0.0,64,0.01,0,0.0,64,0.01,0,0.0 arduino:mbed_nano:nano33ble,64,0.01,0,0.0,64,0.01,0,0.0,64,0.01,0,0.0 arduino:mbed_nano:nanorp2040connect,104,0.0,0,0.0,104,0.0,0,0.0,104,0.0,0,0.0 arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A arduino:mbed_portenta:envie_m7:target_core=cm4,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A arduino:samd:mkr1000,100,0.04,0,0.0,100,0.04,0,0.0,100,0.04,0,0.0 arduino:samd:mkrfox1200,100,0.04,0,0.0,100,0.04,0,0.0,100,0.04,0,0.0 arduino:samd:mkrgsm1400,100,0.04,0,0.0,100,0.04,0,0.0,100,0.04,0,0.0 arduino:samd:mkrnb1500,100,0.04,0,0.0,100,0.04,0,0.0,100,0.04,0,0.0 arduino:samd:mkrvidor4000,100,0.04,0,0.0,100,0.04,0,0.0,100,0.04,0,0.0 arduino:samd:mkrwan1300,100,0.04,0,0.0,100,0.04,0,0.0,100,0.04,0,0.0 arduino:samd:mkrwan1310,100,0.04,0,0.0,100,0.04,0,0.0,100,0.04,0,0.0 arduino:samd:mkrwifi1010,100,0.04,0,0.0,100,0.04,0,0.0,100,0.04,0,0.0 arduino:samd:mkrzero,100,0.04,0,0.0,100,0.04,0,0.0,100,0.04,0,0.0 esp32:esp32:esp32,128,0.01,0,0.0,128,0.01,0,0.0,128,0.01,0,0.0 rp2040:rp2040:rpipico,96,0.0,0,0.0,96,0.0,0,0.0,96,0.0,0,0.0 ```
facchinm commented 1 week ago

I would minimize the changes by only taking into account the if (!BOSCH_*_ONLY) when excluding an initialization (to get rid of all the code duplication)

github-actions[bot] commented 1 week ago

Memory usage change @ a7491791f8dabafe349e03fb794a19e36411e77b

Board flash % RAM for global variables %
arduino:mbed_edge:edge_control 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nano:nano33ble 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nano:nanorp2040connect :small_red_triangle: +4 - +4 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:mbed_portenta:envie_m7:target_core=cm4 N/A N/A N/A N/A
arduino:samd:mkr1000 :small_red_triangle: +8 - +8 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrfox1200 :small_red_triangle: +8 - +8 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrgsm1400 :small_red_triangle: +8 - +8 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrnb1500 :small_red_triangle: +8 - +8 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrvidor4000 :small_red_triangle: +8 - +8 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1300 :small_red_triangle: +8 - +8 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1310 :small_red_triangle: +8 - +8 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 :small_red_triangle: +8 - +8 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrzero :small_red_triangle: +8 - +8 0.0 - 0.0 0 - 0 0.0 - 0.0
esp32:esp32:esp32 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
rp2040:rp2040:rpipico :small_red_triangle: +16 - +16 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table Board|`examples/SimpleAccelerometer`
flash|%|`examples/SimpleAccelerometer`
RAM for global variables|%|`examples/SimpleGyroscope`
flash|%|`examples/SimpleGyroscope`
RAM for global variables|%|`examples/SimpleMagnetometer`
flash|%|`examples/SimpleMagnetometer`
RAM for global variables|% -|-|-|-|-|-|-|-|-|-|-|-|- `arduino:mbed_edge:edge_control`|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0 `arduino:mbed_nano:nano33ble`|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0 `arduino:mbed_nano:nanorp2040connect`|4|0.0|0|0.0|4|0.0|0|0.0|4|0.0|0|0.0 `arduino:mbed_portenta:envie_m7`|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A `arduino:mbed_portenta:envie_m7:target_core=cm4`|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A `arduino:samd:mkr1000`|8|0.0|0|0.0|8|0.0|0|0.0|8|0.0|0|0.0 `arduino:samd:mkrfox1200`|8|0.0|0|0.0|8|0.0|0|0.0|8|0.0|0|0.0 `arduino:samd:mkrgsm1400`|8|0.0|0|0.0|8|0.0|0|0.0|8|0.0|0|0.0 `arduino:samd:mkrnb1500`|8|0.0|0|0.0|8|0.0|0|0.0|8|0.0|0|0.0 `arduino:samd:mkrvidor4000`|8|0.0|0|0.0|8|0.0|0|0.0|8|0.0|0|0.0 `arduino:samd:mkrwan1300`|8|0.0|0|0.0|8|0.0|0|0.0|8|0.0|0|0.0 `arduino:samd:mkrwan1310`|8|0.0|0|0.0|8|0.0|0|0.0|8|0.0|0|0.0 `arduino:samd:mkrwifi1010`|8|0.0|0|0.0|8|0.0|0|0.0|8|0.0|0|0.0 `arduino:samd:mkrzero`|8|0.0|0|0.0|8|0.0|0|0.0|8|0.0|0|0.0 `esp32:esp32:esp32`|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0 `rp2040:rp2040:rpipico`|16|0.0|0|0.0|16|0.0|0|0.0|16|0.0|0|0.0
Click for full report CSV ``` Board,examples/SimpleAccelerometer
flash,%,examples/SimpleAccelerometer
RAM for global variables,%,examples/SimpleGyroscope
flash,%,examples/SimpleGyroscope
RAM for global variables,%,examples/SimpleMagnetometer
flash,%,examples/SimpleMagnetometer
RAM for global variables,% arduino:mbed_edge:edge_control,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0 arduino:mbed_nano:nano33ble,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0 arduino:mbed_nano:nanorp2040connect,4,0.0,0,0.0,4,0.0,0,0.0,4,0.0,0,0.0 arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A arduino:mbed_portenta:envie_m7:target_core=cm4,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A arduino:samd:mkr1000,8,0.0,0,0.0,8,0.0,0,0.0,8,0.0,0,0.0 arduino:samd:mkrfox1200,8,0.0,0,0.0,8,0.0,0,0.0,8,0.0,0,0.0 arduino:samd:mkrgsm1400,8,0.0,0,0.0,8,0.0,0,0.0,8,0.0,0,0.0 arduino:samd:mkrnb1500,8,0.0,0,0.0,8,0.0,0,0.0,8,0.0,0,0.0 arduino:samd:mkrvidor4000,8,0.0,0,0.0,8,0.0,0,0.0,8,0.0,0,0.0 arduino:samd:mkrwan1300,8,0.0,0,0.0,8,0.0,0,0.0,8,0.0,0,0.0 arduino:samd:mkrwan1310,8,0.0,0,0.0,8,0.0,0,0.0,8,0.0,0,0.0 arduino:samd:mkrwifi1010,8,0.0,0,0.0,8,0.0,0,0.0,8,0.0,0,0.0 arduino:samd:mkrzero,8,0.0,0,0.0,8,0.0,0,0.0,8,0.0,0,0.0 esp32:esp32:esp32,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0 rp2040:rp2040:rpipico,16,0.0,0,0.0,16,0.0,0,0.0,16,0.0,0,0.0 ```