This commit is contained in:
rusefi 2018-01-07 11:23:28 -05:00
parent 9684549124
commit a4dbe1a9e6
2 changed files with 4 additions and 0 deletions

View File

@ -252,6 +252,7 @@ float interpolate2d(const char *msg, float value, float bin[], float values[], i
/**
* Sets specified value for specified key in a correction curve
* see also setLinearCurve()
*/
void setCurveValue(float bins[], float values[], int size, float key, float value) {
int index = findIndexMsg("tbVl", bins, size, key);

View File

@ -10,6 +10,9 @@
#include "efilib.h"
#include "interpolation.h"
/**
* @param precision for example '0.1' for one digit fractional part
*/
void setLinearCurve(float array[], int size, float from, float to, float precision) {
for (int i = 0; i < size; i++) {
float value = interpolateMsg("setTable", 0, from, size - 1, to, i);