Skip to content

Commit 2ede716

Browse files
Merge branch 'master' of https://github.com/trikset/trikRuntime
2 parents 8227fa8 + 8c90338 commit 2ede716

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

trikControl/src/powerMotor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ void PowerMotor::powerOff()
8585
void PowerMotor::setPeriod(int period)
8686
{
8787
mCurrentPeriod = period;
88-
QByteArray command(3, '\0');
88+
QByteArray command(4, '\0');
8989
command[0] = static_cast<char>((mMspCommandNumber - 4) & 0xFF);
90-
command[1] = static_cast<char>(period && 0xFF);
91-
command[2] = static_cast<char>(period >> 8);
90+
command[2] = static_cast<char>(period & 0xFF);
91+
command[3] = static_cast<char>(period >> 8);
9292
mCommunicator.send(command);
9393
}
9494

0 commit comments

Comments
 (0)