![]() |
Re: quick question: TIMERS
Huh? You are talking about the IO on the RC, right? In auto mode, the OI transmits inputs as neutural.
|
Re: quick question: TIMERS
so it would be like:
#define digin10old then later on .... digin10old = (rc_dig_in10) putdata() |
Re: quick question: TIMERS
Quote:
Contrary to an earlier post, the RC inputs such as rc_dig_in10 do work during autonomous mode, so there's no reason to do it this way. The advice to save the values for later use applies only to OI inputs (knobs and switches, mostly) that you want to use to configure autonomous operation. Also, variables in c aren't declared using #define statements. The proper syntax is not trivial, but it is not important here, since you don't need to use a variable for this purpose. |
Re: quick question: TIMERS
so it would be done how then ?
|
Re: quick question: TIMERS
Quote:
|
Re: quick question: TIMERS
Code:
if (rc_dig_in18=1) { |
Re: quick question: TIMERS
Quote:
Your code seems ok at first glance...why don't you put this statement in your Process_data function: printf("%d\n", (int)rc_dig_in18); Check the console printout while your program cable is plugged in. Make sure that it changes properly with the switch on your robot. Too improve efficiency: use else if statements. For example: if(ticks < 15) blah; else if (ticks < 35) blah; That will handle your decisions faster... Sorry again if I confused you eariler. :) |
Re: quick question: TIMERS
Quote:
|
Re: quick question: TIMERS
you guys are all really smart...i need to learn this stuff, or else i don't get to be on my team next year
|
Re: quick question: TIMERS
Quote:
What your first line should say instead is this: Code:
if (rc_dig_in18==1) {Code:
if (rc_dig_in18) { |
Re: quick question: TIMERS
Quote:
|
Re: quick question: TIMERS
Quote:
|
Re: quick question: TIMERS
Quote:
Code:
// somehow get a number in the "auto" variable |
Re: quick question: TIMERS
Quote:
Code:
On Off |
| All times are GMT -5. The time now is 12:47. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi