Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter SDK Orbiter software developers post your questions and answers about the SDK, the API interface, LUA, meshing, etc.

Reply
 
Thread Tools
Old 05-16-2017, 12:40 PM   #106
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Quote:
Originally Posted by martins View Post
 Why would that make a difference?

You should learn to use a revision control system to organise your work. In fact, rather than posting endless code snippets here, some of which work and some which don't, until everybody is utterly confused, why not start a shared project and invite other people to contribute?
Like bitbucket?
I am king of disorganization in Orbiter and life
Quote:
Originally Posted by martins View Post
 Are you saying that you didn't actually test the larger click area?
Yes I tested the larger area. and nothing.
gattispilot is offline   Reply With Quote
Old 05-16-2017, 12:57 PM   #107
martins
Orbiter Founder
Default

Quote:
Originally Posted by gattispilot View Post
 Like bitbucket?
Yes, for example. I don't know bitbucket, but github. I guess they are similar. Whatever works best.
Quote:
I am king of disorganization in Orbiter and life
That is fine as long as it works. It doesn't seem to work in this instance.
martins is offline   Reply With Quote
Old 05-16-2017, 01:03 PM   #108
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Thanks. I can set up a bitbucket for it.
gattispilot is offline   Reply With Quote
Old 05-16-2017, 01:21 PM   #109
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Quote:
Originally Posted by gattispilot View Post
 Thanks. I can set up a bitbucket for it.
What he rather means about your "unorganized" development is, that you are not keeping track of what you changed and why you did so.

Recommendation: Start using git locally. You just need a workspace to edit your code. And maybe some place on your HDD or better your external HDD/USB stick to store a remote repository.

https://tortoisegit.org/


This way, you can always track and revert changes without needing the full version control monty. Its actually easy.

github and bitbucket are nice for collaboration and code reviews, but since you can start using git locally without it, you can also start at a smaller scale first and later extend to remote repositories like that.
Urwumpe is offline   Reply With Quote
Thanked by:
Old 05-16-2017, 01:29 PM   #110
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

I will download it. https://tortoisegit.org/

Not sure which code to load the one with mfd or without mfds.

So like with bitbucket i had a clone that used to share. I guess this does the same. I will have to look at a way to set it up.
http://robertgreiner.com/2010/02/get...it-on-windows/

Last edited by gattispilot; 05-16-2017 at 01:32 PM.
gattispilot is offline   Reply With Quote
Old 05-16-2017, 01:36 PM   #111
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Just try to follow a simple standard process during your testing:
  1. Edit
  2. Stage (Select which files to commit)
  3. Commit (Store in changes in version control with a clear message what changed)
  4. Test
  5. Review
  6. Decide if you keep the changes or revert to an earlier commit.
  7. Repeat.
Urwumpe is offline   Reply With Quote
Old 05-16-2017, 01:43 PM   #112
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Thanks. Well I will need to get it set up first.
I may just just use a simple mesh also for this.
gattispilot is offline   Reply With Quote
Old 05-16-2017, 06:42 PM   #113
marcogavazzeni
Addon Developer
Default

When...I downloaded the mesh and made the code, and it works.

I changed from quadrilateral to spherical:

oapiVCSetAreaClickmode_Spherical (AID_NAVMODE, _V(-0.1264551,1.500134,2.812949), 0.015);


Also in quadrilateral mode (I have redone the coordinates):

oapiVCSetAreaClickmode_Quadrilateral(AID_NAVMODE, _V(-0.1431676 , 1.508765, 2.812929), _V(-0.1431676, 1.492183, 2.83156), _V(-0.1078574, 1.508846, 2.812929), _V(-0.1078574, 1.492224, 2.83156));

The area is that of the first button on the left.

Last edited by marcogavazzeni; 05-16-2017 at 07:00 PM.
marcogavazzeni is offline   Reply With Quote
Thanked by:
Old 05-16-2017, 10:28 PM   #114
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Thanks. So how did you calculate the area? I guess maybe one could just have 6 navmode and then when that area is hit then do what ever.

I download GitHub and tortoise. But either my Chrome browser does like it or SLOW internet.

Not sure how to add files in resp and then push.
gattispilot is offline   Reply With Quote
Old 05-17-2017, 05:25 AM   #115
marcogavazzeni
Addon Developer
Default

Quote:
Originally Posted by gattispilot View Post
 Thanks. So how did you calculate the area?



You need to be more precise with the coordinates.

marcogavazzeni is offline   Reply With Quote
Thanked by:
Old 05-17-2017, 10:59 AM   #116
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

