Skip to content

Commit 5105e15

Browse files
Merge pull request #39 from nexdome/bugfix/4.0.1
Bugfix 4 0 1
2 parents 64d3965 + 09b73a4 commit 5105e15

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

GitVersion.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
assembly-versioning-scheme: MajorMinorPatchTag
22
mode: ContinuousDeployment
33
continuous-delivery-fallback-tag: ''
4-
next-version: 3.0.0
54
branches:
65
master: {}
76
ignore:

TA.NexDome.Rotator/CommandProcessor.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ void CommandProcessor::HandleCommand(const Command& command) const
103103

104104
if (command.IsRotatorCommand())
105105
{
106-
if (command.Verb == "AR") return HandleAR(command); // Read firmware version
107-
if (command.Verb == "AW") return HandleAW(command); // Read firmware version
106+
if (command.Verb == "AR") return HandleAR(command); // Read acceleration ramp time (ms)
107+
if (command.Verb == "AW") return HandleAW(command); // Write acceleration ramp time (ms)
108108
if (command.Verb == "DR") return HandleDR(command); // Read dead zone (rotator only)
109109
if (command.Verb == "DW") return HandleDW(command); // Write dead zone (rotator only)
110110
if (command.Verb == "FR") return HandleFR(command); // Read firmware version

TA.NexDome.Rotator/TA.NexDome.Rotator.ino

+10-7
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ auto rain = RainSensor(RAIN_SENSOR_PIN);
4141
// cin and cout for ArduinoSTL
4242
namespace std
4343
{
44-
ohserialstream cout(host);
45-
ihserialstream cin(host);
44+
ohserialstream cout(host);
45+
ihserialstream cin(host);
4646
} // namespace std
4747

48-
void DispatchCommand(const Command& command)
49-
{
48+
void DispatchCommand(const Command &command)
49+
{
5050
//std::cout << command.RawCommand << "V=" << command.Verb << ", T=" << command.TargetDevice << ", P=" << command.StepPosition << std::endl;
5151
commandProcessor.HandleCommand(command);
52-
}
52+
}
5353

5454
/*
5555
* Handles receive data from the host serial interface.
@@ -71,7 +71,7 @@ void HandleSerialCommunications()
7171
case '\n': // newline - dispatch the command
7272
case '\r': // carriage return - dispatch the command
7373
if (hostReceiveBuffer.length() > 1)
74-
{
74+
{
7575
const auto command = Command(hostReceiveBuffer);
7676
DispatchCommand(command);
7777
hostReceiveBuffer.clear();
@@ -81,7 +81,7 @@ void HandleSerialCommunications()
8181
<< ResponseBuilder::Message
8282
<< ResponseBuilder::terminator
8383
<< std::endl; // send response, if there is one.
84-
}
84+
}
8585
break;
8686
case '@': // Start of new command
8787
hostReceiveBuffer.clear();
@@ -171,7 +171,10 @@ void loop()
171171
rain.loop();
172172
// Release stepper holding torque if there has been no serial communication for "a long time".
173173
if (serialInactivityTimer.Expired())
174+
{
174175
stepper.releaseMotor();
176+
serialInactivityTimer.Stop();
177+
}
175178
}
176179
}
177180

0 commit comments

Comments
 (0)