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

Merge rewrite into master #42

Merged
merged 35 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1ad0fd2
Begin rewrite of LEGS
mihirlaud Sep 15, 2023
96729a4
Streamline controller interface. Move motors to concrete chassis classes
mihirlaud Sep 17, 2023
335b136
Add in movement flags. Add BoomerangController
mihirlaud Sep 18, 2023
ac791d9
Add max velocity to move
mihirlaud Sep 18, 2023
daf1d4f
Upgrade to PROS 4.0.5
mihirlaud Sep 20, 2023
a105edc
Rename to VOSS
mihirlaud Sep 21, 2023
76d9fe4
Add lead percent to Boomerang builder
mihirlaud Sep 27, 2023
0718465
add lvgl
12944qwerty Sep 29, 2023
d8b37b4
fix movement
12944qwerty Sep 29, 2023
3227678
Fix min error implementation
mihirlaud Sep 30, 2023
7d68d57
Fix reverse movement
mihirlaud Sep 30, 2023
2c0300c
slew
12944qwerty Oct 3, 2023
e2a87de
if negative, max slew
12944qwerty Oct 3, 2023
dc67aee
Make slew a member function
mihirlaud Oct 6, 2023
c982652
Merge branch 'slew-control' into rewrite
mihirlaud Oct 6, 2023
a49aa25
Selector (#19)
mihirlaud Oct 31, 2023
fbb07bd
Add turn functionality (#21)
Rocky14683 Oct 31, 2023
fe82f27
Fix oscillations when near target (#27)
AndrewLuGit Oct 31, 2023
4df1469
Thread safe ADILocalizer (#22)
mayankpatibandla Nov 1, 2023
e77d4ad
Minor fixes
mihirlaud Nov 1, 2023
43d9830
Safeguards (#28)
mihirlaud Nov 7, 2023
9378eb2
add settle_time to PIDController (#20)
Rvernen Nov 7, 2023
b19b902
commit (#31)
AndrewLuGit Nov 14, 2023
b393e28
Implement BoomerangController (#30)
AndrewLuGit Nov 14, 2023
e2a99ee
IME Localizer + IMU (#29)
mihirlaud Nov 14, 2023
9b9e13b
Add valid cases for IMU with no track width (#32)
mihirlaud Dec 5, 2023
db716a5
Imu set pose (#33)
mihirlaud Dec 5, 2023
35d5207
commit (#34)
AndrewLuGit Jan 9, 2024
3a56dfe
Added get motor function (#35)
Rocky14683 Jan 9, 2024
72814b4
Implement chained(thru) boomerang motion (#36)
Rocky14683 Jan 10, 2024
4ff1e09
Refector flags (#40)
Rocky14683 Jan 23, 2024
ec1f209
Pre-NUKE fixes (#37)
AndrewLuGit Jan 23, 2024
3e35721
commit (#39)
AndrewLuGit Jan 23, 2024
4f4110e
Fix reverse flag for thru case (#41)
Rocky14683 Jan 24, 2024
cd85077
Format Code (#43)
AndrewLuGit Jan 29, 2024
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
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
BasedOnStyle: LLVM
AlignAfterOpenBracket: Align
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
BraceWrapping:
BeforeElse: true
BreakBeforeBraces: Attach
ColumnLimit: 80
DerivePointerAlignment: false
IndentCaseLabels: false
IndentWidth: 4
Language: Cpp
PointerAlignment: Left
SortIncludes: CaseInsensitive
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpacesBeforeTrailingComments: 1
Standard: Cpp11
TabWidth: 4
UseTab: Never
24 changes: 24 additions & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Clang Format

on: pull_request

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Format
uses: DoozyX/[email protected]
with:
source: './src ./include/VOSS'
clangFormatVersion: 14
inplace: True
- name: Commit
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: 'Committing clang-format changes'
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ INCDIR=$(ROOT)/include

WARNFLAGS+=
EXTRA_CFLAGS=
EXTRA_CXXFLAGS= -DEIGEN_DONT_VECTORIZE
EXTRA_CXXFLAGS=

# Set to 1 to enable hot/cold linking
USE_PACKAGE:=1
Expand All @@ -26,17 +26,16 @@ EXCLUDE_COLD_LIBRARIES:=
# Set this to 1 to add additional rules to compile your project as a PROS library template
IS_LIBRARY:=1
# TODO: CHANGE THIS!
LIBNAME:=legs
LIBNAME:=VOSS
VERSION:=0.1.0

# EXCLUDE_SRC_FROM_LIB= $(SRCDIR)/unpublishedfile.c
# this line excludes opcontrol.c and similar files
EXCLUDE_SRC_FROM_LIB+=$(foreach file, $(SRCDIR)/main,$(foreach cext,$(CEXTS),$(file).$(cext)) $(foreach cxxext,$(CXXEXTS),$(file).$(cxxext)))

# files that get distributed to every user (beyond your source archive) - add
# whatever files you want here. This line is configured to add all header files
# that are in the the include directory get exported
TEMPLATE_FILES=$(INCDIR)/**/*.h $(INCDIR)/**/*.hpp
TEMPLATE_FILES=$(INCDIR)/VOSS/**

.DEFAULT_GOAL=quick

Expand Down
21 changes: 17 additions & 4 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++2a

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 Expand Up @@ -201,7 +214,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
Expand Down Expand Up @@ -280,7 +293,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
Expand Down
Binary file added firmware/liblvgl.a
Binary file not shown.
Binary file modified firmware/libpros.a
Binary file not shown.
45 changes: 0 additions & 45 deletions include/Eigen/Cholesky

This file was deleted.

48 changes: 0 additions & 48 deletions include/Eigen/CholmodSupport

This file was deleted.

Loading
Loading