This commit is contained in:
Matthew Kennedy 2019-01-16 05:24:37 -08:00 committed by rusefi
parent 8539ba3271
commit fbc15b4bd2
4 changed files with 7 additions and 7 deletions

View File

@ -238,7 +238,7 @@ int findIndex(const float array[], int size, float value) {
/**
* @brief One-dimensional table lookup with linear interpolation
*/
float interpolate2d(const char *msg, float value, float bin[], float values[], int size) {
float interpolate2d(const char *msg, float value, const float bin[], const float values[], int size) {
if (isnan(value)) {
firmwareError(CUSTOM_INTERPOLATE_NAN, "NaN in interpolate2d %s", msg);
return NAN;

View File

@ -26,7 +26,7 @@ void ensureArrayIsAscending(const char *msg, const float array[], int size);
int findIndex2(const float array[], unsigned size, float value);
float interpolateClamped(float x1, float y1, float x2, float y2, float x);
float interpolateMsg(const char *msg, float x1, float y1, float x2, float y2, float x);
float interpolate2d(const char *msg, float value, float bin[], float values[], int size);
float interpolate2d(const char *msg, float value, const float bin[], const float values[], int size);
int needInterpolationLogging(void);

View File

@ -305,7 +305,7 @@ bool OutputPin::getLogicValue() {
return currentLogicValue;
}
void OutputPin::setDefaultPinState(pin_output_mode_e *outputMode) {
void OutputPin::setDefaultPinState(const pin_output_mode_e *outputMode) {
pin_output_mode_e mode = *outputMode;
assertOMode(mode);
this->modePtr = outputMode;
@ -369,7 +369,7 @@ void OutputPin::initPin(const char *msg, brain_pin_e brainPin) {
initPin(msg, brainPin, &DEFAULT_OUTPUT);
}
void OutputPin::initPin(const char *msg, brain_pin_e brainPin, pin_output_mode_e *outputMode) {
void OutputPin::initPin(const char *msg, brain_pin_e brainPin, const pin_output_mode_e *outputMode) {
#if EFI_GPIO_HARDWARE || defined(__DOXYGEN__)
if (brainPin == GPIO_UNASSIGNED)
return;

View File

@ -30,7 +30,7 @@ public:
/**
* initializes pin & registers it in pin repository
*/
void initPin(const char *msg, brain_pin_e brainPin, pin_output_mode_e *outputMode);
void initPin(const char *msg, brain_pin_e brainPin, const pin_output_mode_e *outputMode);
/**
* same as above, with DEFAULT_OUTPUT mode
*/
@ -58,10 +58,10 @@ public:
*/
private:
// todo: inline this method?
void setDefaultPinState(pin_output_mode_e *defaultState);
void setDefaultPinState(const pin_output_mode_e *defaultState);
// 4 byte pointer is a bit of a memory waste here
pin_output_mode_e *modePtr;
const pin_output_mode_e *modePtr;
};