DragonflightDesign
Resource contributor
- Messages
- 1,397
- Country

If someone is building a C-gauge for P3Dv4, I'd be grateful if they could insert the following code and check to see if P3Dv4 still allows you to grab a fifth parameter from the gauge info in the panel.cfg file e.g.
myGauge!myInstrument 3,4,100,100,fifth
It don't seem to be working, not no more.
-Dai
myGauge!myInstrument 3,4,100,100,fifth
Code:
//**************************************************************************
//Get the gauge parameter as a string up to 100 characters
//**************************************************************************
// Usage within a gauge:
// gaugeParam=(PCHAR)pgauge->parameters;
// panelParam(gaugeParam,0) // where 0 = string, 1 = integer
PCHAR gaugeParam=NULL;
char paramData[100]="";
int paramNo = 0;
void panelParam (char *param, int type)
{
int i=0;
// char
if (!type)
{
for (i = 0; param[i]; i++) param[i] = tolower(param[i]);
strcpy_s(paramData, param);
}
// int
else paramNo = atoi(param);
return;
}
It don't seem to be working, not no more.
-Dai


That got me into way too much trouble a long time ago. It's pretty much top of my 'code to avoid like the plague' list now.