Tool/software: Code Composer Studio
CODE
if ((v > p+6) || (v < p-6))
{
p= v;
}
else
{
p = p;
}
OUTPUT
v=1 p=1
v=2 p=2
v=4 p=4
I am not understand why 'p' is every time get updated.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio