Browse Source

update

master
zhaohe 2 years ago
parent
commit
8d2dd98012
  1. 2
      chip/basic/basic_h/marco.h
  2. 2
      components/step_motor_ctrl_module/step_motor_ctrl_module.cpp

2
chip/basic/basic_h/marco.h

@ -1,6 +1,6 @@
#pragma once
#ifndef ZARRAY_SIZE
#define ZARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
#define ZARRAY_SIZE(x) ((int32_t)(sizeof(x) / sizeof(x[0])))
#endif
#define ZMAX(a, b) ((a) > (b) ? (a) : (b))
#define ZMIN(a, b) ((a) < (b) ? (a) : (b))

2
components/step_motor_ctrl_module/step_motor_ctrl_module.cpp

@ -258,7 +258,7 @@ int32_t StepMotorCtrlModule::rotate(int32_t speed, int32_t lastforms, action_cb_
bool reachtime = false;
while (!m_thread.getExitFlag()) {
if (zos_haspassedms(startticket) > lastforms && lastforms != 0) {
if ((int32_t)zos_haspassedms(startticket) > lastforms && lastforms != 0) {
reachtime = true;
m_stepM1->stop();
break;

Loading…
Cancel
Save