PWM rescaling

This commit is contained in:
2025-06-26 03:00:30 -04:00
parent 9f3031348b
commit f84a42ca96
7 changed files with 1647 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ static int rescale_raw_val (int raw) {
int s;
//s = 4*raw - 8190;
int s = raw*raw + 4.122*raw - 8190;
int s = -(raw*raw) + 4.122*raw - 8190;
//s = (8190/2048^1)*(raw - 2048)^1; // Linear rescaling
//s = (8190/1870^3)*(raw - 1870)^3; // Cubic rescaling
return s;