mirror of
https://gitlab.com/Luci_/arduino-photometrics.git
synced 2026-04-03 11:35:37 +02:00
23 lines
594 B
C++
23 lines
594 B
C++
#include <Arduino.h>
|
|
#include "traitement.h"
|
|
|
|
Traitement::Traitement(){}
|
|
|
|
Traitement::~Traitement(){}
|
|
|
|
|
|
/**
|
|
* @brief map_r
|
|
* * Normalise resistance value
|
|
*
|
|
* * @param min_res_tab @c int32_t*
|
|
* @param max_res_tab @c int32_t*
|
|
* @param res_values @c int32_t*
|
|
* @param result @c int32_t*
|
|
* @param tab_lenght @c uint8_t
|
|
*/
|
|
void Traitement::map_r(int32_t* min_res_tab, int32_t* max_res_tab, int32_t* res_values, int16_t* result, uint8_t tab_lenght){
|
|
for(int i = 0; i < tab_lenght; i++){
|
|
result[i] = map(res_values[i], min_res_tab[i], max_res_tab[i], min_out_norm, max_out_norm);
|
|
}
|
|
} |