Go to Post Honesty and Integrity is the key to success. - team4384 [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-02-2016, 15:13
XaoS XaoS is offline
Registered User
FRC #4590
 
Join Date: Jan 2014
Location: Israel
Posts: 3
XaoS is an unknown quantity at this point
GetRawAxis() crashes robot code

As part of the tests for our robots, we encountered a problem with the OI.

Every time we tried to get a value of axis of a joystick, using GetRawAxis(), GetAxis() or GetY(), our robot code just crashed (robot disabled and robot has no code for a second).

part of our OI.cpp file:
Code:
OI::OI()
{
	this->st = new Joystick(0);
}
// mainStick functions
float OI::GetMainLeftY(){
	return this->st->GetY();
}
What could be the problem?
Is there any solution?

Thanks,
#4590.
Reply With Quote
  #2   Spotlight this post!  
Unread 20-02-2016, 15:16
Joekachu Joekachu is offline
Registered User
FRC #4633
 
Join Date: Oct 2015
Location: Calgary
Posts: 1
Joekachu is an unknown quantity at this point
Re: GetRawAxis() crashes robot code

Are you putting a valid number in the GetRawAxis()? Eg. GetRawAxis(1)
Reply With Quote
  #3   Spotlight this post!  
Unread 20-02-2016, 18:14
cantdecide cantdecide is offline
Registered User
FRC #5773 (YAFL Mechatronics)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Turkey
Posts: 31
cantdecide is an unknown quantity at this point
Re: GetRawAxis() crashes robot code

Try creating a Joystick outside OI and in Robot, then try calling those functions. Does the problem still persist?
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:14.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi