Skip to content

Commit

Permalink
🐛 Field Control Getter Return Value (#627)
Browse files Browse the repository at this point in the history
* Field Control State Getter

* Fixed merge issues

* Removed left over testing code

* change macros to enum/functions

* fix return value issue

* fixed version

---------

Co-authored-by: noam987 <[email protected]>
Co-authored-by: noam987 <[email protected]>
  • Loading branch information
3 people authored Jan 22, 2024
1 parent 9778296 commit 3bd9d77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/devices/controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ uint8_t competition_is_autonomous() {
}

uint8_t competition_is_field() {
return (competition_get_status() & COMPETITION_SYSTEM) != 0;
return ( (competition_get_status() & COMPETITION_SYSTEM) != 0 ) && competition_is_connected();
}

uint8_t competition_is_switch() {
return (competition_get_status() & COMPETITION_SYSTEM) == 0;
return ( (competition_get_status() & COMPETITION_SYSTEM) == 0) && competition_is_connected();
}
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.6
4.0.6

0 comments on commit 3bd9d77

Please sign in to comment.