Skip to content

Instantly share code, notes, and snippets.

View jaxxzer's full-sized avatar
🍑
rounding edges

Jacob Walser jaxxzer

🍑
rounding edges
View GitHub Profile
#!/usr/bin/python
# - erase autopilot parameters (reset to defaults)
# - reboot autopilot to apply changes
import os
import time
from pymavlink import mavutil
from argparse import ArgumentParser
@jaxxzer
jaxxzer / gist:23325a7f87c51161801cad709c7e02ac
Created November 2, 2020 23:39
Verify Pixhawk SD card
#!/usr/bin/python
# - verify that logging to sd card is working OK
import os
import time
from pymavlink import mavutil
from argparse import ArgumentParser
parser = ArgumentParser(description=__doc__)
@jaxxzer
jaxxzer / pipelines.txt
Last active December 12, 2023 22:54
gstreamer pipelines
// rtsp receivers:
gst-launch-1.0 rtspsrc location="rtsp://192.168.0.102:8554/test" protocols=GST_RTSP_LOWER_TRANS_TCP latency=0 ! rtph264depay ! decodebin ! videoconvert ! autovideosink sync=false
gst-launch-1.0 rtspsrc location=rtsp://192.168.1.156:8554/test ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! autovideosink
// Stream video to window and record it to file
gst-launch-1.0 -e -v udpsrc port=5600 ! tee name=VIDEOWINDOW ! queue ! application/x-rtp, encoding-name=H264, payload=96 ! rtph264depay ! h264parse ! mp4mux ! filesink location=myvideo.mp4 VIDEOWINDOW. ! queue ! application/x-rtp, payload=96 ! rtph264depay ! avdec_h264 ! autovideosink

check the disk

lsblk -f

unmount the disk

umount /dev/sdX?*
@jaxxzer
jaxxzer / openssl_commands.md
Created August 28, 2018 15:29 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
In gparted, unmount the ext4, and resize the partition
$ sudo parted /dev/sdg -s print
Model: Generic Mass-Storage (scsi)
Disk /dev/sdg: 7948MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
@jaxxzer
jaxxzer / gist:c08e98306672b24fae98541b7f851746
Created September 13, 2017 19:07
Mount raspberry pi filesystem
$ fdisk -l ardusub-raspbian-0.0.8.img
Disk ardusub-raspbian-0.0.8.img: 3.1 GiB, 3349151744 bytes, 6541312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1b4801d2
Device Boot Start End Sectors Size Id Type
ardusub-raspbian-0.0.8.img1 8192 92159 83968 41M c W95 FAT32 (LBA)
@jaxxzer
jaxxzer / gist:597abfdaad20e139f288c34d5b17240c
Created June 22, 2017 01:59
Convert intel hex to binary
jack@jack-desktop:~/git/stm32flash-code(master)$ srec_cat file.hex -intel -o file.mot
jack@jack-desktop:~/git/stm32flash-code(master)$ srec_cat file.mot -o file.bin -binary
jack@jack-desktop:~/git/stm32flash-code(master)$ srec_cat file.mot -offset - -minimum-addr file.mot -o Altimeter-v2.31.bin -binary
jack@jack-desktop:~/git/stm32flash-code(master)$ time ./stm32flash -g 0x0 -b 115200 -w file.bin /dev/ttyUSB1
stm32flash 0.5
http://stm32flash.sourceforge.net/
Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1
@jaxxzer
jaxxzer / gist:8717b3d30356920c496146c73c451fbd
Created June 16, 2017 17:09
Change I2C clock rate on RPI3
Add to /boot/config.txt (units Hz):
dtparam=i2c1_baudrate=50000
Can go as low as 5khz
@jaxxzer
jaxxzer / gstreamer-build.sh
Created February 15, 2017 21:33 — forked from sphaero/gstreamer-build.sh
Install & build gstreamer from git
#!/bin/bash --debugger
set -e
BRANCH="master"
if grep -q BCM2708 /proc/cpuinfo; then
echo "RPI BUILD!"
RPI="1"
fi
[ -n "$1" ] && BRANCH=$1