Skip to content

Commit 3677a49

Browse files
committed
Fixed report values for stepper_is_running
1 parent 1a1ea07 commit 3677a49

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

examples/Telemetrix4Arduino/Telemetrix4Arduino.ino

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,8 @@ bool sonar_reporting_enabled = true; // flag to start and stop sonar reporing
462462

463463
// firmware version - update this when bumping the version
464464
#define FIRMWARE_MAJOR 5
465-
#define FIRMWARE_MINOR 3
466-
#define FIRMWARE_PATCH 3
465+
#define FIRMWARE_MINOR 4
466+
#define FIRMWARE_PATCH 0
467467

468468

469469
// Feature Masks And Storage
@@ -1655,14 +1655,14 @@ void stepper_is_running() {
16551655
#ifdef STEPPERS_ENABLED
16561656
// motor_id = command_buffer[0]
16571657

1658-
// report = STEPPER_IS_RUNNING, motor_id, distance(8 bytes)
1658+
// report = STEPPER_IS_RUNNING, motor_id, running_state
1659+
// running state - true if the speed is not zero or not at the target position
16591660

1661+
byte report_message[4] = {3, STEPPER_RUNNING_REPORT, command_buffer[0]};
16601662

1661-
byte report_message[3] = {2, STEPPER_RUNNING_REPORT, command_buffer[0]};
1663+
report_message[3] = steppers[command_buffer[0]]->isRunning();
16621664

1663-
report_message[2] = steppers[command_buffer[0]]->isRunning();
1664-
1665-
Serial.write(report_message, 3);
1665+
Serial.write(report_message, 4);
16661666
#endif
16671667

16681668
}

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Telemetrix4Arduino
2-
version=5.3.4
2+
version=5.4.0
33
author=Alan Yorinks
44
maintainer=https://github.com/MrYsLab/
55
sentence=The server for the Telemetrix Project.

0 commit comments

Comments
 (0)