Skip to content

Instantly share code, notes, and snippets.

View mr-sour's full-sized avatar

Chris Sauer mr-sour

View GitHub Profile
@mr-sour
mr-sour / agpsublox.py
Created October 30, 2023 01:48
UBLOX agps betaflight cli
import requests
import serial
#Edit me!!
token = "TOKEN" #Token getted from u-blox
comPort = "/dev/tty.usbmodem" #GPS Com port
print ("Connecting to u-blox")
r = requests.get("http://online-live1.services.u-blox.com/GetOnlineData.ashx?token=" + token + ";gnss=gps;datatype=eph,alm,aux,pos;filteronpos;format=aid", stream=True)
print ("Downloading A-GPS data")
@mr-sour
mr-sour / ATGM336H.md
Created September 28, 2022 16:20
Betaflight config for ATGM336H

#Connect at 9600 with minicom

minicom -b 9600 -D /dev/ttyUSB0

#After each command send ctrl-J to add the linefeed

#Suppress unwanted sentences:

$PCAS03,1,0,0,9,3,0,0,0*09

This guide is for fedora

clone j1939 linux kernel branch git clone git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git

cd linux-can-next

switch to j1939 branch

copy your current kernel config cp /boot/config-uname -r* .config

@mr-sour
mr-sour / Fedora grub2 lenovo x1 s3 sleep state.md
Last active January 13, 2023 16:46
this edits the dsdt table to add s3 support for the x1 carbon gen6 ALPHA use at your own risk I'm not done with the writeup

first part from https://delta-xi.net/#056

Reboot, enter your BIOS/UEFI. Go to Config - Thunderbolt (TM) 3 - set Thunerbolt BIOS Assist Mode to Enabled. It has also been reported that Security - Secure Boot must be disabled.

Install iasl (Intel's compiler/decompiler for ACPI machine language) and cpio from your distribution.

Get a dump of your ACPI DSDT table.

$ cat /sys/firmware/acpi/tables/DSDT > dsdt.aml