Skip to content

Commit

Permalink
Merge branch 'wpilibsuite:main' into FFUnits
Browse files Browse the repository at this point in the history
  • Loading branch information
narmstro2020 authored Sep 29, 2024
2 parents aa1a02b + fde264b commit 7fd0491
Show file tree
Hide file tree
Showing 159 changed files with 39,007 additions and 7,147 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/comment-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,8 @@ jobs:
run: python -m pip install jinja2
- name: Install protobuf dependencies
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler && wget https://github.com/HebiRobotics/QuickBuffers/releases/download/1.3.3/protoc-gen-quickbuf-1.3.3-linux-x86_64.exe && chmod +x protoc-gen-quickbuf-1.3.3-linux-x86_64.exe
- name: Run hal
run: ./hal/generate_usage_reporting.py
- name: Run ntcore
run: ./ntcore/generate_topics.py
- name: Run wpimath
run: ./wpimath/generate_numbers.py && ./wpimath/generate_quickbuf.py --quickbuf_plugin=protoc-gen-quickbuf-1.3.3-linux-x86_64.exe
- name: Run HIDs
run: ./wpilibj/generate_hids.py && ./wpilibc/generate_hids.py && ./wpilibNewCommands/generate_hids.py
- name: Run PWM Controllers
run: ./wpilibj/generate_pwm_motor_controllers.py && ./wpilibc/generate_pwm_motor_controllers.py
- name: Run imgui gl3w
run: ./thirdparty/imgui_suite/generate_gl3w.py
- name: Run imgui fonts
run: ./thirdparty/imgui_suite/generate_fonts.sh
- name: Regenerate all
run: ./.github/workflows/pregen_all.py --quickbuf_plugin=protoc-gen-quickbuf-1.3.3-linux-x86_64.exe
- name: Commit
run: |
# Set credentials
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/pregen_all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env python3

import argparse
import subprocess
import sys
from pathlib import Path


def main(argv):
script_path = Path(__file__).resolve()
REPO_ROOT = script_path.parent.parent.parent
parser = argparse.ArgumentParser()
parser.add_argument(
"--quickbuf_plugin",
help="Path to the quickbuf protoc plugin",
required=True,
)
args = parser.parse_args(argv)
subprocess.run(["python", f"{REPO_ROOT}/hal/generate_usage_reporting.py"])
subprocess.run(["python", f"{REPO_ROOT}/ntcore/generate_topics.py"])
subprocess.run(["python", f"{REPO_ROOT}/wpimath/generate_numbers.py"])
subprocess.run(
[
"python",
f"{REPO_ROOT}/wpimath/generate_quickbuf.py",
f"--quickbuf_plugin={args.quickbuf_plugin}",
]
)
subprocess.run(["python", f"{REPO_ROOT}/wpiunits/generate_units.py"])
subprocess.run(["python", f"{REPO_ROOT}/wpilibc/generate_hids.py"])
subprocess.run(["python", f"{REPO_ROOT}/wpilibj/generate_hids.py"])
subprocess.run(["python", f"{REPO_ROOT}/wpilibNewCommands/generate_hids.py"])
subprocess.run(["python", f"{REPO_ROOT}/wpilibc/generate_pwm_motor_controllers.py"])
subprocess.run(["python", f"{REPO_ROOT}/wpilibj/generate_pwm_motor_controllers.py"])
subprocess.run(["python", f"{REPO_ROOT}/thirdparty/imgui_suite/generate_gl3w.py"])
subprocess.run(f"{REPO_ROOT}/thirdparty/imgui_suite/generate_fonts.sh")


