Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setValue with neg numbers #85

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions NexNumber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ bool NexNumber::getValue(uint32_t *number)
return recvRetNumber(number);
}

bool NexNumber::setValue(uint32_t number)
bool NexNumber::setValue(int32_t number)
{
char buf[10] = {0};
String cmd;

utoa(number, buf, 10);
itoa(number, buf, 10);
cmd += getObjName();
cmd += ".val=";
cmd += buf;
Expand Down Expand Up @@ -263,4 +263,4 @@ bool NexNumber::Set_background_image_pic(uint32_t number)
cmd += getObjName();
sendCommand(cmd.c_str());
return recvRetCommandFinished();
}
}
2 changes: 1 addition & 1 deletion NexNumber.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class NexNumber: public NexTouch
* @param number - number buffer.
* @return true if success, false for failure.
*/
bool setValue(uint32_t number);
bool setValue(int32_t number);

/**
* Get bco attribute of component
Expand Down