Skip to content

Commit 11a0871

Browse files
committed
Make the for loop a bit more dynamic
1 parent bc6ea1f commit 11a0871

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

firmware/chipignite/polysat/src/polysat.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ void configure_io() {
8989

9090
// Initiate the serial transfer to configure IO
9191
reg_mprj_xfer = 1;
92-
while (reg_mprj_xfer == 1);
92+
while (reg_mprj_xfer == 1)
93+
;
9394
}
9495

9596
/** @brief Delay in microseconds
@@ -168,7 +169,7 @@ void main() {
168169
pulse = !pulse;
169170

170171
// For every non-zero element in the array, set back to zero and send a packet to the host
171-
for (uint32_t i = 0; i < ARRAY_SIZE; i++) {
172+
for (uint32_t i = 0; i < (uint32_t)(sizeof(zero_array) / sizeof(*zero_array)); i++) {
172173
if (zero_array[i] != 0) {
173174
// When a non-zero element is found (due to radiation), send a packet to the host
174175
struct {

0 commit comments

Comments
 (0)