Clemson ECE 453
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Camera/Nerf API and stuff

5 posters

Go down

Camera/Nerf API and stuff Empty Camera/Nerf API and stuff

Post  JDinger 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):
http://www.mediafire.com/file/r2yjn2xdmkm/camnerfUML.uml

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

Posts : 32
Join date : 2009-01-08

Back to top Go down

Camera/Nerf API and stuff Empty Re: Camera/Nerf API and stuff

Post  swesson 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.
swesson
swesson

Posts : 28
Join date : 2009-01-09

Back to top Go down

Camera/Nerf API and stuff Empty Re: Camera/Nerf API and stuff

Post  Peasley 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
Peasley
Peasley

Posts : 44
Join date : 2009-01-08

Back to top Go down

Camera/Nerf API and stuff Empty Re: Camera/Nerf API and stuff

Post  swesson 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?
swesson
swesson

Posts : 28
Join date : 2009-01-09

Back to top Go down

Camera/Nerf API and stuff Empty Re: Camera/Nerf API and stuff

Post  JDinger 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?
JDinger
JDinger

Posts : 32
Join date : 2009-01-08

Back to top Go down

Camera/Nerf API and stuff Empty Re: Camera/Nerf API and stuff

Post  dsmarsh 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)
dsmarsh
dsmarsh

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

Back to top Go down

Camera/Nerf API and stuff Empty Re: Camera/Nerf API and stuff

Post  JDinger Tue Feb 03, 2009 2:26 am

Can anyone meet today at say, 4 PM?
JDinger
JDinger

Posts : 32
Join date : 2009-01-08

Back to top Go down

Camera/Nerf API and stuff Empty Re: Camera/Nerf API and stuff

Post  ccherry 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
ccherry
ccherry

Posts : 20
Join date : 2009-01-08

Back to top Go down

Camera/Nerf API and stuff Empty Re: Camera/Nerf API and stuff

Post  swesson 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.
swesson
swesson

Posts : 28
Join date : 2009-01-09

Back to top Go down

Camera/Nerf API and stuff Empty Re: Camera/Nerf API and stuff

Post  Peasley 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
Peasley
Peasley

Posts : 44
Join date : 2009-01-08

Back to top Go down

Camera/Nerf API and stuff Empty Re: Camera/Nerf API and stuff

Post  swesson 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?
swesson
swesson

Posts : 28
Join date : 2009-01-09

Back to top Go down

Camera/Nerf API and stuff Empty Re: Camera/Nerf API and stuff

Post  Peasley Wed Feb 04, 2009 4:17 pm

Yes, the camera parameters will be hardcoded.

-Brian Peasley
Peasley
Peasley

Posts : 44
Join date : 2009-01-08

Back to top Go down

Camera/Nerf API and stuff Empty Re: Camera/Nerf API and stuff

Post  swesson 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.
swesson
swesson

Posts : 28
Join date : 2009-01-09

Back to top Go down

Camera/Nerf API and stuff Empty Re: Camera/Nerf API and stuff

Post  Peasley Wed Feb 04, 2009 10:33 pm

Yea that got put in.

-Brian Peasley
Peasley
Peasley

Posts : 44
Join date : 2009-01-08

Back to top Go down

Camera/Nerf API and stuff Empty 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