Thanks. So I split the button mesh group up into separate buttons
All buttons work
Code:
switch (id) {
	case 0: // commander position
		SetCameraOffset(_V(-0.41, 1.6, 2.241));
		SetCameraDefaultDirection(_V(0, 0, 1));
		SetCameraMovement(_V(0, 0, 0.2), 0, 0, _V(-0.3, 0, 0), 75 * RAD, -5 * RAD, _V(0.3, 0, 0), -20 * RAD, -27 * RAD);
		//oapiVCSetNeighbours(-1, 1, -1, 2);



		oapiVCRegisterArea(AID_NAVMODE1, PANEL_REDRAW_NEVER, PANEL_MOUSE_LBDOWN);
		oapiVCRegisterArea(AID_NAVMODE2, PANEL_REDRAW_NEVER, PANEL_MOUSE_LBDOWN);
		oapiVCRegisterArea(AID_NAVMODE3, PANEL_REDRAW_NEVER, PANEL_MOUSE_LBDOWN);
		oapiVCRegisterArea(AID_NAVMODE4, PANEL_REDRAW_NEVER, PANEL_MOUSE_LBDOWN);
		oapiVCRegisterArea(AID_NAVMODE5, PANEL_REDRAW_NEVER, PANEL_MOUSE_LBDOWN);
		oapiVCRegisterArea(AID_NAVMODE6, PANEL_REDRAW_NEVER, PANEL_MOUSE_LBDOWN);
		oapiVCRegisterArea(AID_NAVMODE7, PANEL_REDRAW_NEVER, PANEL_MOUSE_LBDOWN);


	//	oapiVCSetAreaClickmode_Quadrilateral(AID_NAVMODE, _V(-10.1446553, 10.511254, 2.824909), _V(10.1446553, 10.487942, 2.824909), _V(-10.1521383, -10.511254, 2.824909), _V(10.1517904, 10.487942, 2.824909));
		oapiVCSetAreaClickmode_Spherical(AID_NAVMODE1, _V(-0.1264551, 1.500134, 2.812949), 0.015);
	//	oapiVCSetAreaClickmode_Quadrilateral(AID_NAVMODE1, _V(-0.1431676, 1.508765, 2.812929), _V(-0.1431676, 1.492183, 2.83156), _V(-0.1078574, 1.508846, 2.812929), _V(-0.1078574, 1.492224, 2.83156));

		oapiVCSetAreaClickmode_Spherical(AID_NAVMODE2, _V(-.08476054,  1.500178, 2.822194), 0.015);
		oapiVCSetAreaClickmode_Spherical(AID_NAVMODE3, _V(-.04344729,  1.500378, 2.822194), 0.015);
		oapiVCSetAreaClickmode_Spherical(AID_NAVMODE4, _V(0, 1.500178, 2.822194), 0.015);
		oapiVCSetAreaClickmode_Spherical(AID_NAVMODE5, _V(.04249217, 1.500178, 2.822194), 0.015);
		oapiVCSetAreaClickmode_Spherical(AID_NAVMODE6, _V(.08443221, 1.500178, 2.822194), 0.015);
		oapiVCSetAreaClickmode_Spherical(AID_NAVMODE7, _V(.1269527, 1.500178, 2.822194), 0.015);


		//oapiVCSetAreaClickmode_Quadrilateral(AID_NAVMODE2, _V(-.1020503, 1.508989, 2.822194), _V(-.1020503, 1.492167, 2.822194), _V(-0.06673641, 1.508856, 2.822194), _V(-0.0673641,  1.492167, 2.822194));


		//oapiVCSetAreaClickmode_Quadrilateral(AID_NAVMODE3, _V(-0.1431676, 1.508765, 2.812929), _V(-0.1431676, 1.492183, 2.83156), _V(-0.1078574, 1.508846, 2.812929), _V(-0.1078574, 1.492224, 2.83156));
		//oapiVCSetAreaClickmode_Quadrilateral(AID_NAVMODE4, _V(-0.1431676, 1.508765, 2.812929), _V(-0.1431676, 1.492183, 2.83156), _V(-0.1078574, 1.508846, 2.812929), _V(-0.1078574, 1.492224, 2.83156));
		//oapiVCSetAreaClickmode_Quadrilateral(AID_NAVMODE5, _V(-0.1431676, 1.508765, 2.812929), _V(-0.1431676, 1.492183, 2.83156), _V(-0.1078574, 1.508846, 2.812929), _V(-0.1078574, 1.492224, 2.83156));
		//oapiVCSetAreaClickmode_Quadrilateral(AID_NAVMODE6, _V(-0.1431676, 1.508765, 2.812929), _V(-0.1431676, 1.492183, 2.83156), _V(-0.1078574, 1.508846, 2.812929), _V(-0.1078574, 1.492224, 2.83156));

	}



	return true;

}


bool TALON::clbkVCMouseEvent(int id, int event, VECTOR3 &p)
{

	switch (id) {


	case AID_NAVMODE1:
		ToggleNavmode(NAVMODE_KILLROT);
		return true;
	case AID_NAVMODE2:
		ToggleNavmode(NAVMODE_HLEVEL);
		return true;
	case AID_NAVMODE3:
		ToggleNavmode(NAVMODE_PROGRADE);
		return true;
	case AID_NAVMODE4:
		ToggleNavmode(NAVMODE_RETROGRADE);
		return true;
	case AID_NAVMODE5:
		ToggleNavmode(NAVMODE_NORMAL);
		return true;
	case AID_NAVMODE6:
		ToggleNavmode(NAVMODE_ANTINORMAL);
		return true;
	case AID_NAVMODE7:
		ToggleNavmode(NAVMODE_HOLDALT);
		return true;

	}
	return false;
}

Trying to get it to work in the main project.
gattispilot is offline   Reply With Quote
Thanked by:
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 07:32 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2007 - 2012, Orbiter-Forum.com. All rights reserved.