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:
push:
branches: [ master ]
tags:
- 'v*'
pull_request:
branches: [ master ]
@@ -104,11 +106,6 @@ jobs:
pip install sphinx sphinx_rtd_theme sphinx-tabs sphinxext-opengraph doc8
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
run: |
make linkcheck
@@ -123,7 +120,6 @@ jobs:
with:
name: built-docs
path: build/html
build-package:
needs: [build-client, build-server, build-offline-docs]
@@ -210,4 +206,17 @@ jobs:
- run: |
chmod +x gradlew
./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
[![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.
# Roadmap
Our roadmap is publicly available on [Trello](https://trello.com/photonvision).
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.
## Authors
@@ -18,6 +14,8 @@ A list of contributors is available in our documentation on ReadTheDocs.
## 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).
@@ -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)
## 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: () => ({
// Used so that we can switch back to the previously selected pipeline after camera calibration
previouslySelectedIndex: undefined,
previouslySelectedIndices: [],
timer: undefined,
}),
computed: {
@@ -240,15 +240,23 @@ import Logs from "./views/LogsView"
})
},
switchToDriverMode() {
this.previouslySelectedIndex = this.$store.getters.currentPipelineIndex;
this.handleInputWithIndex('currentPipeline', -1)
},
rollbackPipelineIndex() {
if (this.previouslySelectedIndex !== null) {
this.handleInputWithIndex('currentPipeline', this.previouslySelectedIndex || 0);
if (!this.previouslySelectedIndices) this.previouslySelectedIndices = [];
for (const [i, cameraSettings] of this.$store.state.cameraSettings.entries()) {
this.previouslySelectedIndices[i] = cameraSettings.currentPipelineIndex;
this.handleInputWithIndex('currentPipeline', -1, i);
}
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() {
this.axios.post('http://' + this.$address + '/api/sendMetrics', {})
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -86,9 +86,16 @@ public class SocketHandler {
users.remove(context);
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(
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) {
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);
var propName = wsEvent.propertyName;

View File

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