# Include Artlav's Autotime in future OpenOrbiter release

#### Ripley

##### Tutorial translator
Donator
...Or any other solution to solve the problem of forgetting autopilots on when timewarping = empty tanks.
It was (still is) a native option in Dansteph's OrbiterSound, but what if an Orbinaut only installs XRSound?

Thanks

PS: is there a better forum section for feature requests?

#### dbeachy1

Orbiter Contributor
Donator
Beta Tester
There was some discussion about possibly including Face's SoundBridge in the OpenOrbiter distribution and installing it alongside XRSound by default, but I don't know what the status of that is.

#### Face

##### Well-known member
Orbiter Contributor
Beta Tester
There was some discussion about possibly including Face's SoundBridge in the OpenOrbiter distribution and installing it alongside XRSound by default, but I don't know what the status of that is.
Well, the open sourcing of SoundBridge depends on the approval of DanSteph. Unfortunately he has not replied to my request, and it also seems like he is not visiting his own forum that much anymore. I think he more or less left Orbiter for good. However, I would certainly not object if the binary is distributed along with OpenOrbiter.

However, I think this is misleading on the subject, anyway. Ripley talks about a feature that the central OrbiterSound DLL offered. SoundBridge is not replicating everything that DLL offered, only acts as a bridge for the SoundSDK interface. Of course it would be possible to implement it there, but it is not there yet.

#### Ripley

##### Tutorial translator
Donator
I don't see why a feature to disable autopilots when timewarping should be linked to a (any) sound module.
Dansteph opted to do so, and it's ok, but my request didn't imply that.
It could as well be a flag in the Launchpad.
Artlav's solution was more precise, as one could decide the timewarp threshold at which disengaging autopilots, by means of a config file.

Last edited:

#### hagiasophia420

##### New member
Why not just include artlav's autotime in OpenOrbiter, someone could reach out to him I am sure he won't object. Or someone can just recreate the plugin in MIT.

#### Artlav

##### Aperiodic traveller
Beta Tester
I sure don't mind.
And the whole thing was like 50 lines of code - shouldn't be too hard to recreate or incorporate.

Code:
//############################################################################//
#define STRICT
#define ORBITER_MODULE
#include "orbitersdk.h"
double max_accel;
//############################################################################//
DLLCLBK void InitModule (HINSTANCE hDLL)
{
FILE *fp;
char buf[255],val[255];
int i;

max_accel=100;

if((fp=fopen("Config\\autotime.cfg","r"))==NULL){
}else{
i=0;
while(!feof(fp)&&i++<100){
fscanf(fp,"%[^=]=%[^=^\n]\n",buf,val);
if(!strcmp(buf,"autopilot_accel_limit"))max_accel=atoi(val);
}
fclose(fp);
}
}
//############################################################################//
DLLCLBK void ExitModule(HINSTANCE hDLL){}
//############################################################################//
void clear_acc()
{
VESSEL *f;
if(oapiGetTimeAcceleration()>max_accel){
f=oapiGetFocusInterface();
if(f){
f->DeactivateNavmode(NAVMODE_KILLROT);
f->DeactivateNavmode(NAVMODE_HLEVEL);
f->DeactivateNavmode(NAVMODE_NORMAL);
f->DeactivateNavmode(NAVMODE_ANTINORMAL);
f->DeactivateNavmode(NAVMODE_HOLDALT);
}
}
}
//############################################################################//
DLLCLBK void opcPreStep(double simt,double simdt,double mjd){clear_acc();}
DLLCLBK void opcPostStep(double simt,double simdt,double mjd){clear_acc();}
//############################################################################//

Replies
11
Views
1K
Replies
121
Views
41K
Replies
90
Views
16K
Replies
25
Views
8K
Replies
9
Views
9K