I hereby claim:
- I am stahlnow on github.
- I am stahl303 (https://keybase.io/stahl303) on keybase.
- I have a public key ASCF7w7T3o1evq-tPxDeUrNNnQFkYwjOZ18Zwm-hOmDPngo
To claim this, I am signing this object:
| // based largely on Atmel's AVR136: Low-Jitter Multi-Channel Software PWM Application Note: | |
| // http://www.atmel.com/dyn/resources/prod_documents/doc8020.pdf | |
| #include <avr/io.h> | |
| #include <util/delay.h> | |
| #include <avr/interrupt.h> | |
| #define CHMAX 3 // maximum number of PWM channels | |
| #define PWMDEFAULT 0x00 // default PWM value at start up for all channels |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python3 | |
| # Author: edoz90 | |
| import sys | |
| try: | |
| # http://click.pocoo.org/5/why/ | |
| import click | |
| import dbus | |
| from colored import fg, stylize | |
| except: | |
| print("Need to install click, dbus-python and colored") |
This function returns the nearest aspect ratio of a width and height within a limited range of possible aspect ratios.
In other words, while 649x360 technically has an aspect ratio of 649:360, it’s often useful to know that the nearest normal aspect ratio is actually 9:5 (648x360).
nearestNormalAspectRatio(width, height, [side], [maxWidth], [maxHeight])