Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ PROS 4 Porting work #100

Merged
merged 4 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 55 additions & 0 deletions .github/workflows/deploy-to-github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: [website]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

env:
# Hosted GitHub runners have 7 GB of memory available, let's use 6 GB
NODE_OPTIONS: --max-old-space-size=6144

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
- name: Build
run: yarn build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload entire repository
path: build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ yarn-error.log*
# Compiled Object files
*.o
*.obj

# Executables
*.bin
*.elf

# PROS
bin/
.vscode/
Expand All @@ -44,4 +42,5 @@ EZ-Template-Example-Project/compile_commands.json
EZ-Template-Example-Project/temp.log
EZ-Template-Example-Project/temp.errors
EZ-Template-Example-Project/*.ini
EZ-Template-Example-Project/.d/
EZ-Template-Example-Project/.d/
.d/
2 changes: 1 addition & 1 deletion EZ-Template-Example-Project/include/EZ-Template/piston.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Piston {
/**
* Piston used throughout.
*/
pros::ADIDigitalOut piston;
pros::adi::DigitalOut piston;

/**
* Piston constructor. This class keeps track of piston state. The starting position of your piston is FALSE.
Expand Down
6 changes: 3 additions & 3 deletions EZ-Template-Example-Project/include/EZ-Template/sdcard.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ inline bool auton_selector_running;

extern bool turn_off;

extern pros::ADIDigitalIn* limit_switch_left;
extern pros::ADIDigitalIn* limit_switch_right;
extern pros::adi::DigitalIn* limit_switch_left;
extern pros::adi::DigitalIn* limit_switch_right;
/**
* Initialize two limitswithces to change pages on the lcd
*
Expand All @@ -61,7 +61,7 @@ extern pros::ADIDigitalIn* limit_switch_right;
* @param right_limit_port
* port for the right limit switch
*/
void limit_switch_lcd_initialize(pros::ADIDigitalIn* right_limit, pros::ADIDigitalIn* left_limit = nullptr);
void limit_switch_lcd_initialize(pros::adi::DigitalIn* right_limit, pros::adi::DigitalIn* left_limit = nullptr);

/**
* pre_auto_task
Expand Down
14 changes: 7 additions & 7 deletions EZ-Template-Example-Project/include/pros/adi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ class ADIAnalogIn : protected ADIPort {
* this time and computes an average from approximately 500 samples, 1 ms
* apart, for a 0.5 s period of calibration. The average value thus calculated
* is returned and stored for later calls to the
* pros::ADIAnalogIn::get_value_calibrated() and
* pros::ADIAnalogIn::get_value_calibrated_HR() functions. These functions
* pros::adi::AnalogIn::get_value_calibrated() and
* pros::adi::AnalogIn::get_value_calibrated_HR() functions. These functions
* will return the difference between this value and the current sensor value
* when called.
*
Expand All @@ -172,10 +172,10 @@ class ADIAnalogIn : protected ADIPort {
/**
* Gets the 12 bit calibrated value of an analog input port.
*
* The pros::ADIAnalogIn::calibrate() function must be run first. This
* The pros::adi::AnalogIn::calibrate() function must be run first. This
* function is inappropriate for sensor values intended for integration, as
* round-off error can accumulate causing drift over time. Use
* pros::ADIAnalogIn::get_value_calibrated_HR() instead.
* pros::adi::AnalogIn::get_value_calibrated_HR() instead.
*
* This function uses the following values of errno when an error state is
* reached:
Expand All @@ -189,7 +189,7 @@ class ADIAnalogIn : protected ADIPort {
/**
* Gets the 16 bit calibrated value of an analog input port.
*
* The pros::ADIAnalogIn::calibrate() function must be run first. This is
* The pros::adi::AnalogIn::calibrate() function must be run first. This is
* intended for integrated sensor values such as gyros and accelerometers to
* reduce drift due to round-off, and should not be used on a sensor such as a
* line tracker or potentiometer.
Expand Down Expand Up @@ -735,7 +735,7 @@ class ADIPotentiometer : public ADIAnalogIn {
* this time and computes an average from approximately 500 samples, 1 ms
* apart, for a 0.5 s period of calibration. The average value thus calculated
* is returned and stored for later calls to the
* pros::ADIPotentiometer::get_value_calibrated() function. This function
* pros::adi::Potentiometer::get_value_calibrated() function. This function
* will return the difference between this value and the current sensor value
* when called.
*
Expand All @@ -752,7 +752,7 @@ class ADIPotentiometer : public ADIAnalogIn {
/**
* Gets the 12 bit calibrated value of a potentiometer port.
*
* The pros::ADIPotentiometer::calibrate() function must be run first.
* The pros::adi::Potentiometer::calibrate() function must be run first.
*
* This function uses the following values of errno when an error state is
* reached:
Expand Down
Binary file modified [email protected]
Binary file not shown.
17 changes: 15 additions & 2 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,24 @@ MFLAGS=-mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=softfp -Os -g
CPPFLAGS=-D_POSIX_THREADS -D_UNIX98_THREAD_MUTEX_ATTRIBUTES -D_POSIX_TIMERS -D_POSIX_MONOTONIC_CLOCK
GCCFLAGS=-ffunction-sections -fdata-sections -fdiagnostics-color -funwind-tables

# Check if the llemu files in libvgl exist. If they do, define macros that the
# llemu headers in the kernel repo can use to conditionally include the libvgl
# versions
ifneq (,$(wildcard ./include/liblvgl/llemu.h))
CPPFLAGS += -D_PROS_INCLUDE_LIBLVGL_LLEMU_H
endif
ifneq (,$(wildcard ./include/liblvgl/llemu.hpp))
CPPFLAGS += -D_PROS_INCLUDE_LIBLVGL_LLEMU_HPP
endif

WARNFLAGS+=-Wno-psabi

SPACE := $() $()
COMMA := ,

C_STANDARD?=gnu11
CXX_STANDARD?=gnu++20

DEPDIR := .d
$(shell mkdir -p $(DEPDIR))
DEPFLAGS = -MT $$@ -MMD -MP -MF $(DEPDIR)/$$*.Td
Expand All @@ -24,8 +37,8 @@ wlprefix=-Wl,$(subst $(SPACE),$(COMMA),$1)
LNK_FLAGS=--gc-sections --start-group $(strip $(LIBRARIES)) -lgcc -lstdc++ --end-group -T$(FWDIR)/v5-common.ld

ASMFLAGS=$(MFLAGS) $(WARNFLAGS)
CFLAGS=$(MFLAGS) $(CPPFLAGS) $(WARNFLAGS) $(GCCFLAGS) --std=gnu11
CXXFLAGS=$(MFLAGS) $(CPPFLAGS) $(WARNFLAGS) $(GCCFLAGS) --std=gnu++17
CFLAGS=$(MFLAGS) $(CPPFLAGS) $(WARNFLAGS) $(GCCFLAGS) --std=$(C_STANDARD)
CXXFLAGS=$(MFLAGS) $(CPPFLAGS) $(WARNFLAGS) $(GCCFLAGS) --std=$(CXX_STANDARD)
LDFLAGS=$(MFLAGS) $(WARNFLAGS) -nostdlib $(GCCFLAGS)
SIZEFLAGS=-d --common
NUMFMTFLAGS=--to=iec --format %.2f --suffix=B
Expand Down
Binary file added firmware/liblvgl.a
Binary file not shown.
Binary file modified firmware/libpros.a
Binary file not shown.
Binary file modified firmware/okapilib.a
Binary file not shown.
4 changes: 2 additions & 2 deletions include/EZ-Template/drive/drive.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ class Drive {
/**
* Left tracking wheel.
*/
pros::ADIEncoder left_tracker;
pros::adi::Encoder left_tracker;

