SRA Board Components
ESP-IDF component for SRA Board
|
#include "utils.h"
Functions | |
float | bound (float val, float min, float max) |
Bound a value in a range [min, max]. More... | |
float | map (float val, float input_lower_limit, float input_higher_limit, float output_lower_limit, float output_higher_limit) |
Maps a value in range [input_lower_limit, input_higher_limit] to [output_lower_limit, output_higher_limit]. More... | |
float bound | ( | float | val, |
float | min, | ||
float | max | ||
) |
Bound a value in a range [min, max].
val | value to be bound |
min | min value which the variable can take |
max | max value which the variable can take |
float map | ( | float | val, |
float | input_lower_limit, | ||
float | input_higher_limit, | ||
float | output_lower_limit, | ||
float | output_higher_limit | ||
) |
Maps a value in range [input_lower_limit, input_higher_limit] to [output_lower_limit, output_higher_limit].
val | value to be mapped |
input_lower_limit | min value of val |
input_higher_limit | max value of val |
output_lower_limit | input_lower_limit is mapped to output_lower_limit |
output_higher_limit | input_higher_limit is mapped to output_higher_limit |