Julien Lecoeur 2c0539ae9c Move selected power source to inst 0 only if nb bricks > 1
When trying to move the selected power source to the first publication instance
on systems where there is only one power source, the compiler issued the warning
```
../src/modules/sensors/sensors.cpp:512:54: error: array subscript is outside array bounds [-Werror=array-bounds]
         tmp_h = _battery_pub[_battery_pub_intance0ndx];
```
because it could not verify that _battery_pub_intance0ndx would always be 0.

Wrap the block between `#if BOARD_NUMBER_BRICKS > 1 [...] #endif`
to ensure no out of bound subscript and to remove the warning.

Remove unused _battery_pub_intance0ndx variable when nb bricks = 1
2017-08-01 12:59:40 -10:00
..
2017-07-14 11:57:11 +02:00
2017-08-01 12:46:59 +02:00
2017-05-04 22:57:47 +02:00
2017-07-19 19:51:55 -10:00
2017-04-01 20:19:28 +02:00
2017-07-14 11:57:11 +02:00