This file contains 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 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
from pymavlink import mavutil | |
import threading | |
connection = mavutil.mavlink_connection("udp:0.0.0.0:14592") | |
local = mavutil.mavlink_connection("udpout:127.0.0.1:14593") | |
def on_msg_from_uas(msg): | |
buf = msg.get_msgbuf() | |
local.write(buf) |
This file contains 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 | |
gst-launch-1.0 udpsrc port=5801 ! 'application/x-rtp,payload=96,encoding-name=H264,clock-rate=(int)90000' ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! autovideosink sync=false |
This file contains 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
// | |
// An example of how to generate permutations | |
// using STL algorithms library | |
// | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
int main () { | |
const int N = 8; |
This file contains 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
# This makefile finds all .mp4 files and attempts to repair their indexes without re-encoding. | |
# It's a makefile so you can use "make -jN" to take advantage of N cores on your computer finish many quickly | |
MP4:=$(wildcard *.mp4) | |
OUTDIR:=out | |
FAST:=$(patsubst %.mp4,${OUTDIR}/%.fast.mp4,${MP4}) | |
REKEYED:=$(patsubst %.mp4,${OUTDIR}/%.rekeyed.mp4,${MP4}) | |
all: | |
@echo "Use 'make fast' to do a fast file index rebuild" |
This file contains 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
import socket | |
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
sock.bind(('0.0.0.0', 5005)) | |
while True: | |
data, addr = sock.recvfrom(65536) | |
print("received: %d" % len(data)) |
This file contains 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 <csignal> | |
#include <cstring> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <termios.h> | |
#include <zmq.h> | |
#include "mavlink/ardupilotmega/mavlink.h" | |
inline bool set_baud(termios *cfg, speed_t baud) |
This file contains 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 <cstring> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <thread> | |
#include "ardupilotmega/mavlink.h" | |
int open_socket(uint16_t port) |
This file contains 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
#!/usr/bin/python | |
import socket | |
import sys | |
TELEM_DEST_HOST = '0.0.0.0' | |
TELEM_DEST_PORT = 14550 | |
STM32_HOST = '127.0.0.1' | |
STM32_PORT = 5015 |
This file contains 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
syntax = "proto3"; | |
package request1; | |
message Request { | |
Type type = 1; | |
AmazingCommand amazingCommand = 2; | |
BeautifulCommand beautifulCommand = 3; | |
CharmingCommand charmingCommand = 4; | |
DashingCommand dashingCommand = 5; |