Skip to content

Commit

Permalink
Release 2.1.1 (#26)
Browse files Browse the repository at this point in the history
Upgrade to PROS 4.1.0
  • Loading branch information
unwieldycat authored May 24, 2024
2 parents 19944d0 + 64f7bce commit 76c8f16
Show file tree
Hide file tree
Showing 32 changed files with 2,776 additions and 1,790 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,4 @@ compile_commands.json
temp.log
temp.errors
*.ini
.d/

docs-output/
.DS_Store
.d/
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Changes to this project will be logged in this file. This project uses
[Semantic Versioning](https://semver.org/spec/v2.0.0.html). Format is loosely
based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## 2.1.1

Robodash 2.1.1 is a recompilation of 2.1.0 that upgrades to PROS version 4.1.0

## 2.1.0

Robodash 2.1.0 resolves issues with the autonomous selector.
Expand Down
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Contributing

Thanks for wanting to contribute to robodash. Before contributing code to this
repository, please first open an issue describing the problem you're having or
the feature you want added. This document describes procedures you should follow
when contributing code to this repository.

## Pull Requests

1. Describe the issue your pull request resolves and the changes it makes. Link
relevant issues.

- Keep changes focused. Multiple unrelated changes shouldn't be lumped into
one pull request.

2. Ensure that your changes work before requesting to merge.

- Changes should compile without warnings and behave as intended
- Changes for non-major versions should not break API compatibility

3. Ensure that your code is formatted with the provided clang-format
configuration and follows the style guide.

## Style Guide

Along with formatting with the provided configuration file, code should use the
following conventions to preserve readability and consistency:

- Use appropriate casing
- Class names should be in `PascalCase`
- Macros should be in `SCREAM_CASE`
- Everything else should be `snake_case`
- Use clear (but not excessive) variable names. Don't use names like `temp`,
`var`, or single letters.
- Add appropriate whitespace to visually seperate blocks of code
- User-facing functions should be annotated with doxygen comments.
- Code comments should only be used if necessary
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ EXCLUDE_COLD_LIBRARIES:=
# Set this to 1 to add additional rules to compile your project as a PROS library template
IS_LIBRARY:=1
LIBNAME:=robodash
VERSION:=2.1.0
VERSION:=2.1.1

# EXCLUDE_SRC_FROM_LIB= $(SRCDIR)/unpublishedfile.c
# this line excludes opcontrol.c and similar files
Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = Robodash
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 2.1.0
PROJECT_NUMBER = 2.2.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
Binary file modified firmware/liblvgl.a
Binary file not shown.
Binary file modified firmware/libpros.a
Binary file not shown.
7 changes: 4 additions & 3 deletions include/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@
#endif /* __cplusplus */

#define PROS_VERSION_MAJOR 4
#define PROS_VERSION_MINOR 0
#define PROS_VERSION_PATCH 6
#define PROS_VERSION_STRING "4.0.6"
#define PROS_VERSION_MINOR 1

#define PROS_VERSION_PATCH 0
#define PROS_VERSION_STRING "4.1.0"

#include "pros/adi.h"
#include "pros/colors.h"
Expand Down
2 changes: 0 additions & 2 deletions include/liblvgl/lv_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,6 @@ typedef void * lv_obj_user_data_t;
# define LV_TILEVIEW_DEF_ANIM_TIME 300
#endif

#define CONFIG_LV_USE_GIF 1

/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/
#define LV_USE_WIN 1

Expand Down
66 changes: 0 additions & 66 deletions include/liblvgl/lv_version.h

This file was deleted.

49 changes: 15 additions & 34 deletions include/pros/abstract_motor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace pros {
inline namespace v5 {

/**
* \enum motor_brake
* \enum MotorBrake
* Indicates the current 'brake mode' of a motor.
*/
enum class MotorBrake {
Expand All @@ -42,7 +42,7 @@ enum class MotorBrake {
};

/**
* \enum Motor_Encoder_Units
* \enum MotorEncoderUnits
* Indicates the units used by the motor encoders.
*/
enum class MotorEncoderUnits {
Expand All @@ -53,7 +53,7 @@ enum class MotorEncoderUnits {
invalid = INT32_MAX ///< Invalid motor encoder units
};

// Alias for Motor_Encoder_Units
// Alias for MotorEncoderUnits
using MotorUnits = MotorEncoderUnits;

enum class MotorGears {
Expand All @@ -70,7 +70,7 @@ enum class MotorGears {
};


// Provide Aliases for Motor_Gears
// Provide Aliases for MotorGears
using MotorGearset = MotorGears;
using MotorCart = MotorGears;
using MotorCartridge = MotorGears;
Expand All @@ -89,25 +89,6 @@ class AbstractMotor {
/// These functions allow programmers to make motors move
///@{

/**
* Sets the voltage for the motor from -127 to 127.
*
* This is designed to map easily to the input from the controller's analog
* stick for simple opcontrol use. The actual behavior of the motor is
* analogous to use of pros::Motor::move().
*
* This function uses the following values of errno when an error state is
* reached:
* ENODEV - The port cannot be configured as a motor
*
* \param voltage
* The new motor voltage from -127 to 127
*
* \return 1 if the operation was successful or PROS_ERR if the operation
* failed, setting errno.
*/
virtual std::int32_t operator=(std::int32_t voltage) const = 0;

/**
* Sets the voltage for the motor from -127 to 127.
*
Expand Down Expand Up @@ -778,7 +759,7 @@ class AbstractMotor {
* The index of the motor to get the target position of.
* By default index is 0, and will return an error for an out of bounds index
*
* \return One of Motor_Brake, according to what was set for the
* \return One of MotorBrake, according to what was set for the
* motor, or E_MOTOR_BRAKE_INVALID if the operation failed, setting errno.
*/
virtual MotorBrake get_brake_mode(const std::uint8_t index = 0) const = 0;
Expand All @@ -794,7 +775,7 @@ class AbstractMotor {
* The index of the motor to get the target position of.
* By default index is 0, and will return an error for an out of bounds index
*
* \return A vector containing Motor_Brake(s), according to what was set for the
* \return A vector containing MotorBrake(s), according to what was set for the
* motor(s), or E_MOTOR_BRAKE_INVALID if the operation failed, setting errno.
*/
virtual std::vector<MotorBrake> get_brake_mode_all(void) const = 0;
Expand Down Expand Up @@ -846,7 +827,7 @@ class AbstractMotor {
* The index of the motor to get the target position of.
* By default index is 0, and will return an error for an out of bounds index
*
* \return One of Motor_Units according to what is set for the
* \return One of MotorUnits according to what is set for the
* motor or E_MOTOR_ENCODER_INVALID if the operation failed.
*/
virtual MotorUnits get_encoder_units(const std::uint8_t index = 0) const = 0;
Expand All @@ -862,7 +843,7 @@ class AbstractMotor {
* The index of the motor to get the target position of.
* By default index is 0, and will return an error for an out of bounds index
*
* \return A vector of Motor_Units according to what is set for the
* \return A vector of MotorUnits according to what is set for the
* motor(s) or E_MOTOR_ENCODER_INVALID if the operation failed.
*/
virtual std::vector<MotorUnits> get_encoder_units_all(void) const = 0;
Expand All @@ -878,8 +859,8 @@ class AbstractMotor {
* The index of the motor to get the target position of.
* By default index is 0, and will return an error for an out of bounds index
*
* \return One of Motor_Gears according to what is set for the motor,
* or pros::Motor_Gears::invalid if the operation failed.
* \return One of MotorGears according to what is set for the motor,
* or pros::MotorGears::invalid if the operation failed.
*/
virtual MotorGears get_gearing(const std::uint8_t index = 0) const = 0;

Expand All @@ -894,8 +875,8 @@ class AbstractMotor {
* The index of the motor to get the target position of.
* By default index is 0, and will return an error for an out of bounds index
*
* \return A vector of Motor_Gears according to what is set for the motor(s),
* or pros::Motor_Gears::invalid if the operation failed.
* \return A vector of MotorGears according to what is set for the motor(s),
* or pros::MotorGears::invalid if the operation failed.
*/
virtual std::vector<MotorGears> get_gearing_all(void) const = 0;

Expand Down Expand Up @@ -977,15 +958,15 @@ class AbstractMotor {
virtual std::vector<std::int32_t> is_reversed_all(void) const = 0;

/**
* Sets one of Motor_Brake to the motor. Works with the C enum
* Sets one of MotorBrake to the motor. Works with the C enum
* and the C++ enum class.
*
* This function uses the following values of errno when an error state is
* reached:
* ENODEV - The port cannot be configured as a motor
*
* \param mode
* The Motor_Brake to set for the motor
* The MotorBrake to set for the motor
*
* \param index Optional parameter.
* The index of the motor to get the target position of.
Expand Down Expand Up @@ -1018,7 +999,7 @@ class AbstractMotor {
virtual std::int32_t set_current_limit(const std::int32_t limit, const std::uint8_t index = 0) const = 0;
virtual std::int32_t set_current_limit_all(const std::int32_t limit) const = 0;
/**
* Sets one of Motor_Units for the motor encoder. Works with the C
* Sets one of MotorUnits for the motor encoder. Works with the C
* enum and the C++ enum class.
*
* This function uses the following values of errno when an error state is
Expand Down
Loading

0 comments on commit 76c8f16

Please sign in to comment.