Camera/Nerf API and stuff

Go down

Camera/Nerf API and stuff

Post  JDinger on Sun Feb 01, 2009 7:01 pm

Current Draft of the dart gun API
Code:
//all turning directions will be with respect to the direction the gun is pointing.

class NerfGun{
   //recorded angle where the gun is pointing. used for target marking.
   int m_vert_angle, m_horiz_angle;
   //private hopeful command
   //this will prime the gun for firing
   bool Prime();
public:
   
   //initialize
   NerfGun();
   ~NerfGun();
   
   //connect and disconnect to nerf gun
   bool Connect();
   bool Disconnect();
   
   //Move commands. One command moves the nerf gun in that direction a certain amount.
   bool MoveUp();
   bool MoveDown();
   bool MoveLeft();
   bool MoveRight();
   
   //fire and stop commands
   bool Fire();
   bool Stop();
   
   //public hopeful command
   //this will return the gun to a predefined start position
   bool ReturnToZero();
   
   //optional commands
   //will move the gun in the direction noted a certain amount
   bool MoveUpLeft();
   bool MoveUpRight();
   bool MoveDownLeft();
   bool MoveDownRight();
   
};

As current a draft of the camera API as I have. Peasley can update later:
Code:
//moves the camera at a speed which is set by the sensitivity
//left: increases theta      at a constant rate set by sensitivity
//right: decreases theta   ""                        ""   
//up: increases phi         ""                        ""
//down: decreases phi      ""                        ""
//Reference file:  cameraMovement.pdf
void moveCamera(bool up, bool down, bool left, bool right, int sensitivity);

//Initialize shared memory between nerf gun and camera with key as the shared memory ID
int *createShm(int key);

What we have for use case/UML thus far (I have no idea what we want or what I'm doing):
mediafire.com file/r2yjn2xdmkm/camnerfUML.uml

What specifically are we needing to do for the UML/Use Cases/Stub Code? Anyone?

_________________
Jonathan Dinger
jdinger@clemson.edu
avatar
JDinger

Posts : 32
Join date : 2009-01-08

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  swesson on Mon Feb 02, 2009 1:06 am

For your camera API I see that you have one function for movement with true/false parameters. Are you expecting to be able to receive a command from the GUI that says, for example, "move up and left"?

I'm in the process of creating an API linking the GUI commands to your functions and I need to know what exactly you guys expect to be receiving.
avatar
swesson

Posts : 28
Join date : 2009-01-09

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  Peasley on Mon Feb 02, 2009 12:19 pm

Yes, so if you want the camera to move up and left you give it a true for up and true for left and false for bottom and right. Sensitivity will control how much it will turn for each command sent.

I am sending you a much more complete version of the cameras API right now.

-Brian Peasley
avatar
Peasley

Posts : 44
Join date : 2009-01-08

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  swesson on Mon Feb 02, 2009 4:22 pm

As far as the nerf gun goes, do your are your bool functions returning true on success?

Also, what is the Stop() function for?
avatar
swesson

Posts : 28
Join date : 2009-01-09

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  JDinger on Mon Feb 02, 2009 6:24 pm

Stop() was basically to stop the gun in its tracks. Whatever it's doing now, quit. The bools were to return true on success, but those might just end up being voids.

Any chance we could meet with the comms group tomorrow and hammer out exactly what each function does and if ya'll need anything extra? Basically to finalize the interface?

_________________
Jonathan Dinger
jdinger@clemson.edu
avatar
JDinger

Posts : 32
Join date : 2009-01-08

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  dsmarsh on Mon Feb 02, 2009 6:40 pm

we meet on wednesdays* during our regular class time
if you cant then we can schedule something for tomorrow


Last edited by dsmarsh on Tue Feb 03, 2009 7:11 pm; edited 1 time in total (Reason for editing : changed monday to wednesday)
avatar
dsmarsh

Posts : 54
Join date : 2009-01-08
Age : 32

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  JDinger on Tue Feb 03, 2009 2:26 am

Can anyone meet today at say, 4 PM?

_________________
Jonathan Dinger
jdinger@clemson.edu
avatar
JDinger

Posts : 32
Join date : 2009-01-08

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  ccherry on Tue Feb 03, 2009 4:05 pm

Well i got 2 tests tomorrow, Ill probably have to meet up with yall at the regular time tomorrow...by the way sunday they got me off so we can meet earlier this sunday if we have to...

Chris
avatar
ccherry

Posts : 20
Join date : 2009-01-08

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  swesson on Wed Feb 04, 2009 11:03 am

So are you guys going to be on campus today? I'd like to meet up to work out the small details we need to finalize for the API.
avatar
swesson

Posts : 28
Join date : 2009-01-09

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  Peasley on Wed Feb 04, 2009 1:57 pm

Yea I am going to be on campus, just come to room 021 and you should be able to find me. If I'm not there just check back every 15 min or so.

-Brian Peasley
avatar
Peasley

Posts : 44
Join date : 2009-01-08

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  swesson on Wed Feb 04, 2009 3:17 pm

Turns out I may not make it to campus.

Did we agree that the initialization of the camera settings is going to be hardcoded? If that's the case, I believe our API will only include your camera movement function?

Also, what about the connect() and disconnect() functions for the nerf gun? Is the GUI going to have to calls these commands and if so, do they know this?
avatar
swesson

Posts : 28
Join date : 2009-01-09

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  Peasley on Wed Feb 04, 2009 4:17 pm

Yes, the camera parameters will be hardcoded.

-Brian Peasley
avatar
Peasley

Posts : 44
Join date : 2009-01-08

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  swesson on Wed Feb 04, 2009 6:01 pm

Blah one more thing. I forgot to ask about Zoom In/Zoom out. The GUI has a command number defined for those two actions, so either I need a function to put in the API for that or I need to ask them to take it out.

Lemme know.
avatar
swesson

Posts : 28
Join date : 2009-01-09

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  Peasley on Wed Feb 04, 2009 10:33 pm

Yea that got put in.

-Brian Peasley
avatar
Peasley

Posts : 44
Join date : 2009-01-08

View user profile

Back to top Go down

Re: Camera/Nerf API and stuff

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum