cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 5, 3 & 1

Anonymous
Not applicable

int hdata,hdataprev;
char factor = 0x03
if(hdata > (hdataprev + (int)factor)){
do A
}else{
do B
}
if hdata is like 0xFF0A and hdataprev like 0xFF00 , then everything is OK - code A is executed
BUT
when hdata is 0x00AA and hdataprev like above(0xFF00) then code B is executed instead of code A (Positive 0x00AA is greater than negative 0xFF00).
Isn't it?
Robert

0 Likes
0 Replies