Skip to content

Commit

Permalink
Cleanup compiler warning. (#1010)
Browse files Browse the repository at this point in the history
Resolves #917
  • Loading branch information
h2zero authored Jul 6, 2021
1 parent c556469 commit 2ae8f0c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions main/main.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ struct ReceivedSignal {
uint32_t time;
};
# if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
# define struct_size 12
ReceivedSignal receivedSignal[struct_size] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}};
ReceivedSignal receivedSignal[] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}};
# else // boards with smaller memory
# define struct_size 4
ReceivedSignal receivedSignal[struct_size] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};
ReceivedSignal receivedSignal[] = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};
# endif
# define struct_size (sizeof(receivedSignal) / sizeof(ReceivedSignal))
#endif

#if defined(ESP8266) || defined(ESP32) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
Expand Down

0 comments on commit 2ae8f0c

Please sign in to comment.