|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
What does this mean?
I found this line in the default camera code, and I can't figure out what it means:
Pwm1_red ^= 1; it sort of looks like early pascal, in which case it would just set the variable Pwm1_red to 1, but elsewhere in the code the more traditional "=" is used. Anyone know what this means? --Sam --Team 486 --Positronic Panthers |
|
#2
|
||||
|
||||
|
Re: What does this mean?
Quote:
|
|
#3
|
|||
|
|||
|
Re: What does this mean?
[quote=schenkin]I found this line in the default camera code, and I can't figure out what it means:
Pwm1_red ^= 1; This expands to Pwm1_red = Pwm1_red ^ 1; ^ is the xor operator, and like other operators, can be combined with = to give the shorthand statement that confused you |
|
#4
|
|||
|
|||
|
Re: What does this mean?
Thanks everyone!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|