Browse Source

update

master
zhaohe 2 years ago
parent
commit
4301544edc
  1. 6
      usrc/main.cpp

6
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);
});
}
/*******************************************************************************

Loading…
Cancel
Save