Testing done using a Canon EOS 600D and a Canon EF-S18-55mm f/3.5-5.6 IS II.
- VBAT
- DET (common with P-GND on lens side)
- P-GND
- VDD
- DCL
- DLC
#!/usr/bin/env python3 | |
""" | |
gtkwave-sigrok-filter.py | |
Use as a 'Transaction Filter Process' in gtkwave to apply signal | |
Usage: | |
- Group input signals in gtkwave with F4 | |
- Apply this script as a 'Transaction Filter Process' (Right click / Data Format) |
#!/usr/bin/env python | |
# Extract playlists from a non-XML iTunes Library file (.itl) | |
# Copyright (c) 2018 Benno Rice, released under the BSD (2 Clause) Licence. | |
# Important information on the encryption used in the .itl file found here: | |
# https://mrexodia.cf/reversing/2014/12/16/iTunes-Library-Format-1 | |
# Highly useful information on the .itl format itself found here: | |
# https://github.com/josephw/titl/blob/master/titl-core/src/main/java/org/kafsemo/titl/ParseLibrary.java |
The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).
My take-aways are:
You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.
Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse
/** | |
* Trying to get all 16 pwm outputs on a stm32f103rb | |
*/ | |
#include <libopencm3/stm32/rcc.h> | |
#include <libopencm3/stm32/f1/gpio.h> | |
#include <libopencm3/stm32/f1/timer.h> | |
#define MOTOR1_PHASE_A1 GPIO8 // PA8 fixed | |
#define MOTOR1_PHASE_A2 GPIO9 // PA9 fixed |
inline int rol (int in, int x) { | |
int res; | |
__asm__ __volatile__("rol %%eax, %%cl" :"=a"(res) :"a"(in), "c"(x)); | |
return res; | |
} | |
inline int ror (int in, int x) { | |
int res; | |
__asm__ __volatile__("ror %%eax, %%cl" :"=a"(res) :"a"(in), "c"(x)); |
I use Ubuntu Mate instead of the usual Raspbian Jessie mainly because of the gcc version. ORB-SLAM2 requires C++11 support. Raspbian comes with gcc 4.9, which does not handle C++11 by default. That means you have to play around with some compiler flags in ORB-SLAM2's CMakeLists.txt to make it work. In contrast, Ubuntu Mate's gcc 5.4 handles C++11 naturally.
// WAV header spec information: | |
//https://web.archive.org/web/20140327141505/https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ | |
//http://www.topherlee.com/software/pcm-tut-wavformat.html | |
typedef struct wav_header { | |
// RIFF Header | |
char riff_header[4]; // Contains "RIFF" | |
int wav_size; // Size of the wav portion of the file, which follows the first 8 bytes. File size - 8 | |
char wave_header[4]; // Contains "WAVE" | |
setcap cap_net_bind_service=+ep /usr/local/bin/caddy | |
nano /etc/systemd/system/caddy.service | |
semanage fcontext -a -t httpd_exec_t /usr/local/bin/caddy | |
restorecon /usr/local/bin/caddy | |
chown www-data:www-data /etc/ssl/caddy/ | |
semanage fcontext -a -t httpd_sys_rw_content_t /etc/ssl/caddy | |
restorecon /etc/ssl/caddy |