I would search your project to see if variables like SenX are already defined. While it is certainly possible for compilers to have bugs, your code is always the first thing to suspect.
Quote:
|
if (rc_dig_in01 = 0,rc_dig_in02 = 0,rc_dig_in03 = 0,rc_dig_in04 = 0,rc_dig_in05 = 0) == 10
|
I suggest you write this as:
if ((rc_dig_in01 == 0) && (rc_dig_in02 == 0) && (rc_dig_in03 == 0) && (rc_dig_in04 == 0) && (rc_dig_in05 == 0))
{
outputvariable = 10;
}
This follows the C syntax rule:
if (expression) statement; (SINGLE statement)
if (expression) { statement; statement; ... } (BLOCK of statements)
There are other ways of writing this as well, but unless you are very experienced with C and the rules of operator precedence, liberal use of round brackets around each sub-expression will guarantee the multiple statements are evaluated in the manner and the order you expect.
As Stuart said, it is a very common error to use if (rc_dig_01 = 0) rather than (rc_dig_01 == 0). The first form ASSIGNS the value 0 to rc_dig_01, the second COMPARES rc_dig_01 with 0.