if __name__ == "__main__":
main(sys.argv[1:])
18 changes: 2 additions & 16 deletions .github/workflows/pregenerate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,8 @@ jobs:
run: python -m pip install jinja2
- name: Install protobuf dependencies
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler && wget https://github.com/HebiRobotics/QuickBuffers/releases/download/1.3.3/protoc-gen-quickbuf-1.3.3-linux-x86_64.exe && chmod +x protoc-gen-quickbuf-1.3.3-linux-x86_64.exe
- name: Run hal
run: ./hal/generate_usage_reporting.py
- name: Run ntcore
run: ./ntcore/generate_topics.py
- name: Run wpimath
run: ./wpimath/generate_numbers.py && ./wpimath/generate_quickbuf.py --quickbuf_plugin=protoc-gen-quickbuf-1.3.3-linux-x86_64.exe
- name: Run wpiunits
run: ./wpiunits/generate_units.py
- name: Run HIDs
run: ./wpilibj/generate_hids.py && ./wpilibc/generate_hids.py && ./wpilibNewCommands/generate_hids.py
- name: Run PWM Controllers
run: ./wpilibj/generate_pwm_motor_controllers.py && ./wpilibc/generate_pwm_motor_controllers.py
- name: Run imgui gl3w
run: ./thirdparty/imgui_suite/generate_gl3w.py
- name: Run imgui fonts
run: ./thirdparty/imgui_suite/generate_fonts.sh
- name: Regenerate all
run: python ./.github/workflows/pregen_all.py --quickbuf_plugin protoc-gen-quickbuf-1.3.3-linux-x86_64.exe
- name: Add untracked files to index so they count as changes
run: git add -A
- name: Check output
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ compile_commands.json

# clang configuration and clangd cache
.clang
.clangd/
.clangd
.cache/

imgui.ini
Expand Down
2 changes: 1 addition & 1 deletion cscore/src/main/java/edu/wpi/first/cscore/VideoSink.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package edu.wpi.first.cscore;

