Skip to content

Commit 27c76a6

Browse files
authored
Merge pull request #218 from LeeLeahy2/no-profile-1
In setup, skip profile display if only one profile exists
2 parents d4c0f37 + 32c6c60 commit 27c76a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Firmware/RTK_Surveyor/Tasks.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ void ButtonCheckTask(void *e)
295295
//If only one active profile do not show any profiles
296296
index = getProfileNumberFromUnit(0);
297297
displayProfile = getProfileNumberFromUnit(1);
298-
setupState = (index >= MAX_PROFILE_COUNT) ? STATE_MARK_EVENT : STATE_PROFILE;
298+
setupState = (index >= displayProfile) ? STATE_MARK_EVENT : STATE_PROFILE;
299299
displayProfile = 0;
300300
break;
301301
case STATE_PROFILE:
@@ -410,7 +410,7 @@ void ButtonCheckTask(void *e)
410410
//If only one active profile do not show any profiles
411411
index = getProfileNumberFromUnit(0);
412412
displayProfile = getProfileNumberFromUnit(1);
413-
setupState = (index >= MAX_PROFILE_COUNT) ? STATE_MARK_EVENT : STATE_PROFILE;
413+
setupState = (index >= displayProfile) ? STATE_MARK_EVENT : STATE_PROFILE;
414414
displayProfile = 0;
415415
break;
416416
case STATE_PROFILE:

0 commit comments

Comments
 (0)