Skip to content

Commit 710a875

Browse files
authored
Set ARRAY_SIZE to at least 2 records
1 parent f41b2b5 commit 710a875

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/Bluefruit52Lib/examples/Projects/rssi_proximity/rssi_proximity_central/rssi_proximity_central.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* ARRAY_SIZE
3939
* ----------
4040
* The numbers of peripherals tracked and sorted can be set via the
41-
* ARRAY_SIZE macro.
41+
* ARRAY_SIZE macro. Must be at least 2.
4242
*
4343
* TIMEOUT_MS
4444
* ----------
@@ -69,8 +69,8 @@
6969
#define ENABLE_TFT (0) // Set this to 1 to enable ILI9341 TFT display support
7070
#define ENABLE_OLED (0) // Set this to 1 to enable SSD1306 128x32 OLED display support
7171

72-
#if (ARRAY_SIZE <= 0)
73-
#error "ARRAY_SIZE must be a non-zero value"
72+
#if (ARRAY_SIZE <= 1)
73+
#error "ARRAY_SIZE must be at least 2"
7474
#endif
7575
#if (ENABLE_TFT) && (ENABLE_OLED)
7676
#error "ENABLE_TFT and ENABLE_OLED can not both be set at the same time"

0 commit comments

Comments
 (0)