arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.04k stars 4.78k forks source link

A4988_Stepper , Motor commands doesnt give feedback while called without argument. Motor MIS not working ? #21311

Closed ouinouin closed 3 months ago

ouinouin commented 5 months ago

PROBLEM DESCRIPTION

Motor commands doesnt give feedback while called without argument when stepper motor is confgured MotorMIS commmand not working ?

REQUESTED INFORMATION

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
- [ ] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:

TO REPRODUCE

Steps to reproduce the behavior: issue some of the motor commands without argument, unlike many if not all commands in tasmota, this doesnt gives back the actual value (letting user think something is wrong)

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen. have a feedback of the actual set value while issuing the command without argument.

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

11:40:45.310 CMD: MotorMIS
11:40:45.314 RSL: RESULT = {"Command":"Error"}
11:40:53.311 CMD: MotorSPR 1
11:40:53.315 RSL: RESULT = {"MotorSPR":"Done"}
11:40:56.561 CMD: MotorSPR 200
11:40:56.565 RSL: RESULT = {"MotorSPR":"Done"}
11:41:16.662 CMD: motorrpm
11:41:16.666 RSL: RESULT = {"Command":"Error"}
11:41:19.612 CMD: motorrpm 20
11:41:19.616 RSL: RESULT = {"MotorRPM":"Done"}
11:41:58.464 CMD: motormis
11:41:58.468 RSL: RESULT = {"Command":"Error"}
11:42:01.164 CMD: motormis 1
11:42:01.168 RSL: RESULT = {"Command":"Error"}
11:42:27.216 CMD: motormsi
11:42:27.224 RSL: RESULT = {"Command":"Unknown"}
11:42:29.969 CMD: motormsi 1
11:42:29.976 RSL: RESULT = {"Command":"Unknown"}
11:42:35.819 CMD: motorMIS 1
11:42:35.824 RSL: RESULT = {"Command":"Error"}
11:42:38.472 CMD: motorMIS30
11:42:38.477 RSL: RESULT = {"Command":"Error"}

ADDITIONAL CONTEXT

Add any other context about the problem here. on my experiments, i wasnt able to do anything with the motorMIS command, , returning error with or without arguments.

(Please, remember to close the issue when the problem has been addressed)

ouinouin commented 5 months ago

image could the problem with the command motorMIS be because of a difference of variable name between the header and the cpp file ? : OneToSixteen in onse side oneToSixteen on the other side (moreover the naming is quite wrong since drv 8825 can do microsteppings up to 1/32. :-)

Jason2866 commented 5 months ago

Will change since it is not align. Tbh idk if this will solve.

Jason2866 commented 4 months ago

Did the change https://github.com/arendst/Tasmota/commit/50979c328c11e48bbbd9b2abaa814843d448f281 solves the issue?

ouinouin commented 4 months ago

@Jason2866 : i m not yet around my system, i ll give a try witin 2 weeks and post the outcome.

Did the change 50979c3 solves the issue?

ouinouin commented 3 months ago

after getting external help, i could see that : motorMIS command response depends from the connection of all 3 pins to drive the microstep settings on the template, if you connect only one or two, this doesnt work.

for the motor command, there is no answer programmed,feedback i was misinterpretating the way tasmota cuts the commands between a prefix and a suffix, and was thinking that the prefix had to always be a valid command.

so finally not really a bug maybe just mising details in doc, i ll close it.