/**
* A source for video that provides a sequence of frames. Each frame may consist of multiple images
* A sink for video that accepts a sequence of frames. Each frame may consist of multiple images
* (e.g. from a stereo or depth camera); these are called channels.
*/
public class VideoSink implements AutoCloseable {
Expand Down
Binary file modified datalogtool/src/main/native/win/datalogtool.ico
Binary file not shown.
1 change: 1 addition & 0 deletions glass/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ model {
if (OperatingSystem.current().isWindows()) {
rc.source {
srcDirs 'src/app/native/win'
include '*.rc'
}
}
}
Expand Down
Binary file modified glass/src/app/native/win/glass.ico
Binary file not shown.
Binary file modified outlineviewer/src/main/native/win/outlineviewer.ico
Binary file not shown.
Binary file not shown.
Binary file modified sysid/src/main/native/win/sysid.ico
Binary file not shown.
23 changes: 18 additions & 5 deletions thirdparty/imgui_suite/generate_fonts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ cd $DIR/generated

# Versions
IMGUI_COMMIT=74f7ac04a166c77ef1cbbbebff51e5bfc4fcfa5d
ICONFONTCPPHEADERS_COMMIT=acd3728de3ee4e2461f8958154bb2dc46f958723
ICONFONTCPPHEADERS_COMMIT=d4dae38e016e3fb41ee9f3fe393d2577c0ea6315
DROID_COMMIT=d3817c246c6e3da7531fa1fbb0b0fca271aae7fb
PROGGYFONTS_VERSION=1.1.5
FONTAWESOME_VERSION=6.2.0
PROGGYFONTS_VERSION=1.1.7
FONTAWESOME_VERSION=6.6.0
FIRACODE_VERSION=6.2
ROBOTO_VERSION=2.138

mkdir download
pushd download
Expand All @@ -22,6 +23,7 @@ wget -O proggyfonts.zip https://github.com/bluescan/proggyfonts/archive/refs/tag
wget https://github.com/FortAwesome/Font-Awesome/releases/download/${FONTAWESOME_VERSION}/fontawesome-free-${FONTAWESOME_VERSION}-web.zip
wget -O droid-fonts.zip https://github.com/grays/droid-fonts/archive/${DROID_COMMIT}.zip
wget -O fira-code.zip https://github.com/tonsky/FiraCode/releases/download/${FIRACODE_VERSION}/Fira_Code_v${FIRACODE_VERSION}.zip
wget -O roboto.zip https://github.com/googlefonts/roboto/releases/download/v${ROBOTO_VERSION}/roboto-android.zip

# Download C++ icon font header
wget https://github.com/juliettef/IconFontCppHeaders/raw/${ICONFONTCPPHEADERS_COMMIT}/IconsFontAwesome6.h
Expand All @@ -39,6 +41,10 @@ mkdir fira-code
pushd fira-code
unzip ../../download/fira-code.zip
popd
mkdir roboto
pushd roboto
unzip ../../download/roboto.zip
popd
popd

rm -rf fonts
Expand All @@ -52,6 +58,7 @@ cp -p download/IconsFontAwesome6.h fonts/include/
cp -p extract/proggyfonts-${PROGGYFONTS_VERSION}/LICENSE fonts/LICENSE-proggyfonts.txt
cp -p extract/fontawesome-free-${FONTAWESOME_VERSION}-web/LICENSE.txt fonts/LICENSE-fontawesome.txt
cp -p extract/droid-fonts-${DROID_COMMIT}/droid/NOTICE fonts/LICENSE-droid.txt
cp -p extract/roboto/LICENSE fonts/LICENSE-roboto.txt

# Build C versions
g++ -o imgui_font_bin2c download/binary_to_compressed_c.cpp
Expand All @@ -60,9 +67,15 @@ g++ -o imgui_font_bin2c download/binary_to_compressed_c.cpp
./imgui_font_bin2c "extract/fontawesome-free-${FONTAWESOME_VERSION}-web/webfonts/fa-solid-900.ttf" FontAwesomeSolid > fonts/src/FontAwesomeSolid.inc
./imgui_font_bin2c "extract/droid-fonts-${DROID_COMMIT}/droid/DroidSans.ttf" DroidSans > fonts/src/DroidSans.inc
./imgui_font_bin2c "extract/fira-code/ttf/FiraCode-Retina.ttf" FiraCodeRetina > fonts/src/FiraCodeRetina.inc
./imgui_font_bin2c "extract/roboto/Roboto-Light.ttf" RobotoLight > fonts/src/RobotoLight.inc
./imgui_font_bin2c "extract/roboto/Roboto-Regular.ttf" RobotoRegular > fonts/src/RobotoRegular.inc
./imgui_font_bin2c "extract/roboto/Roboto-Bold.ttf" RobotoBold > fonts/src/RobotoBold.inc
./imgui_font_bin2c "extract/roboto/RobotoCondensed-Light.ttf" RobotoCondensedLight > fonts/src/RobotoCondensedLight.inc
./imgui_font_bin2c "extract/roboto/RobotoCondensed-Regular.ttf" RobotoCondensedRegular > fonts/src/RobotoCondensedRegular.inc
./imgui_font_bin2c "extract/roboto/RobotoCondensed-Bold.ttf" RobotoCondensedBold > fonts/src/RobotoCondensedBold.inc

# Generate C wrapper source/headers
for font in ProggyDotted FontAwesomeRegular FontAwesomeSolid DroidSans FiraCodeRetina
for font in ProggyDotted FontAwesomeRegular FontAwesomeSolid DroidSans FiraCodeRetina RobotoLight RobotoRegular RobotoBold RobotoCondensedLight RobotoCondensedRegular RobotoCondensedBold
do
cat >fonts/src/imgui_${font}.cpp <<END
#include "imgui_${font}.h"
Expand All @@ -81,4 +94,4 @@ ImFont* AddFont${font}(ImGuiIO& io, float size_pixels, const ImFontConfig* font_
END
done

rm -r download extract imgui_font_bin2c
rm -r download extract imgui_font_bin2c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ as SVG and JS file types.
In the Font Awesome Free download, the SIL OFL license applies to all icons
packaged as web and desktop font files.

Copyright (c) 2022 Fonticons, Inc. (https://fontawesome.com)
Copyright (c) 2024 Fonticons, Inc. (https://fontawesome.com)
with Reserved Font Name: "Font Awesome".

This Font Software is licensed under the SIL Open Font License, Version 1.1.
Expand Down Expand Up @@ -123,7 +123,7 @@ OTHER DEALINGS IN THE FONT SOFTWARE.
In the Font Awesome Free download, the MIT license applies to all non-font and
non-icon files.

Copyright 2022 Fonticons, Inc.
Copyright 2024 Fonticons, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in the
Expand Down
Loading

0 comments on commit 7fd0491

Please sign in to comment.