diff --git a/companion/src/firmwares/curvedata.cpp b/companion/src/firmwares/curvedata.cpp index 3843fb77b..904863a3d 100644 --- a/companion/src/firmwares/curvedata.cpp +++ b/companion/src/firmwares/curvedata.cpp @@ -30,18 +30,6 @@ void CurveData::clear(int count) { memset(reinterpret_cast(this), 0, sizeof(CurveData)); this->count = count; - - int incr = 200 / (count - 1); - - // points[0].x must be -100 - for (int i = 0; i < count; i++) { - if (i < count - 1) - points[i].x = -100 + incr * i; - else - points[i].x = 100; // points[last].x must be +100 do not risk a rounding issue using incr - - points[i].y = points[i].x; - } } bool CurveData::isEmpty() const diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp index 423f5050c..9e186e095 100644 --- a/companion/src/firmwares/opentx/opentxeeprom.cpp +++ b/companion/src/firmwares/opentx/opentxeeprom.cpp @@ -1280,10 +1280,6 @@ class CurvesField: public TransformedField { curve->points[j].x = *cur++; curve->points[curve->count-1].x = +100; } - else { - for (int j=0; jcount; j++) - curve->points[j].x = -100 + (200*i) / (curve->count-1); - } qCDebug(eepromImport) << QString("imported curve: %3 points").arg(curve->count); } }