diff --git a/usrc/main.cpp b/usrc/main.cpp index 46c332c..84baacf 100644 --- a/usrc/main.cpp +++ b/usrc/main.cpp @@ -136,9 +136,10 @@ void Main::run() { m_motor1.setDeceleration(acc); m_motor1.rotate(ppm); }); - m_pumpCtrlModule.regSubmodule(2, [&](int16_t acc, int16_t rpm) { - ZLOGI(TAG, "pump2 acc:%d rpm:%d", acc, rpm); + m_pumpCtrlModule.regSubmodule(2, [&](int16_t acc_rpm2, int16_t rpm) { + ZLOGI(TAG, "pump2 acc:%d rpm:%d", acc_rpm2, rpm); int32_t ppm = rpm / 60.0 * 51200; + int32_t acc = acc_rpm2 / 60.0 * 51200; m_motor2.setAcceleration(acc); m_motor2.setDeceleration(acc); m_motor2.rotate(ppm); @@ -184,7 +185,6 @@ void Main::run() { triLight_B.setState(b != 0); triLight_BEEP.setState(beep != 0); }); - } /*******************************************************************************