Cleanup arduino useless bullshit

This commit is contained in:
2022-05-23 23:28:35 +02:00
parent e1540e64a6
commit c85a4725a9
29 changed files with 187 additions and 341 deletions

View File

@ -27,20 +27,20 @@ extern "C" {
#include "esp_system.h"
}
long map(long x, long in_min, long in_max, long out_min, long out_max) {
const long dividend = out_max - out_min;
const long divisor = in_max - in_min;
const long delta = x - in_min;
//long map(long x, long in_min, long in_max, long out_min, long out_max) {
// const long dividend = out_max - out_min;
// const long divisor = in_max - in_min;
// const long delta = x - in_min;
return (delta * dividend + (divisor / 2)) / divisor + out_min;
}
// return (delta * dividend + (divisor / 2)) / divisor + out_min;
//}
unsigned int makeWord(unsigned int w)
{
return w;
}
//unsigned int makeWord(unsigned int w)
//{
// return w;
//}
unsigned int makeWord(unsigned char h, unsigned char l)
{
return (h << 8) | l;
}
//unsigned int makeWord(unsigned char h, unsigned char l)
//{
// return (h << 8) | l;
//}