![]() |
IR Remote Programming
I'm trying to clarify something. During hybrid mode, we are able to use the IR remote by RoboCoach right? If so, do I need to program my autonomous to recognize IR commands, or does having it in the user_routines.c file the correct way how to do it?
|
Re: IR Remote Programming
Quote:
I forget the exact digital input numbers, though, and I don't have our code right now. (It's in the hallway being tested.) EDIT: Apparently, the digital input numbers are just the four digital inputs into which you plug the IR board. |
Re: IR Remote Programming
Quote:
|
Re: IR Remote Programming
Quote:
|
Re: IR Remote Programming
It would be understandable to misinterpret the first post, I'm not quite sure myself what you mean. If you want your autonomous to react to IR signals, then, yes, your autonomous code will have to change depending on that signal. I'd think a few IFs in the autonomous would suffice. But what exactly are you trying to say?
|
Re: IR Remote Programming
That's all I needed to know. My IR board code is currently in Default_Routine under user_routines.c, so from what I'm hearing, it needs to go under User_Autonomous_Code under user_routines_fast.c. Is that correct?
Edit: The PWM cables are currently conncected to the digital 15-18. |
Re: IR Remote Programming
That would be correct. Otherwise it would respond in teleoperated.
|
Re: IR Remote Programming
I'm having a huge programming error as I'm trying to do this right now. Please check the category User_Autonomous_code to see if I did something wrong. The error was the line "void Process_Data_From_Local_IO(void)" which I made no changes to.
Quote:
|
Re: IR Remote Programming
Check your braces over by the next function up, the void User_Autonomous_Code(void). The compiler errors aren't very helpdul with line numbers. I strongly suspect this is the case.
|
Re: IR Remote Programming
The braces were removed, but it's still giving me the syntax error.
|
Re: IR Remote Programming
Alright, giving this code closer inspection. You need one more brace to close the random brace hovering below the /* Add your own autonomous code here */ line, not removing the braces at the bottom. Or just eliminate that brace. That should fix the problem. Indentation is a good thing!
|
Re: IR Remote Programming
To avoid this problem in the future, I suggest using an editor with brace/parenthesis highlighting and block collapsing, such as Notepad++, which supports C, among other languages.
|
| All times are GMT -5. The time now is 23:43. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi