![]() |
Re: A few simple programming questions;
Quote:
Quote:
Code:
Code:
int mod32(x)The & is a bitwise AND operation. In other words, it works with the ones and the zeroes. AND evaluates to true or one if cond1 and cond2 evaluate to one. Example: 7&11 7 = 4+2+1; 11 = 8+2+1; 0111 1011 ____ 0011 The bitwise operation works faster. It only works with powers of two (don't try x&10) but in those cases, it works. If you want, think about why (or PM me). Just draw it out. However, oftentimes the best code for processing time is the most understandable too. Also, when you think about the speed of today's processors, unless you are writing code that /needs/ to run fast, there is not much point in optimizing. [\END LECTURE] That was rather off-topic, but I found it interesting. I hope you did too (or skipped over it). Tat's all for now, folks. Tit for tat. Paul Dennis |
Re: A few simple programming questions;
Wow, Thanks for all the help. Although that last post hurts my head. But now, I think I have everything working. We are hooking up electronics now so I haven't been able to test anything, yet. But still, I'd give you all hugs, If I could, and a cookie if I could!
Danke!!! Team 1555's only poor little programmer. |
how to program a trigger
hi how are you, this is from team 1611. This is our second year in FIRST and i am new to programming. can you explain to me the process of programming the triggers? if it's possible, can you write one for me?? sorry for the inconvenience.
|
Re: how to program a trigger
Do you mean the triggers on joysticks? ("Trigger" also has another meaning in software development circles.) What do you want them to do? Once we know that, we should be able to help you. (Try searching too. I believe what you need may have already been covered in some other threads.)
|
| All times are GMT -5. The time now is 20:59. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi