Compare commits

...

8 Commits

Author SHA1 Message Date
Matt
5298de0f64 Run on tags starting with 'v' (#227) 2021-01-10 17:24:04 -08:00
Declan Freeman-Gleason
2330b72451 When describing the current commit, exclude the Dev tag (#226)
* When describing the current release, exclude the Dev tag

* Only run the release task on non-dev tags (i.e. real release tags)
2021-01-10 15:57:16 -08:00
Matt
69d2499e1a Upload release with artifact on tag (#225) 2021-01-10 11:35:10 -08:00
Declan Freeman-Gleason
0a4dcd17e0 Set inputShouldShow to false when all websockets disconnect (#224) 2021-01-09 16:35:42 -08:00
Declan Freeman-Gleason
15c687655a Use computed value to clear up TypeError in dialog persistient prop 2021-01-09 14:50:46 -08:00
Declan Freeman-Gleason
839f959681 Make CVRangeSlider gracefully accept undefined values 2021-01-09 14:50:46 -08:00
Declan Freeman-Gleason
0b2de7d9f1 Make pipeline index rollback work with multiple cameras 2021-01-09 14:50:46 -08:00
Declan Freeman-Gleason
5d139e0a4e Update and improve README (#223) 2021-01-09 11:14:14 -08:00
10 changed files with 56 additions and 32 deletions

View File

@@ -7,6 +7,8 @@ name: CI
on: on:
push: push:
branches: [ master ] branches: [ master ]
tags:
- 'v*'
pull_request: pull_request:
branches: [ master ] branches: [ master ]
@@ -104,11 +106,6 @@ jobs:
pip install sphinx sphinx_rtd_theme sphinx-tabs sphinxext-opengraph doc8 pip install sphinx sphinx_rtd_theme sphinx-tabs sphinxext-opengraph doc8
pip install -r requirements.txt pip install -r requirements.txt
- name: Install LaTeX and other system dependencies
run: |
sudo apt update
sudo apt install -y texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra latexmk texlive-lang-greek texlive-luatex texlive-xetex texlive-fonts-extra dvipng graphviz
- name: Check the docs - name: Check the docs
run: | run: |
make linkcheck make linkcheck
@@ -124,7 +121,6 @@ jobs:
name: built-docs name: built-docs
path: build/html path: build/html
build-package: build-package:
needs: [build-client, build-server, build-offline-docs] needs: [build-client, build-server, build-offline-docs]
@@ -211,3 +207,16 @@ jobs:
chmod +x gradlew chmod +x gradlew
./gradlew spotlessCheck ./gradlew spotlessCheck
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build-package]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: jar
- uses: softprops/action-gh-release@v1
with:
files: '**/*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,16 +1,12 @@
# Photon Vision # Photon Vision
[![CI](https://github.com/PhotonVision/photonvision/workflows/CI/badge.svg)](https://github.com/PhotonVision/photonvision/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/PhotonVision/photonvision/branch/master/graph/badge.svg)](https://codecov.io/gh/PhotonVision/photonvision) [![CI](https://github.com/PhotonVision/photonvision/workflows/CI/badge.svg)](https://github.com/PhotonVision/photonvision/actions?query=workflow%3ACI) [![codecov](https://codecov.io/gh/PhotonVision/photonvision/branch/master/graph/badge.svg)](https://codecov.io/gh/PhotonVision/photonvision) [![Discord](https://img.shields.io/discord/725836368059826228?color=%23738ADB&label=Join%20our%20Discord&logo=discord&logoColor=white)](https://discord.gg/wYxTwym)
A copy of the latest development release is available [here](https://github.com/PhotonVision/photonvision/releases/tag/Dev). PhotonVision is the free, fast, and easy-to-use computer vision solution for the *FIRST* Robotics Competition. You can read an overview of our features [on our website](https://photonvision.org). You can find our comprehensive documentation [here](https://docs.photonvision.org).
PhotonVision is a fork of [Chameleon Vision](https://github.com/Chameleon-Vision/chameleon-vision/), a free open-source software for FRC teams to use for vision processing on their robots. Thank you to everyone who worked on the original project. A copy of the latest Raspberry Pi image is available [here](https://github.com/PhotonVision/photon-pi-gen/releases). A copy of the latest standalone JAR is available [here](https://github.com/PhotonVision/photonvision/releases). If you are a Gloworm user you can find the latest Gloworm image [here](https://github.com/gloworm-vision/pi-gen/releases).
For information on contributing or running PhotonVision, please read our documentation on ReadTheDocs. If you are interested in contributing code or documentation to the project, please [read our getting started page for contributors](https://docs.photonvision.org/en/latest/docs/other/contributing/index.html) and **[join the Discord](https://discord.gg/wYxTwym) to introduce yourself!** We hope to provide a welcoming community to anyone who is interested in helping.
# Roadmap
Our roadmap is publicly available on [Trello](https://trello.com/photonvision).
## Authors ## Authors
@@ -18,6 +14,8 @@ A list of contributors is available in our documentation on ReadTheDocs.
## Acknowledgments ## Acknowledgments
PhotonVision was forked from [Chameleon Vision](https://github.com/Chameleon-Vision/chameleon-vision/). Thank you to everyone who worked on the original project.
* [WPILib](https://github.com/wpilibsuite) - Specifically [cscore](https://github.com/wpilibsuite/allwpilib/tree/master/cscore), [CameraServer](https://github.com/wpilibsuite/allwpilib/tree/master/cameraserver), [NTCore](https://github.com/wpilibsuite/allwpilib/tree/master/ntcore), and [OpenCV](https://github.com/wpilibsuite/thirdparty-opencv). * [WPILib](https://github.com/wpilibsuite) - Specifically [cscore](https://github.com/wpilibsuite/allwpilib/tree/master/cscore), [CameraServer](https://github.com/wpilibsuite/allwpilib/tree/master/cameraserver), [NTCore](https://github.com/wpilibsuite/allwpilib/tree/master/ntcore), and [OpenCV](https://github.com/wpilibsuite/thirdparty-opencv).
@@ -30,4 +28,4 @@ A list of contributors is available in our documentation on ReadTheDocs.
* [FasterXML](https://github.com/FasterXML) - Specifically [jackson](https://github.com/FasterXML/jackson) * [FasterXML](https://github.com/FasterXML) - Specifically [jackson](https://github.com/FasterXML/jackson)
## License ## License
Usage of PhotonVision must fall under all terms of [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.html) PhotonVision is licensed under the [GNU General Public License](https://www.gnu.org/licenses/gpl-3.0.html)

View File

@@ -145,7 +145,7 @@ import Logs from "./views/LogsView"
}, },
data: () => ({ data: () => ({
// Used so that we can switch back to the previously selected pipeline after camera calibration // Used so that we can switch back to the previously selected pipeline after camera calibration
previouslySelectedIndex: undefined, previouslySelectedIndices: [],
timer: undefined, timer: undefined,
}), }),
computed: { computed: {
@@ -240,15 +240,23 @@ import Logs from "./views/LogsView"
}) })
}, },
switchToDriverMode() { switchToDriverMode() {
this.previouslySelectedIndex = this.$store.getters.currentPipelineIndex; if (!this.previouslySelectedIndices) this.previouslySelectedIndices = [];
this.handleInputWithIndex('currentPipeline', -1)
}, for (const [i, cameraSettings] of this.$store.state.cameraSettings.entries()) {
rollbackPipelineIndex() { this.previouslySelectedIndices[i] = cameraSettings.currentPipelineIndex;
if (this.previouslySelectedIndex !== null) { this.handleInputWithIndex('currentPipeline', -1, i);
this.handleInputWithIndex('currentPipeline', this.previouslySelectedIndex || 0);
} }
this.previouslySelectedIndex = null;
}, },
rollbackPipelineIndex()
{
if (this.previouslySelectedIndices !== null) {
for (const [i] of this.$store.state.cameraSettings.entries()) {
this.handleInputWithIndex('currentPipeline', this.previouslySelectedIndices[i] || 0, i);
}
}
this.previouslySelectedIndices = null;
}
,
switchToSettingsTab() { switchToSettingsTab() {
this.axios.post('http://' + this.$address + '/api/sendMetrics', {}) this.axios.post('http://' + this.$address + '/api/sendMetrics', {})
} }

View File

@@ -86,7 +86,7 @@ export default {
computed: { computed: {
localValue: { localValue: {
get() { get() {
return Object.values(this.value); return Object.values(this.value || [0, 0]);
}, },
set(value) { set(value) {
this.$emit("input", value); this.$emit("input", value);

View File

@@ -4,10 +4,10 @@ export const dataHandleMixin = {
let msg = this.$msgPack.encode({[key]: value}); let msg = this.$msgPack.encode({[key]: value});
this.$socket.send(msg); this.$socket.send(msg);
}, },
handleInputWithIndex(key, value) { handleInputWithIndex(key, value, cameraIndex = this.$store.getters.currentCameraIndex) {
let msg = this.$msgPack.encode({ let msg = this.$msgPack.encode({
[key]: value, [key]: value,
["cameraIndex"]: this.$store.getters.currentCameraIndex ["cameraIndex"]: cameraIndex,
}); });
this.$socket.send(msg); this.$socket.send(msg);
}, },

View File

@@ -260,7 +260,7 @@
<v-dialog <v-dialog
v-model="snack" v-model="snack"
width="500px" width="500px"
persistent="true" :persistent="true"
> >
<v-card <v-card
color="primary" color="primary"

View File

@@ -140,7 +140,7 @@ public class Main {
logger.error("Failed to parse command-line options!", e); logger.error("Failed to parse command-line options!", e);
} }
CVMat.enablePrint(true); CVMat.enablePrint(false);
PipelineProfiler.enablePrint(false); PipelineProfiler.enablePrint(false);
var logLevel = printDebugLogs ? LogLevel.TRACE : LogLevel.DEBUG; var logLevel = printDebugLogs ? LogLevel.TRACE : LogLevel.DEBUG;

View File

@@ -86,9 +86,16 @@ public class SocketHandler {
users.remove(context); users.remove(context);
if (users.size() == 0) { if (users.size() == 0) {
logger.info("All websocket connections are closed. Setting inputShouldShow to false.");
// cameraIndex -1 means the event is received by all cameras
dcService.publishEvent( dcService.publishEvent(
new IncomingWebSocketEvent<>( new IncomingWebSocketEvent<>(
DataChangeDestination.DCD_ACTIVEPIPELINESETTINGS, "inputShouldShow", false)); DataChangeDestination.DCD_ACTIVEPIPELINESETTINGS,
"inputShouldShow",
false,
-1,
null));
} }
} }

View File

@@ -53,7 +53,9 @@ public class VisionModuleChangeSubscriber extends DataChangeSubscriber {
if (event instanceof IncomingWebSocketEvent) { if (event instanceof IncomingWebSocketEvent) {
var wsEvent = (IncomingWebSocketEvent<?>) event; var wsEvent = (IncomingWebSocketEvent<?>) event;
if (wsEvent.cameraIndex != null && wsEvent.cameraIndex == parentModule.moduleIndex) { // Camera index -1 means a "multicast event" (i.e. the event is received by all cameras)
if (wsEvent.cameraIndex != null
&& (wsEvent.cameraIndex == parentModule.moduleIndex || wsEvent.cameraIndex == -1)) {
logger.trace("Got PSC event - propName: " + wsEvent.propertyName); logger.trace("Got PSC event - propName: " + wsEvent.propertyName);
var propName = wsEvent.propertyName; var propName = wsEvent.propertyName;

View File

@@ -8,7 +8,7 @@ gradle.allprojects {
String tagIsh String tagIsh
try { try {
exec { exec {
commandLine 'git', 'describe', '--tags' commandLine 'git', 'describe', '--tags', '--exclude="Dev"'
standardOutput = stdout standardOutput = stdout
} }
tagIsh = stdout.toString().trim().toLowerCase() tagIsh = stdout.toString().trim().toLowerCase()