Skip to content

Instantly share code, notes, and snippets.

View corecode's full-sized avatar

Simon Schubert corecode

View GitHub Profile
Head: no-unconnected-non-copper-pad Do not consider non-copper pads for connectivity
Push: gh/no-unconnected-non-copper-pad Do not consider non-copper pads for connectivity
Tag: 4.0.0-rc2 (2867)
Untracked files (1)
pcbnew/#class_drc_item.cpp#
Unstaged changes (5)
modified CMakeLists.txt
@@ -573,9 +573,11 @@ endif()
gpio_set(GPIOB, GPIO1);
if (adc_eoc(ADC1)) {
gpio_clear(GPIOB, GPIO1);
uint32_t raw = adc_read_regular(ADC1);
battery_new_sample(raw);
}
gpio_clear(GPIOB, GPIO1);
@corecode
corecode / sampler.py
Created August 31, 2017 16:54 — forked from ynsta/sampler.py
Statistic profiling on stm32f4 with openocd by dwt_pcsr sampling
#!/usr/bin/python2
# run openocd (0.9.0) with :
# $ openocd -f stlink-v2-1.cfg -f stm32f4x.cfg &> /dev/null"
# then run
# $ python2 sampler.py path_to_myelf_with_symbols
import sys
import time
import telnetlib
Version 4
SHEET 1 1292 708
WIRE -176 144 -256 144
WIRE -144 144 -176 144
WIRE 192 144 -144 144
WIRE 656 144 320 144
WIRE 720 144 656 144
WIRE 752 144 720 144
WIRE 192 288 192 224
WIRE 192 288 -48 288
##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2015 Stefan Brüns <stefan.bruens@rwth-aachen.de>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
// Delta calibration script
var debug = true;
var initialPoints = 7;
var initialFactors = 6;
var numEarlierRows = 12; // must match the HTML
var numLaterRows = 9; // must match the HTML
// Delta calibration script
var debug = true;
var initialPoints = 7;
var initialFactors = 6;
var numEarlierRows = 12; // must match the HTML
var numLaterRows = 9; // must match the HTML
class Comm
def initialize(f)
@f = f
@n = 0
@debug = true
self.wait(/start/)
self.wait(/wait/)
self._send("m110")
self.waitok
end
require 'ostruct'
require 'matrix'
class DeltaError
def self.deltaConst(config)
config = OpenStruct.new(config)
res = OpenStruct.new
res.radiusA = config.radius + (config.aradius||0)
res.radiusB = config.radius + (config.bradius||0)
res.radiusC = config.radius + (config.cradius||0)
// ==UserScript==
// @run-at document-start
// @id Aliexpress URL Cleaner
// @name Aliexpress URL Cleaner
// @namespace
// @description Clean aliexpress item URL
// @include http://www.aliexpress.com/item/*
// @include https://www.aliexpress.com/item/*
// @include http://www.aliexpress.com/store/product/*
// @include https://www.aliexpress.com/store/product/*