uint8 vs int8 causes different outcomes | Cypress Semiconductor
uint8 vs int8 causes different outcomes
The following evaluates true if the variables are int8, but not true if uint8 (which is correct).
// Turn relays on if over set level
if(relay >= dataLocal.level + dataLocal.hysteresis)
The values are: relay = 0, dataLocal.level = 128, dataLocal.hysteresis = 10.
What am I missing here? it seems like it is defying computer logic and calling 0 greater than 138...