Example on C++ API
2 posts
• Page 1 of 1
Example on C++ API
Hello everyone,
I have a T1 and a T2, I would like to use the T1 API on Visual Studio C++ but to be honest I am new on Visual Studio and C++. I was wondering if someone could give me an example on how to write a simple command.
The command I would like to try is something like this:
if (FFB_1 > 20.0)
set(XB1_RT, 100.0)
The code above is very simple in GtunerIV but I do not know how I would write that in C++ and also I am not sure if I have to create a Header file and include the file in "Direct API Template.cpp" or I write my code inside the "Direct API Template.cpp".
Any help will be appreciated
I have a T1 and a T2, I would like to use the T1 API on Visual Studio C++ but to be honest I am new on Visual Studio and C++. I was wondering if someone could give me an example on how to write a simple command.
The command I would like to try is something like this:
if (FFB_1 > 20.0)
set(XB1_RT, 100.0)
The code above is very simple in GtunerIV but I do not know how I would write that in C++ and also I am not sure if I have to create a Header file and include the file in "Direct API Template.cpp" or I write my code inside the "Direct API Template.cpp".
Any help will be appreciated
-
Ketechi - Staff Sergeant
- Posts: 13
- Joined: Thu Feb 22, 2018 8:13 pm
Re: Example on C++ API
Assuming you are using the template code as base, the GPC script you posted above can be reproduced in C++ like this:
- Code: Select all
if(report.rumble[0] > 20) {
output[XB1_RT] = 100;
}
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
2 posts
• Page 1 of 1
Return to Gtuner Plugins Support
Who is online
Users browsing this forum: No registered users and 45 guests