- 5005 - Radio control joystick data -
pixrc
process on the Solo listens to this for rc joystick messages - 5010 - Config Stick Axes Msg
- 5011 - Param Stored Values Msg
- 5012 - sysDestPort?
- 5013 - pairReqPort -
stm32
process on Artoo listens to pair requests from the pair_server process - 5014 - pairReqDestPort -
stm32
process on Artoo sends to this port on the pair_server process - 5015 - mavDestPort -
stm32
process receives telemetry from the telem_ctrl process here - 5016 - buttonEventPort (TCP) - Subscribe to button events on the Artoo (pause, home, A, B, etc) by connecting to this port on the Artoo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>gstreamer video example</title> | |
</head> | |
<body> | |
<video width=640 height=480 autoplay> | |
<source src="http://localhost:8080"> | |
</video> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
xrandr --output HDMI-0 --mode 1920x1080 --scale 1.5x1.5 --panning 2880x1620+0+0 --output DP-4 --mode 3840x2160 --panning 3840x2160+2880+0 --scale 1x1 --output DVI-I-1 --mode 1920x1080 --scale 1.5x1.5 --panning 2880x1620+6720+0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
class DisjointSet { | |
private: | |
std::vector<int> parent, rank; | |
public: | |
DisjointSet(int n) : parent(2 * n, -1), rank(2 * n, -1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cmath> | |
#include <iomanip> | |
double compute_h2(double r, double d, double h1) { | |
double t = -2.0 * std::acos((r - d) / r); | |
double x = std::sqrt(r * r - (r - h1) * (r - h1)); | |
return ((h1 - r) * std::cos(t)) + (x * std::sin(t)) + r; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# examples for trimming without re-encoding | |
ffmpeg -ss 01:48:12 -i in.ogv -t 00:02:37 -c copy out.ogv | |
# examples for trimming a video | |
ffmpeg -ss 00:12:30 -i in.ogv -t 00:12:55 -filter:v "crop=1774:999:16:42" -c:v libx264 -preset slow out1.mp4 | |
ffmpeg -ss 01:48:12 -i in.ogv -t 00:02:37 -filter:v "crop=1763:999:0:51" -c:v libx264 -preset slow out2.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Basic gstreamer quad video wall application. | |
# Displays 4 videos. | |
# They have to be synced to eachother and playing for this to work. | |
PARAMS_NEEDED=4 | |
if [ $# -ne $PARAMS_NEEDED ] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
char findSuperMajority(const std::string &str) | |
{ | |
const size_t len(str.length()); | |
int count(0); | |
char val(str[0]); | |
for (char c : str) { | |
if (count == 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example UDEV rules to make the wlan devices look nicer | |
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:c0:ca:5a:5a:cb", NAME="wlan0" | |
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:c0:ca:84:a1:f7", NAME="wlan1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*------------------------------------------------------------------------------ | |
* Open a serial port to the MAV with the given port name and baud rate. | |
* returns: the file descriptor, or < 0 if error. | |
*/ | |
static int mav_serial_open(const char *port_name, uint32_t const baud_rate) | |
{ | |
// attempt to open the port. | |
int fd = open(port_name, O_RDWR | O_NOCTTY | O_NDELAY); | |
if (fd < 0) { | |
fprintf(stderr, "ERROR: Could not open() serial port %s.\n", port_name); |