Skip to content

Instantly share code, notes, and snippets.

@festlv
festlv / config.json
Created September 22, 2023 12:00
LinuxCNC-RIO config with joint_pwmdir
{
"name": "Concrete",
"description": "only for testing",
"toolchain": "icestorm",
"family": "ecp5",
"type": "25k",
"package": "CABGA381",
"transport": "SPI",
"clock": {
"osc": "25000000",
@festlv
festlv / main.py
Last active January 7, 2022 22:27
air-guard main.py exploratory prototype
from sargs import *
# Pārbaude pēc ieslēgšanās: ieslēdzam visas gaismas diodes pēc kārtas
pins = [LED_ZALS, LED_DZELTENS, LED_SARKANS, LED_KREISA_ACS, LED_LABA_ACS]
for p in pins:
p.ieslegt()
pagaidit(0.5)
# Nedaudz uzgaidot, izslēdzam visas gaismas diodes apgrieztā kārtībā
pagaidit(1)
From 4f3240878abf7e5bbd5750e5d204fb598589cc05 Mon Sep 17 00:00:00 2001
From: Reinis Veips <reinis.veips@XXX>
Date: Tue, 29 May 2018 16:30:21 +0300
Subject: [PATCH 1/1] Use rangefinder in EKF Replay
---
Tools/Replay/LR_MsgHandler.cpp | 6 +++
Tools/Replay/LR_MsgHandler.h | 14 +++++++
Tools/Replay/LogReader.cpp | 9 ++++-
Tools/Replay/LogReader.h | 3 +-
@festlv
festlv / 99-pocketvna.rules
Created May 17, 2018 07:48
udev rules for pocketvna. Place in /etc/udev/rules.d and reload with `sudo udevadm control --reload`
#/etc/udev/rules.d/99-pocketvna.rules
# HIDAPI/libusb
SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", MODE="0666"
# HIDAPI/hidraw
KERNEL=="hidraw*", ATTRS{busnum}=="1", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", MODE="0666"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@festlv
festlv / bits.py
Created November 13, 2015 12:31
Small utility to look at number representation in different bases.
#!/usr/bin/env python3
"""
Small utility to see number representation in different bases. Example usage:
$ ./bits.py
> 9023
DEC: 9023, HEX: 233F, BIN: 0010 0011 0011 1111
> 25407
DEC: 25407, HEX: 633F, BIN: 0110 0011 0011 1111
> q
$
I am now able to insert test-image.png in other.md file using ![..](test-image.png) as opposed to ![..](static/otherpage/test-image.png)
content
├── pages
│   ├── otherpage
│   │   ├── test-image.png
│   │   └── other.md
│   └── project
│   ├── another-image.png
│   └── project.md