This file contains hidden or 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
// Context: https://github.com/madcowswe/ODrive/pull/419 | |
#include <stdint.h> | |
struct HwConfig_t { | |
// [polynomial and ADC channel] | |
}; | |
class ThermistorCurrentLimiter { | |
public: |
This file contains hidden or 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
# Maintainer: Yunhui Fu ([email protected]) | |
# Contributor: Julien Sopena ([email protected]) | |
# Contributor: Oleg Smirnov ([email protected]) | |
# Contributor: angrycore ([email protected]) | |
# Contributor: Christophe Guéret ([email protected]) | |
# Contributor: oguzkagan <me at oguzkaganeren dot com dot tr> | |
# | |
pkgname="omnetpp" | |
pkgver=5.5.1 | |
pkgrel=3 |
This file contains hidden or 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
/* | |
* Note: This code is mostly taken from Whitequark's Lab Notebook: | |
* https://lab.whitequark.org/notes/2017-11-08/accessing-intel-ich-pch-gpios/ | |
* | |
* Compile with: | |
* gcc -std=c11 -lpci -Wall -g -o gpioke gpioke.c | |
* | |
* Usage Example: | |
* sudo ./gpioke --set-dir 10 1 --set-level 10 0 --sleep 1000 --set-level 10 1 | |
* |
This file contains hidden or 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 <stdint.h> | |
#include <odrive_main.h> | |
#include <axis.hpp> | |
#include <algorithm> | |
#include "midi.hpp" | |
#define MAX_SONGS 10 | |
const uint8_t* songs[MAX_SONGS] = {0}; |
This file contains hidden or 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
def generic_test(test_name, axis, vf_tuples, duration = 2.0, savefile = None): | |
axis.motor.config.motor_type = 2 # force voltage control | |
axis.motor.config.pole_pairs = 1 # ensure vel_setpoint is in [Hz] | |
axis.controller.current_setpoint = 0 | |
axis.requested_state = 11 # open loop | |
axis.controller.vel_setpoint = 0 | |
time.sleep(0.01) | |
if axis.current_state != 11: |
This file contains hidden or 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
source Support/gdbtrace.init | |
target remote | openocd -f "interface/stlink-v2.cfg" -f "target/stm32f4x_stlink.cfg" -c "gdb_port pipe; log_output openocd.log" | |
#cortex_m vector_catch all | |
#monitor swdp_scan | |
monitor reset halt | |
monitor cortex_m vector_catch all | |
#file /Data/Projects/ODrive/Firmware/build/ODriveFirmware.elf | |
#attach 1 # <---- Connect to the target | |
set mem inaccessible-by-default off |
This file contains hidden or 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
source Support/gdbtrace.init | |
target remote | openocd -f "interface/stlink-v2.cfg" -f "target/stm32f4x_stlink.cfg" -c "gdb_port pipe; log_output openocd.log" | |
#cortex_m vector_catch all | |
#monitor swdp_scan | |
monitor reset halt | |
monitor cortex_m vector_catch all | |
#file /Data/Projects/ODrive/Firmware/build/ODriveFirmware.elf | |
#attach 1 # <---- Connect to the target | |
set mem inaccessible-by-default off |
This file contains hidden or 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
[ | |
{ | |
"omega_stator": 6.283185307179586, | |
"omega_rotor": 0, | |
"timestamps": [ | |
1.0155001291423105e-05, | |
0.00447514600091381, | |
0.008955860999776633, | |
0.011569055001018569, | |
0.014018842000950826, |
This file contains hidden or 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
[ | |
{ | |
"omega_stator": 0.0, | |
"omega_rotor": 0, | |
"timestamps": [ | |
6.594000296900049e-06, | |
0.002872992999982671, | |
0.006120308999015833, | |
0.009046040999237448, | |
0.01208515699909185, |
This file contains hidden or 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 numpy as np | |
from math import pi, sqrt | |
from scipy.integrate import odeint, complex_ode | |
from scipy.optimize import least_squares | |
import matplotlib.pyplot as plt | |
filenames = [ | |
"dc_test_blue_motor_2019-04-05.json", | |
# "blocked_rotor_test_blue_motor_2019-04-05.json" |
NewerOlder