From 3bd9d7776c7fd755341011abc35e29da14ca949f Mon Sep 17 00:00:00 2001 From: Yuechan Li <55300543+CChheerryyll@users.noreply.github.com> Date: Mon, 22 Jan 2024 18:34:32 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Field=20Control=20Getter=20Retur?= =?UTF-8?q?n=20Value=20(#627)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 Co-authored-by: noam987 <50681033+noam987@users.noreply.github.com> --- src/devices/controller.c | 4 ++-- version | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/devices/controller.c b/src/devices/controller.c index 89568c6d..a8b23d70 100644 --- a/src/devices/controller.c +++ b/src/devices/controller.c @@ -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(); } \ No newline at end of file diff --git a/version b/version index d13e837c..9eefef7b 100644 --- a/version +++ b/version @@ -1 +1 @@ -4.0.6 +4.0.6 \ No newline at end of file