Skip to content

Commit 3ea1b0f

Browse files
fix if cn > 360
1 parent 8a272dc commit 3ea1b0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/PDQgraphicstest/PDQgraphicstest.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ int32_t testCircles(uint8_t radius)
568568

569569
int32_t testFillArcs()
570570
{
571-
int16_t i, r = 360 / cn;
571+
int16_t i, r = (360 > cn) ? (360 / cn) : 1;
572572
uint32_t start = micros_start();
573573

574574
for (i = 6; i < cn; i += 6)
@@ -581,7 +581,7 @@ int32_t testFillArcs()
581581

582582
int32_t testArcs()
583583
{
584-
int16_t i, r = 360 / cn;
584+
int16_t i, r = (360 > cn) ? (360 / cn) : 1;
585585
uint32_t start = micros_start();
586586

587587
for (i = 6; i < cn; i += 6)

0 commit comments

Comments
 (0)