diff --git a/Makefile b/Makefile index 8a324e51c..8237f39cf 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ template: clean-template library $Dcp $(ROOT)/template-Makefile $(TEMPLATE_DIR)/Makefile $Dmv $(TEMPLATE_DIR)/template-gitignore $(TEMPLATE_DIR)/.gitignore @echo "Creating template" - $Dprosv5 c create-template $(TEMPLATE_DIR) kernel $(shell cat $(ROOT)/version) $(CREATE_TEMPLATE_ARGS) + $Dpros c create-template $(TEMPLATE_DIR) kernel $(shell cat $(ROOT)/version) $(CREATE_TEMPLATE_ARGS) LIBV5RTS_EXTRACTION_DIR=$(BINDIR)/libv5rts $(LIBAR): $(call GETALLOBJ,$(EXCLUDE_SRC_FROM_LIB)) $(EXTRA_LIB_DEPS) diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index f26c68a89..a61f7df38 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -49,7 +49,7 @@ These should be placed at the very start of a file. * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4c3d641e9..8b06cff09 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,7 +20,7 @@ jobs: - task: UsePythonVersion@0 inputs: addToPath: true - versionSpec: '3' + versionSpec: '3.9' - task: PipAuthenticate@1 inputs: artifactFeeds: 'pros-cli' diff --git a/common.mk b/common.mk index 84f7e2190..10ab5d388 100644 --- a/common.mk +++ b/common.mk @@ -201,7 +201,7 @@ library: $(LIBAR) .PHONY: template template: clean-template $(LIBAR) - $Dprosv5 c create-template . $(LIBNAME) $(VERSION) $(foreach file,$(TEMPLATE_FILES) $(LIBAR),--system "$(file)") --target v5 $(CREATE_TEMPLATE_FLAGS) + $Dpros c create-template . $(LIBNAME) $(VERSION) $(foreach file,$(TEMPLATE_FILES) $(LIBAR),--system "$(file)") --target v5 $(CREATE_TEMPLATE_FLAGS) endif # if project is a library source, compile the archive and link output.elf against the archive rather than source objects @@ -280,7 +280,7 @@ $(VV)mkdir -p $(dir $(LDTIMEOBJ)) @# The shell command $$(($$(date +%s)+($$(date +%-z)/100*3600))) fetches the current @# unix timestamp, and then adds the UTC timezone offset to account for time zones. -$(call test_output_2,Adding timestamp ,echo 'const int _PROS_COMPILE_TIMESTAMP_INT = $(shell echo $$(($$(date +%s)+($$(date +%-z)/100*3600)))); char const * const _PROS_COMPILE_TIMESTAMP = __DATE__ " " __TIME__; char const * const _PROS_COMPILE_DIRECTORY = "$(shell pwd | tail -c 23)";' | $(CC) -c -x c $(CFLAGS) $(EXTRA_CFLAGS) -o $(LDTIMEOBJ) -,$(OK_STRING)) +$(call test_output_2,Adding timestamp ,echo 'const int _PROS_COMPILE_TIMESTAMP_INT = $(shell echo $$(($$(date +%s)+($$(date +%-z)/100*3600)))); char const * const _PROS_COMPILE_TIMESTAMP = __DATE__ " " __TIME__; char const * const _PROS_COMPILE_DIRECTORY = "$(wildcard $(shell pwd | tail -c 23))";' | $(CC) -c -x c $(CFLAGS) $(EXTRA_CFLAGS) -o $(LDTIMEOBJ) -,$(OK_STRING)) endef # these rules are for build-compile-commands, which just print out sysroot information diff --git a/include/api.h b/include/api.h index 718030d13..7e9231994 100644 --- a/include/api.h +++ b/include/api.h @@ -8,7 +8,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public @@ -40,9 +40,9 @@ #endif /* __cplusplus */ #define PROS_VERSION_MAJOR 3 -#define PROS_VERSION_MINOR 7 -#define PROS_VERSION_PATCH 3 -#define PROS_VERSION_STRING "3.7.3" +#define PROS_VERSION_MINOR 8 +#define PROS_VERSION_PATCH 0 +#define PROS_VERSION_STRING "3.8.0" #include "pros/adi.h" #include "pros/colors.h" diff --git a/include/common/cobs.h b/include/common/cobs.h index b564e524c..7388cc182 100644 --- a/include/common/cobs.h +++ b/include/common/cobs.h @@ -5,7 +5,7 @@ * * See common/cobs.c for discussion * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/common/gid.h b/include/common/gid.h index 3eacfdf7f..adeac51ac 100644 --- a/include/common/gid.h +++ b/include/common/gid.h @@ -5,7 +5,7 @@ * * See common/gid.c for discussion * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/common/linkedlist.h b/include/common/linkedlist.h index 3793ba76e..098686a52 100644 --- a/include/common/linkedlist.h +++ b/include/common/linkedlist.h @@ -6,7 +6,7 @@ * This file defines a linked list implementation that operates on the FreeRTOS * heap, and is able to generically store function pointers and data * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/common/set.h b/include/common/set.h index 3a42faa50..a2497f0c4 100644 --- a/include/common/set.h +++ b/include/common/set.h @@ -5,7 +5,7 @@ * * See common/set.c for discussion * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/common/string.h b/include/common/string.h index 269a0aed6..55759d8c9 100644 --- a/include/common/string.h +++ b/include/common/string.h @@ -5,7 +5,7 @@ * * See common/string.c for discussion * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/kapi.h b/include/kapi.h index fdb068ef6..ccbde870d 100644 --- a/include/kapi.h +++ b/include/kapi.h @@ -8,7 +8,7 @@ * creation of statically allocated FreeRTOS primitives like tasks, semaphores, * and queues. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/main.h b/include/main.h index bc408a850..288056ef5 100644 --- a/include/main.h +++ b/include/main.h @@ -4,7 +4,7 @@ * Contains common definitions and header files used throughout your PROS * project. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public @@ -22,7 +22,7 @@ * * For instance, E_CONTROLLER_MASTER has a shorter name: CONTROLLER_MASTER. * E_CONTROLLER_MASTER is pedantically correct within the PROS styleguide, but - * not convienent for most student programmers. + * not convenient for most student programmers. */ #define PROS_USE_SIMPLE_NAMES diff --git a/include/pros/adi.h b/include/pros/adi.h index c06176adb..8f0f556f2 100644 --- a/include/pros/adi.h +++ b/include/pros/adi.h @@ -8,7 +8,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/adi.hpp b/include/pros/adi.hpp index 6dc99ef5f..c2fd258d3 100644 --- a/include/pros/adi.hpp +++ b/include/pros/adi.hpp @@ -8,7 +8,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -494,10 +494,13 @@ class ADIEncoder : private ADIPort { * sensor with the removable cover side up, and the "bottom" wire from * the encoder sensor * \param reverse - * If "true", the sensor will count in theopposite direction + * If "true", the sensor will count in the opposite direction */ ADIEncoder(ext_adi_port_tuple_t port_tuple, bool reversed = false); + // Delete copy constructor to prevent a compilation error from the constructor above. + ADIEncoder(ADIEncoder &) = delete; + /** * Sets the encoder value to zero. * diff --git a/include/pros/api_legacy.h b/include/pros/api_legacy.h index 068f7e8a5..deb7d2225 100644 --- a/include/pros/api_legacy.h +++ b/include/pros/api_legacy.h @@ -10,7 +10,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/pros/apix.h b/include/pros/apix.h index 8e7d3068c..876a98c8c 100644 --- a/include/pros/apix.h +++ b/include/pros/apix.h @@ -12,7 +12,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/pros/distance.h b/include/pros/distance.h index b7feda198..783da8fda 100644 --- a/include/pros/distance.h +++ b/include/pros/distance.h @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/error.h b/include/pros/error.h index 8485978a6..a7e4e54eb 100644 --- a/include/pros/error.h +++ b/include/pros/error.h @@ -6,7 +6,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/ext_adi.h b/include/pros/ext_adi.h index 48e79096c..f75ee0512 100644 --- a/include/pros/ext_adi.h +++ b/include/pros/ext_adi.h @@ -8,7 +8,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/gps.h b/include/pros/gps.h index 1af417bcf..1b2e7e7ba 100644 --- a/include/pros/gps.h +++ b/include/pros/gps.h @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/gps.hpp b/include/pros/gps.hpp index 0d8b731c1..fce40c2a4 100644 --- a/include/pros/gps.hpp +++ b/include/pros/gps.hpp @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/imu.h b/include/pros/imu.h index 59116eee2..f5a1cdc3d 100644 --- a/include/pros/imu.h +++ b/include/pros/imu.h @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/imu.hpp b/include/pros/imu.hpp index 84272b0a5..99b28c8df 100644 --- a/include/pros/imu.hpp +++ b/include/pros/imu.hpp @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/link.h b/include/pros/link.h index f370b7e36..212834cc9 100644 --- a/include/pros/link.h +++ b/include/pros/link.h @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/link.hpp b/include/pros/link.hpp index d44c6bd54..d6c18f3ae 100644 --- a/include/pros/link.hpp +++ b/include/pros/link.hpp @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2021, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/llemu.h b/include/pros/llemu.h index 4cb792b3b..8a6d75709 100644 --- a/include/pros/llemu.h +++ b/include/pros/llemu.h @@ -13,7 +13,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/llemu.hpp b/include/pros/llemu.hpp index 8818eddbf..a4834e021 100644 --- a/include/pros/llemu.hpp +++ b/include/pros/llemu.hpp @@ -13,7 +13,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/misc.h b/include/pros/misc.h index 0b6c923fb..16cba5508 100644 --- a/include/pros/misc.h +++ b/include/pros/misc.h @@ -10,7 +10,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reservered. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/pros/misc.hpp b/include/pros/misc.hpp index 2415c2f12..7fcb4b545 100644 --- a/include/pros/misc.hpp +++ b/include/pros/misc.hpp @@ -10,7 +10,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reservered. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/pros/motors.h b/include/pros/motors.h index 51ee02f4c..737109244 100644 --- a/include/pros/motors.h +++ b/include/pros/motors.h @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/motors.hpp b/include/pros/motors.hpp index da330a9c1..10925990f 100644 --- a/include/pros/motors.hpp +++ b/include/pros/motors.hpp @@ -461,6 +461,7 @@ class Motor { * * \return The motor's voltage in mV or PROS_ERR_F if the operation failed, * setting errno. + * */ virtual std::int32_t get_voltage(void) const; @@ -859,8 +860,11 @@ class Motor { class Motor_Group { public: - explicit Motor_Group(const std::initializer_list motors); - explicit Motor_Group(const std::vector motor_ports); + Motor_Group(const std::initializer_list motors); + explicit Motor_Group(const std::vector& motors); + explicit Motor_Group(const std::initializer_list motor_ports); + explicit Motor_Group(const std::vector motor_ports); // Pass by value to preserve ABI + /****************************************************************************/ /** Motor Group movement functions **/ /** **/ @@ -1014,6 +1018,101 @@ class Motor_Group { * failed, setting errno. */ std::int32_t brake(void); + + /* + * Gets the voltages delivered to the motors in millivolts. + * + * This function uses the following values of errno when an error state is + * reached: + * ENODEV - The port cannot be configured as a motor + * EACCESS - The Motor group mutex can't be taken or given + * + * \return The voltage of the motor in millivolts or PROS_ERR_F if the operation + * failed, setting errno. + * + * \b Example + * \code + * void opcontrol() { + * pros::Motor_Group motors({1, 2}); + * std::vector voltages; + * while (true) { + * voltages = motors.get_voltages(); + * + * for (uint32_t i = 0; i < voltages.size(); i++) { + * printf("Voltages: %ld\n", voltages[i]); + * } + * pros::delay(20); + * } + * } + * \endcode + * + */ + std::vector get_voltages(void); + + /* + * Get the voltage limits of the motors set by the user. + * + * This function uses the following values of errno when an error state is + * reached: + * ENODEV - The port cannot be configured as a motor + * EACCESS - The Motor group mutex can't be taken or given + * + * \return The voltage limit of the motor in millivolts or PROS_ERR_F if the operation + * failed, setting errno. + * + * \b Example + * \code + * void opcontrol() { + * pros::Motor_Group motors({1, 2}); + * std::vector voltage_limits; + * while (true) { + * voltage_limits = motors.get_voltage_limits(); + * + * for (uint32_t i = 0; i < voltage_limits.size(); i++) { + * printf("Voltage Limits: %ld\n", voltage_limits[i]); + * } + * pros::delay(20); + * } + * } + * \endcode + */ + std::vector get_voltage_limits(void); + + /* + * Gets the raw encoder positions of a motor group at a given timestamp. + * + * This function uses the following values of errno when an error state is + * reached: + * ENODEV - The port cannot be configured as a motor + * EACCESS - The Motor group mutex can't be taken or given + * + * \return A vector of the raw encoder positions of the motors in the motor group + * based on the timestamps passed in. If a timestamp is not found for a motor, the + * value at that index will be PROS_ERR. + * + * \b Example + * \code + * void opcontrol() { + * pros::Motor_Group motors({1, 2}); + * std::vector timestamps; + * std::vector positions; + * std::uint32_t temp = 0; + * std::uint32_t temp2 = 0; + * timestamps.push_back(&temp); + * timestamps.push_back(&temp2); + * + * while (true) { + * positions = motors.get_raw_positions(timestamps); + * + * printf("Position: %ld, Time: %ln\n", positions[0], timestamps[0]); + * printf("Position: %ld, Time: %ln\n", positions[1], timestamps[1]); + * + * pros::delay(20); + * } + * } + * \endcode + */ + std::vector get_raw_positions(std::vector ×tamps); /****************************************************************************/ /** Motor configuration functions **/ /** **/ @@ -1036,6 +1135,20 @@ class Motor_Group { pros::Motor& operator[](int i); + /** + * Indexes Motor in the Motor_Group. + * + * This function uses the following values of errno when an error state is + * reached: + * Throws an std::out_of_range error when indexing out of range + * + * \param i + * The index value in the motor group. + * + * \return the appropriate Motor reference. + */ + pros::Motor& at(int i); + /** * Indexes Motor in the Motor_Group in the same way as an array. * @@ -1341,6 +1454,19 @@ class Motor_Group { * E_MOTOR_ENCODER_INVALID if the operation failed. */ std::vector get_encoder_units(void); + + /** + * Gets the encoder units that were set for each motor. + * + * This function uses the following values of errno when an error state is + * reached: + * ENODEV - The port cannot be configured as a motor + * EACCESS - The Motor group mutex can't be taken or given + * + * \return The vector filled with motors' temperature in degrees Celsius or PROS_ERR_F if the + * operation failed, setting errno. + */ + virtual std::vector get_temperatures(void); private: std::vector _motors; diff --git a/include/pros/optical.h b/include/pros/optical.h index c3cace989..9dd1c1b0d 100644 --- a/include/pros/optical.h +++ b/include/pros/optical.h @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -265,6 +265,39 @@ int32_t optical_enable_gesture(uint8_t port); */ int32_t optical_disable_gesture(uint8_t port); +/** + * Get integration time (update rate) of the optical sensor in milliseconds, with + * minimum time being + * + * This function uses the following values of errno when an error state is + * reached: + * ENXIO - The given value is not within the range of V5 ports (1-21). + * ENODEV - The port cannot be configured as an Optical Sensor + * + * \param port + * The V5 Optical Sensor port number from 1-21 + * \return Integration time in milliseconds if the operation is successful + * or PROS_ERR if the operation failed, setting errno. + */ +double optical_get_integration_time(uint8_t port); + +/** + * Set integration time (update rate) of the optical sensor in milliseconds. + * + * This function uses the following values of errno when an error state is + * reached: + * ENXIO - The given value is not within the range of V5 ports (1-21). + * ENODEV - The port cannot be configured as an Optical Sensor + * + * \param port + * The V5 Optical Sensor port number from 1-21 + * \param time + * The desired integration time in milliseconds + * \return 1 if the operation is successful or PROS_ERR if the operation failed, + * setting errno. + */ +int32_t optical_set_integration_time(uint8_t port, double time); + #ifdef __cplusplus } } diff --git a/include/pros/optical.hpp b/include/pros/optical.hpp index 783520d4f..006108d63 100644 --- a/include/pros/optical.hpp +++ b/include/pros/optical.hpp @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -41,6 +41,8 @@ class Optical { */ explicit Optical(const std::uint8_t port); + explicit Optical(std::uint8_t port, double time); + /** * Get the detected color hue * @@ -219,6 +221,36 @@ class Optical { */ virtual std::int32_t disable_gesture(); + /** + * Set integration time (update rate) of the optical sensor in milliseconds, with + * minimum time being 3 ms and maximum time being 712 ms. Default is 100 ms, with the + * optical sensor communciating with the V5 brain every 20 ms. + * + * This function uses the following values of errno when an error state is + * reached: + * ENXIO - The given value is not within the range of V5 ports (1-21). + * ENODEV - The port cannot be configured as an Optical Sensor + * + * \return 1 if the operation is successful or PROS_ERR_F if the operation failed, + * setting errno. + */ + double get_integration_time(); + + /** + * Get integration time (update rate) of the optical sensor in milliseconds. + * + * This function uses the following values of errno when an error state is + * reached: + * ENXIO - The given value is not within the range of V5 ports (1-21). + * ENODEV - The port cannot be configured as an Optical Sensor + * + * \param time + * The desired integration time in milliseconds + * \return Integration time in milliseconds if the operation is successful + * or PROS_ERR if the operation failed, setting errno. + */ + std::int32_t set_integration_time(double time); + /** * Gets the port number of the Optical Sensor. * diff --git a/include/pros/rotation.h b/include/pros/rotation.h index 197936ac5..8daf2fd89 100644 --- a/include/pros/rotation.h +++ b/include/pros/rotation.h @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/rotation.hpp b/include/pros/rotation.hpp index c53ab7b1e..a063eda21 100644 --- a/include/pros/rotation.hpp +++ b/include/pros/rotation.hpp @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/rtos.h b/include/pros/rtos.h index 3afdb24a4..c07673427 100644 --- a/include/pros/rtos.h +++ b/include/pros/rtos.h @@ -10,7 +10,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/pros/rtos.hpp b/include/pros/rtos.hpp index 0cd0d6c6e..2505f1d1c 100644 --- a/include/pros/rtos.hpp +++ b/include/pros/rtos.hpp @@ -10,7 +10,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/pros/screen.h b/include/pros/screen.h index 4cffe76c1..8076daa94 100644 --- a/include/pros/screen.h +++ b/include/pros/screen.h @@ -5,7 +5,7 @@ * * Contains user calls to the v5 screen for touching and displaying graphics. * - * \copyright (c) 2017-2021, Purdue University ACM SIGBots. + * \copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/screen.hpp b/include/pros/screen.hpp index 3aecd188f..d7f6c08e8 100644 --- a/include/pros/screen.hpp +++ b/include/pros/screen.hpp @@ -5,7 +5,7 @@ * * Contains user calls to the v5 screen for touching and displaying graphics. * - * \copyright (c) 2017, Purdue University ACM SIGBots. + * \copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/serial.h b/include/pros/serial.h index 6db69cd08..357aa107c 100644 --- a/include/pros/serial.h +++ b/include/pros/serial.h @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/pros/vision.h b/include/pros/vision.h index 8464b6c3f..33918c785 100644 --- a/include/pros/vision.h +++ b/include/pros/vision.h @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/pros/vision.hpp b/include/pros/vision.hpp index eeb004629..e40af9b8c 100644 --- a/include/pros/vision.hpp +++ b/include/pros/vision.hpp @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/system/dev/banners.h b/include/system/dev/banners.h index 802abafae..e327cf9c1 100644 --- a/include/system/dev/banners.h +++ b/include/system/dev/banners.h @@ -7,7 +7,7 @@ * * See system/dev/serial_daemon.c for discussion * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/system/dev/dev.h b/include/system/dev/dev.h index 16bd76c8f..be6848375 100644 --- a/include/system/dev/dev.h +++ b/include/system/dev/dev.h @@ -3,7 +3,7 @@ * * Generic Serial Device driver header * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/system/dev/ser.h b/include/system/dev/ser.h index 56bc83108..2c5f4d384 100644 --- a/include/system/dev/ser.h +++ b/include/system/dev/ser.h @@ -5,7 +5,7 @@ * * See system/dev/ser_driver.c and system/dev/ser_daemon.c for discussion * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/system/dev/usd.h b/include/system/dev/usd.h index 3f39dd27c..d4b56a1ac 100644 --- a/include/system/dev/usd.h +++ b/include/system/dev/usd.h @@ -5,7 +5,7 @@ * * See system/dev/usd_driver.c for discussion * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/system/dev/vfs.h b/include/system/dev/vfs.h index b8582202a..ddf6b4993 100644 --- a/include/system/dev/vfs.h +++ b/include/system/dev/vfs.h @@ -5,7 +5,7 @@ * * See system/dev/vfs.c for discussion * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/system/optimizers.h b/include/system/optimizers.h index 123beaa4f..e98b2f046 100644 --- a/include/system/optimizers.h +++ b/include/system/optimizers.h @@ -5,7 +5,7 @@ * * Probably shouldn't use anything from this header * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/include/vdml/port.h b/include/vdml/port.h index fd2327e16..7f43be86c 100644 --- a/include/vdml/port.h +++ b/include/vdml/port.h @@ -1,3 +1,19 @@ +/** + * \file vdml/port.h + * + * This file contains the standard header info for port macros and bit masks, + * used mostly for the adi expander. + * + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. + * All rights reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef _VDML_PORT_H_ +#define _VDML_PORT_H_ + #define SMART_PORT_BITS 16 #define SMART_PORT_MASK ((1 << SMART_PORT_BITS) - 1) @@ -14,4 +30,6 @@ static inline uint32_t merge_adi_ports(uint8_t smart_port, uint8_t adi_port) { return (adi_port << SMART_PORT_BITS) | smart_port; -} \ No newline at end of file +} + +#endif diff --git a/include/vdml/registry.h b/include/vdml/registry.h index 0df19e266..7157e2ab2 100644 --- a/include/vdml/registry.h +++ b/include/vdml/registry.h @@ -4,7 +4,7 @@ * This file contains the standard header info for the VDML (Vex Data Management * Layer) registry. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/include/vdml/vdml.h b/include/vdml/vdml.h index 65848ac47..f9fb36089 100644 --- a/include/vdml/vdml.h +++ b/include/vdml/vdml.h @@ -4,7 +4,7 @@ * This file contains all types and functions used throughout multiple VDML * (Vex Data Management Layer) files. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/common/cobs.c b/src/common/cobs.c index 599f64cff..13742500a 100644 --- a/src/common/cobs.c +++ b/src/common/cobs.c @@ -6,7 +6,7 @@ * Contains an implementation of Consistent Overhead Byte Stuffing, adapted from * https://github.com/jacquesf/COBS-Consistent-Overhead-Byte-Stuffing * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/common/gid.c b/src/common/gid.c index 91d1da339..d22eea00f 100644 --- a/src/common/gid.c +++ b/src/common/gid.c @@ -6,7 +6,7 @@ * Contains an implementation to efficiently assign globally unique IDs * e.g. to assign entries in a global table * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/common/linkedlist.c b/src/common/linkedlist.c index 3b716834f..936702610 100644 --- a/src/common/linkedlist.c +++ b/src/common/linkedlist.c @@ -6,7 +6,7 @@ * This file defines a linked list implementation that operates on the FreeRTOS * heap, and is able to generically store function pointers and data * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/common/set.c b/src/common/set.c index f84c9684e..f2b622e52 100644 --- a/src/common/set.c +++ b/src/common/set.c @@ -5,7 +5,7 @@ * It's used to check which streams are enabled in ser_driver for the moment, * but also has list_contains which may be useful in other contexts. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/common/string.c b/src/common/string.c index d585e5dff..9a482848b 100644 --- a/src/common/string.c +++ b/src/common/string.c @@ -4,7 +4,7 @@ * Contains extra string functions useful for PROS and kstrdup/kstrndup which * use the kernel heap instead of the user heap * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/devices/battery.c b/src/devices/battery.c index 57b9f1e7b..22ca6a3b0 100644 --- a/src/devices/battery.c +++ b/src/devices/battery.c @@ -3,7 +3,7 @@ * * Contains functions for interacting with the V5 Battery. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/devices/battery.cpp b/src/devices/battery.cpp index 09befbcce..8bff2b06e 100644 --- a/src/devices/battery.cpp +++ b/src/devices/battery.cpp @@ -3,7 +3,7 @@ * * Contains functions for interacting with the V5 Battery. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/devices/controller.c b/src/devices/controller.c index 5da9b27e6..905c2a9ca 100644 --- a/src/devices/controller.c +++ b/src/devices/controller.c @@ -3,7 +3,7 @@ * * Contains functions for interacting with the V5 Controller. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/devices/controller.cpp b/src/devices/controller.cpp index d396c58af..66cf15f96 100644 --- a/src/devices/controller.cpp +++ b/src/devices/controller.cpp @@ -4,7 +4,7 @@ * Contains functions for interacting with the V5 Controller, as well as the * competition control functions. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/devices/registry.c b/src/devices/registry.c index 181149ac9..634f23df6 100644 --- a/src/devices/registry.c +++ b/src/devices/registry.c @@ -5,7 +5,7 @@ * what devices are in use on the V5. Therefore, in order to use V5 devices with * PROS, they must be registered and deregistered using the registry. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml.c b/src/devices/vdml.c index 0bb5c9956..20e0208b5 100644 --- a/src/devices/vdml.c +++ b/src/devices/vdml.c @@ -6,7 +6,7 @@ * VDML ensures thread saftey for operations on smart devices by maintaining * an array of RTOS Mutexes and implementing functions to take and give them. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_adi.c b/src/devices/vdml_adi.c index 309efa879..1ce0ceb7f 100644 --- a/src/devices/vdml_adi.c +++ b/src/devices/vdml_adi.c @@ -3,7 +3,7 @@ * * Contains functions for interacting with the V5 ADI. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_adi.cpp b/src/devices/vdml_adi.cpp index c1f4ccbe1..419adecb6 100644 --- a/src/devices/vdml_adi.cpp +++ b/src/devices/vdml_adi.cpp @@ -3,7 +3,7 @@ * * Contains functions for interacting with the V5 ADI. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_distance.c b/src/devices/vdml_distance.c index 42c322938..27f860c8e 100644 --- a/src/devices/vdml_distance.c +++ b/src/devices/vdml_distance.c @@ -3,7 +3,7 @@ * * Contains functions for interacting with the VEX Distance sensor. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -50,4 +50,4 @@ double distance_get_object_velocity(uint8_t port) { ERROR_DISTANCE_BAD_PORT(device, PROS_ERR); double rtn = vexDeviceDistanceObjectVelocityGet(device->device_info); return_port(port - 1, rtn); -} \ No newline at end of file +} diff --git a/src/devices/vdml_distance.cpp b/src/devices/vdml_distance.cpp index 3c2e5180d..72c1514a3 100644 --- a/src/devices/vdml_distance.cpp +++ b/src/devices/vdml_distance.cpp @@ -3,7 +3,7 @@ * * Contains functions for interacting with the VEX Distance sensor. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_ext_adi.c b/src/devices/vdml_ext_adi.c index 6a0731662..76de6db93 100644 --- a/src/devices/vdml_ext_adi.c +++ b/src/devices/vdml_ext_adi.c @@ -3,7 +3,7 @@ * * Contains functions for interacting with the V5 3-Wire Expander. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_gps.c b/src/devices/vdml_gps.c index 4045439aa..93b155006 100644 --- a/src/devices/vdml_gps.c +++ b/src/devices/vdml_gps.c @@ -3,7 +3,7 @@ * * Contains functions for interacting with the VEX GPS. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_gps.cpp b/src/devices/vdml_gps.cpp index a4dee3d3f..bc0d4e85a 100644 --- a/src/devices/vdml_gps.cpp +++ b/src/devices/vdml_gps.cpp @@ -3,7 +3,7 @@ * * Contains functions for interacting with the VEX GPS. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_imu.c b/src/devices/vdml_imu.c index abdfe0655..b4cf27a9f 100644 --- a/src/devices/vdml_imu.c +++ b/src/devices/vdml_imu.c @@ -3,7 +3,7 @@ * * Contains functions for interacting with the VEX Inertial sensor. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_imu.cpp b/src/devices/vdml_imu.cpp index 46f3006f8..948c1294f 100644 --- a/src/devices/vdml_imu.cpp +++ b/src/devices/vdml_imu.cpp @@ -3,7 +3,7 @@ * * Contains functions for interacting with the VEX Inertial sensor. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_link.c b/src/devices/vdml_link.c index 927487f8a..648aa59af 100644 --- a/src/devices/vdml_link.c +++ b/src/devices/vdml_link.c @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_link.cpp b/src/devices/vdml_link.cpp index 598c5865d..b8f657279 100644 --- a/src/devices/vdml_link.cpp +++ b/src/devices/vdml_link.cpp @@ -9,7 +9,7 @@ * This file should not be modified by users, since it gets replaced whenever * a kernel upgrade occurs. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_motors.c b/src/devices/vdml_motors.c index 8569dc358..0f75a8316 100644 --- a/src/devices/vdml_motors.c +++ b/src/devices/vdml_motors.c @@ -3,7 +3,7 @@ * * Contains functions for interacting with the V5 Motors. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -385,8 +385,7 @@ motor_pid_full_s_t motor_get_pos_pid(uint8_t port) { rtn.limit = pid.limit; rtn.threshold = pid.threshold; rtn.loopspeed = pid.loopspeed; - port_mutex_give(port - 1); - return rtn; + return_port(port - 1, rtn); } motor_pid_full_s_t motor_get_vel_pid(uint8_t port) { @@ -412,8 +411,7 @@ motor_pid_full_s_t motor_get_vel_pid(uint8_t port) { rtn.limit = pid.limit; rtn.threshold = pid.threshold; rtn.loopspeed = pid.loopspeed; - port_mutex_give(port - 1); - return rtn; + return_port(port - 1, rtn); } int32_t motor_is_reversed(uint8_t port) { @@ -425,5 +423,5 @@ int32_t motor_is_reversed(uint8_t port) { int32_t motor_get_voltage_limit(uint8_t port) { claim_port_i(port - 1, E_DEVICE_MOTOR); int32_t rtn = vexDeviceMotorVoltageLimitGet(device->device_info); - return_port(rtn, port - 1); + return_port(port - 1, rtn); } diff --git a/src/devices/vdml_motors.cpp b/src/devices/vdml_motors.cpp index 7c197d33d..a270cbc8b 100644 --- a/src/devices/vdml_motors.cpp +++ b/src/devices/vdml_motors.cpp @@ -3,7 +3,7 @@ * * Contains functions for interacting with the V5 Motors. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -339,11 +339,20 @@ Motor_Group::Motor_Group(const std::initializer_list motors) assert(_motor_count > 0); } +Motor_Group::Motor_Group(const std::vector& motors) + : _motors(motors), _motor_group_mutex(pros::Mutex()), _motor_count(motors.size()) {} + +Motor_Group::Motor_Group(const std::initializer_list motor_ports) + : _motor_group_mutex(pros::Mutex()), _motor_count(motor_ports.size()) { + for (auto& i : motor_ports) { + _motors.emplace_back(i); + } +} + Motor_Group::Motor_Group(const std::vector motor_ports) : _motor_group_mutex(pros::Mutex()), _motor_count(motor_ports.size()) { - assert(_motor_count > 0); - for (std::uint8_t i = 0; i < _motor_count; ++i) { - _motors.push_back(Motor(motor_ports[i])); + for (auto& i: motor_ports) { + _motors.emplace_back(i); } } @@ -375,6 +384,13 @@ pros::Motor& Motor_Group::operator[](int i) { return _motors.at(i); } +pros::Motor& Motor_Group::at(int i) { + if (i >= _motor_count || _motors.empty()) { + throw std::out_of_range("Out of Range! Motor_Group for at() method is out of range"); + } + return _motors[i]; +} + std::int32_t Motor_Group::size() { return _motor_count; } @@ -444,6 +460,16 @@ std::int32_t Motor_Group::set_reversed(const bool reversed) { return out; } +std::vector Motor_Group::get_temperatures(void) { + std::vector out; + claim_mg_mutex_vector(PROS_ERR_F); + for (Motor motor : _motors) { + out.push_back(motor.get_temperature()); + } + give_mg_mutex_vector(PROS_ERR_F); + return out; +} + std::int32_t Motor_Group::set_voltage_limit(const std::int32_t limit) { claim_mg_mutex(PROS_ERR); std::int32_t out = PROS_SUCCESS; @@ -475,6 +501,50 @@ std::int32_t Motor_Group::tare_position(void) { return out; } +std::vector Motor_Group::get_voltages(void) { + std::vector out; + claim_mg_mutex_vector(PROS_ERR); + for (Motor motor : _motors) { + out.push_back(motor.get_voltage()); + } + give_mg_mutex_vector(PROS_ERR); + return out; +} + +std::vector Motor_Group::get_voltage_limits(void) { + std::vector out; + claim_mg_mutex_vector(PROS_ERR); + for (Motor &motor : _motors) { + out.push_back(motor.get_voltage_limit()); + } + give_mg_mutex_vector(PROS_ERR); + return out; +} + +std::vector Motor_Group::get_raw_positions(std::vector ×tamps) { + // Create a vector size of the number of motors and fill it with PROS_ERR + std::vector out(_motors.size(), PROS_ERR); + claim_mg_mutex_vector(PROS_ERR); + if (timestamps.empty()) { + // If the timestamps vector is null, return a vector of PROS_ERR + give_mg_mutex_vector(PROS_ERR); + return out; + } + // Find the minimum between the number of motors and the number of timestamps + // Use this to know how many times to iterate through the loop + // To prevent a segfault if vector of timestamps smaller than the number of motors + // If the timestamps vector larger than motor, the extra timestamps will be ignored + int min_iter = std::min(_motors.size(), timestamps.size()); + for (int i = 0; i < min_iter; i++) { + // Check timestamp is not nullptr before getting the raw position + if (timestamps[i] != nullptr) { + out[i] = _motors[i].get_raw_position(timestamps[i]); + } + } + give_mg_mutex_vector(PROS_ERR); + return out; +} + std::vector Motor_Group::get_target_positions(void) { std::vector out; claim_mg_mutex_vector(PROS_ERR_F); diff --git a/src/devices/vdml_optical.c b/src/devices/vdml_optical.c index 767f899b3..28dc47228 100644 --- a/src/devices/vdml_optical.c +++ b/src/devices/vdml_optical.c @@ -3,7 +3,7 @@ * * Contains functions for interacting with the VEX Optical sensor. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -17,6 +17,11 @@ #include "vdml/registry.h" #include "vdml/vdml.h" +// Source for these figures: +// https://www.vexforum.com/t/v5-optical-sensor-refresh-rate/109632/9 +#define MIN_INTEGRATION_TIME 3 // ms +#define MAX_INTEGRATION_TIME 712 // ms + double optical_get_hue(uint8_t port) { claim_port_i(port - 1, E_DEVICE_OPTICAL); double rtn = vexDeviceOpticalHueGet(device->device_info); @@ -134,3 +139,20 @@ int32_t optical_disable_gesture(uint8_t port) { vexDeviceOpticalGestureDisable(device->device_info); return_port(port - 1, PROS_SUCCESS); } + +double optical_get_integration_time(uint8_t port) { + claim_port_f(port - 1, E_DEVICE_OPTICAL); + double rtv = vexDeviceOpticalIntegrationTimeGet(device->device_info); + return_port(port - 1, rtv); +} + +int32_t optical_set_integration_time(uint8_t port, double time) { + claim_port_i(port - 1, E_DEVICE_OPTICAL); + // going to set the time to minimum of 3 ms, 3 ms is possible but impractical. + time = time < MIN_INTEGRATION_TIME ? MIN_INTEGRATION_TIME : time; + // also boundary limit max integration time too + time = time > MAX_INTEGRATION_TIME ? MAX_INTEGRATION_TIME : time; + + vexDeviceOpticalIntegrationTimeSet(device->device_info, time); + return_port(port - 1, PROS_SUCCESS); +} diff --git a/src/devices/vdml_optical.cpp b/src/devices/vdml_optical.cpp index 82b53c78f..8674495c5 100644 --- a/src/devices/vdml_optical.cpp +++ b/src/devices/vdml_optical.cpp @@ -3,7 +3,7 @@ * * Contains functions for interacting with the VEX Optical sensor. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -17,6 +17,10 @@ using namespace pros::c; Optical::Optical(std::uint8_t port): _port(port){} +Optical::Optical(std::uint8_t port, double time): _port(port){ + set_integration_time(time); +} + double Optical::get_hue(){ return optical_get_hue(_port); } @@ -65,7 +69,16 @@ std::int32_t Optical::disable_gesture(){ return optical_disable_gesture(_port); } +double Optical::get_integration_time() { + return optical_get_integration_time(_port); +} + +std::int32_t Optical::set_integration_time(double time) { + return optical_set_integration_time(_port, time); +} + std::uint8_t Optical::get_port(){ return _port; } -} \ No newline at end of file + +} // namespace pros diff --git a/src/devices/vdml_rotation.c b/src/devices/vdml_rotation.c index 9fcc8e896..b0c256738 100644 --- a/src/devices/vdml_rotation.c +++ b/src/devices/vdml_rotation.c @@ -3,7 +3,7 @@ * * Contains functions for interacting with the VEX Rotation sensor. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_rotation.cpp b/src/devices/vdml_rotation.cpp index 54435f77f..74adf33bb 100644 --- a/src/devices/vdml_rotation.cpp +++ b/src/devices/vdml_rotation.cpp @@ -3,7 +3,7 @@ * * Contains functions for interacting with the VEX Rotation sensor. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_serial.c b/src/devices/vdml_serial.c index a91a76c72..0e3e009d0 100644 --- a/src/devices/vdml_serial.c +++ b/src/devices/vdml_serial.c @@ -3,7 +3,7 @@ * * Contains functions for interacting with V5 Generic Serial devices. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_serial.cpp b/src/devices/vdml_serial.cpp index 92f05351d..3335d6421 100644 --- a/src/devices/vdml_serial.cpp +++ b/src/devices/vdml_serial.cpp @@ -3,7 +3,7 @@ * * Contains functions for interacting with V5 Generic Serial devices. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_usd.c b/src/devices/vdml_usd.c index c3307fd39..879f6525f 100644 --- a/src/devices/vdml_usd.c +++ b/src/devices/vdml_usd.c @@ -3,7 +3,7 @@ * * Contains functions for interacting with the SD card. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/devices/vdml_usd.cpp b/src/devices/vdml_usd.cpp index 59a742601..71318463c 100644 --- a/src/devices/vdml_usd.cpp +++ b/src/devices/vdml_usd.cpp @@ -3,7 +3,7 @@ * * Contains functions for interacting with the SD card. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/devices/vdml_vision.c b/src/devices/vdml_vision.c index 8d6d015d3..9c8cb4dd4 100644 --- a/src/devices/vdml_vision.c +++ b/src/devices/vdml_vision.c @@ -3,7 +3,7 @@ * * Contains functions for interacting with the V5 Vision Sensor. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/devices/vdml_vision.cpp b/src/devices/vdml_vision.cpp index 81bacbddc..9d25574a5 100644 --- a/src/devices/vdml_vision.cpp +++ b/src/devices/vdml_vision.cpp @@ -3,7 +3,7 @@ * * Contains functions for interacting with the V5 Vision Sensor. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/display/display.c b/src/display/display.c index ecdc2d9e7..4072f6527 100644 --- a/src/display/display.c +++ b/src/display/display.c @@ -3,7 +3,7 @@ * * Main source code for interacting with the V5 Brain's LCD screen. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/display/error.c b/src/display/error.c index 94fa95e2e..43268aa4c 100644 --- a/src/display/error.c +++ b/src/display/error.c @@ -4,7 +4,7 @@ * Error display handling. Prints an error message to the screen when the kernel * is put in an error state. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/display/llemu.c b/src/display/llemu.c index 0129f65d4..87ff5465f 100644 --- a/src/display/llemu.c +++ b/src/display/llemu.c @@ -7,7 +7,7 @@ * VEX LCD, containing a set of functions that facilitate the use of a software- * emulated version of the classic VEX LCD module. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/display/llemu.cpp b/src/display/llemu.cpp index 3123f37f2..edf009ab8 100644 --- a/src/display/llemu.cpp +++ b/src/display/llemu.cpp @@ -7,7 +7,7 @@ * VEX LCD, containing a set of functions that facilitate the use of a software- * emulated version of the classic VEX LCD module. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/rtos/rtos.cpp b/src/rtos/rtos.cpp index f59c13302..b2ca935a8 100644 --- a/src/rtos/rtos.cpp +++ b/src/rtos/rtos.cpp @@ -6,7 +6,7 @@ * * See https://pros.cs.purdue.edu/v5/tutorials/multitasking.html to learn more. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/cpp_support.cpp b/src/system/cpp_support.cpp index 481d0b64a..86e216a24 100644 --- a/src/system/cpp_support.cpp +++ b/src/system/cpp_support.cpp @@ -3,7 +3,7 @@ * * C++ support hooks * - * Copyright (c) 2017-2021, Purdue University ACM SIGBots + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/dev/dev_driver.c b/src/system/dev/dev_driver.c index 01b69b18c..dbf4b79a0 100644 --- a/src/system/dev/dev_driver.c +++ b/src/system/dev/dev_driver.c @@ -6,7 +6,7 @@ * Contains the driver for writing to any smart port with no regard to the * device on the other end. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/dev/file_system_stubs.c b/src/system/dev/file_system_stubs.c index ed7679f04..db7cc4e14 100644 --- a/src/system/dev/file_system_stubs.c +++ b/src/system/dev/file_system_stubs.c @@ -6,7 +6,7 @@ * Contains temporary stubs for the file system to allow compilation under gcc 9.2 * This is temporary and should be removed as part of #184 * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/dev/ser_daemon.c b/src/system/dev/ser_daemon.c index 2a0d23239..d77fdee3f 100644 --- a/src/system/dev/ser_daemon.c +++ b/src/system/dev/ser_daemon.c @@ -7,7 +7,7 @@ * characters and responding to any kernel commands (like printing the banner or * enabling COBS) * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/dev/ser_driver.c b/src/system/dev/ser_driver.c index dd3c7226f..be948f8e3 100644 --- a/src/system/dev/ser_driver.c +++ b/src/system/dev/ser_driver.c @@ -6,7 +6,7 @@ * Contains the driver for communicating over the serial line. The serial driver * is responsible for shipping out all data. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/dev/usd_driver.c b/src/system/dev/usd_driver.c index 589e33142..8c703b1d7 100644 --- a/src/system/dev/usd_driver.c +++ b/src/system/dev/usd_driver.c @@ -3,7 +3,7 @@ * * Contains the driver for writing files to the microSD card. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/dev/vfs.c b/src/system/dev/vfs.c index c6d0d750b..6d893aca2 100644 --- a/src/system/dev/vfs.c +++ b/src/system/dev/vfs.c @@ -13,7 +13,7 @@ * fileno. A file number maps to a driver and driver argument, which would be * whatever metadata the driver needs to open the file * - * Copyright (c) 2017-2021, Purdue University ACM SIGBots + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/envlock.c b/src/system/envlock.c index 35ca44984..dd2cb3020 100644 --- a/src/system/envlock.c +++ b/src/system/envlock.c @@ -5,7 +5,7 @@ * * Contains implementations of environment-locking functions for newlib. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/mlock.c b/src/system/mlock.c index ee4be90b1..a78a53334 100644 --- a/src/system/mlock.c +++ b/src/system/mlock.c @@ -5,7 +5,7 @@ * * Contains implementations of memory-locking functions for newlib. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/newlib_stubs.c b/src/system/newlib_stubs.c index 3845f450a..6594f78a2 100644 --- a/src/system/newlib_stubs.c +++ b/src/system/newlib_stubs.c @@ -6,7 +6,7 @@ * Contains the various methods needed to enable standard C library support * through the use of the Arm-distributed implementation of newlib. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/rtos_hooks.c b/src/system/rtos_hooks.c index 277e44d0d..9b547a029 100644 --- a/src/system/rtos_hooks.c +++ b/src/system/rtos_hooks.c @@ -6,7 +6,7 @@ * FreeRTOS requires some porting to each platform to handle certain tasks. This * file contains the various methods required to be implemented for FreeRTOS. * - * Copyright (c) 2017-2021, Purdue University ACM SIGBots + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/startup.c b/src/system/startup.c index 2cf332d2d..0d9169bf4 100644 --- a/src/system/startup.c +++ b/src/system/startup.c @@ -5,7 +5,7 @@ * code. Our main() initializes data structures and starts the FreeRTOS * scheduler. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/system_daemon.c b/src/system/system_daemon.c index 969158255..3a6f35ca8 100644 --- a/src/system/system_daemon.c +++ b/src/system/system_daemon.c @@ -3,7 +3,7 @@ * * Competition control daemon responsible for invoking the user tasks. * - * Copyright (c) 2017-2021, Purdue University ACM SIGBots + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/system/unwind.c b/src/system/unwind.c index 9ac6c180e..143f05a1a 100644 --- a/src/system/unwind.c +++ b/src/system/unwind.c @@ -5,7 +5,7 @@ * be arbitrarily stopped, requiring us to call all the destructors of the task * to be killed. * - * Copyright (c) 2017-2021, Purdue University ACM SIGBots + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/tests/adi.cpp b/src/tests/adi.cpp index a630d4492..c17468959 100644 --- a/src/tests/adi.cpp +++ b/src/tests/adi.cpp @@ -6,7 +6,7 @@ * NOTE: There should also be a call to the constructor for the gyroscope object * in initialize() for calibration to occur before the opcontrol code. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/tests/ext_adi.cpp b/src/tests/ext_adi.cpp index 33476ddb9..df481caa4 100644 --- a/src/tests/ext_adi.cpp +++ b/src/tests/ext_adi.cpp @@ -3,7 +3,7 @@ * * Test code for various External ADI things * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/tests/generic_serial.cpp b/src/tests/generic_serial.cpp index b4b347b1d..4b34167fe 100644 --- a/src/tests/generic_serial.cpp +++ b/src/tests/generic_serial.cpp @@ -6,7 +6,7 @@ * NOTE: There should be a cable plugged into ports 1 and 2, connecting * them together * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/tests/generic_serial_file.cpp b/src/tests/generic_serial_file.cpp index a1c0a6dc3..60c032332 100644 --- a/src/tests/generic_serial_file.cpp +++ b/src/tests/generic_serial_file.cpp @@ -6,7 +6,7 @@ * NOTE: There should be a cable plugged into ports 1 and 2, connecting * them together * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/tests/gyro.c b/src/tests/gyro.c index 878ccec57..61ae023e4 100644 --- a/src/tests/gyro.c +++ b/src/tests/gyro.c @@ -6,7 +6,7 @@ * NOTE: There should also be a call to the constructor for the gyroscope object * in initialize() for calibration to occur before the opcontrol code. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/tests/gyro.cpp b/src/tests/gyro.cpp index e4f4ef15e..a94b21532 100644 --- a/src/tests/gyro.cpp +++ b/src/tests/gyro.cpp @@ -6,7 +6,7 @@ * NOTE: There should also be a call to the constructor for the gyroscope object * in initialize() for calibration to occur before the opcontrol code. * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/tests/rtos_function_linking.c b/src/tests/rtos_function_linking.c index bb3217a1d..f82e1639c 100644 --- a/src/tests/rtos_function_linking.c +++ b/src/tests/rtos_function_linking.c @@ -5,7 +5,7 @@ * * Do not actually run this test - just make sure it compiles * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/tests/simple_names.c b/src/tests/simple_names.c index 1c17de41a..4cae64c86 100644 --- a/src/tests/simple_names.c +++ b/src/tests/simple_names.c @@ -5,7 +5,7 @@ * * Do not actually run this test - just make sure it compiles * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/src/tests/simple_names.cpp b/src/tests/simple_names.cpp index 57b0d5cc4..3b976658b 100644 --- a/src/tests/simple_names.cpp +++ b/src/tests/simple_names.cpp @@ -5,7 +5,7 @@ * * Do not actually run this test - just make sure it compiles * - * Copyright (c) 2017-2022, Purdue University ACM SIGBots. + * \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots. * All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public diff --git a/version b/version index c1e43e6d4..19811903a 100644 --- a/version +++ b/version @@ -1 +1 @@ -3.7.3 +3.8.0