/**
* Right tracking wheel.
*/
pros::ADIEncoder right_tracker;
pros::adi::Encoder right_tracker;

/**
* Left rotation tracker.
Expand Down
2 changes: 1 addition & 1 deletion include/EZ-Template/piston.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Piston {
/**
* Piston used throughout.
*/
pros::ADIDigitalOut piston;
pros::adi::DigitalOut piston;

/**
* Piston constructor. This class keeps track of piston state. The starting position of your piston is FALSE.
Expand Down
6 changes: 3 additions & 3 deletions include/EZ-Template/sdcard.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ inline bool auton_selector_running;

extern bool turn_off;

extern pros::ADIDigitalIn* limit_switch_left;
extern pros::ADIDigitalIn* limit_switch_right;
extern pros::adi::DigitalIn* limit_switch_left;
extern pros::adi::DigitalIn* limit_switch_right;
/**
* Initialize two limitswithces to change pages on the lcd
*
Expand All @@ -61,7 +61,7 @@ extern pros::ADIDigitalIn* limit_switch_right;
* @param right_limit_port
* port for the right limit switch
*/
void limit_switch_lcd_initialize(pros::ADIDigitalIn* right_limit, pros::ADIDigitalIn* left_limit = nullptr);
void limit_switch_lcd_initialize(pros::adi::DigitalIn* right_limit, pros::adi::DigitalIn* left_limit = nullptr);

/**
* pre_auto_task
Expand Down
13 changes: 9 additions & 4 deletions include/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@
#include <unistd.h>
#endif /* __cplusplus */

#define PROS_VERSION_MAJOR 3
#define PROS_VERSION_MINOR 8
#define PROS_VERSION_PATCH 3
#define PROS_VERSION_STRING "3.8.3"
#define PROS_VERSION_MAJOR 4
#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"
#include "pros/device.h"
#include "pros/distance.h"
#include "pros/error.h"
#include "pros/ext_adi.h"
Expand All @@ -63,12 +65,15 @@

#ifdef __cplusplus
#include "pros/adi.hpp"
#include "pros/colors.hpp"
#include "pros/device.hpp"
#include "pros/distance.hpp"
#include "pros/gps.hpp"
#include "pros/imu.hpp"
#include "pros/link.hpp"
#include "pros/llemu.hpp"
#include "pros/misc.hpp"
#include "pros/motor_group.hpp"
#include "pros/motors.hpp"
#include "pros/optical.hpp"
#include "pros/rotation.hpp"
Expand Down
71 changes: 0 additions & 71 deletions include/display/README.md

This file was deleted.

8 changes: 0 additions & 8 deletions include/display/licence.txt

This file was deleted.

12 changes: 0 additions & 12 deletions include/display/lv_core/lv_core.mk

This file was deleted.

Loading
Loading