Tracing...
16 posts
• Page 1 of 2 • 1, 2
Tracing...
I know I am going to need this so....Downloaded the t1.gph.
Now need to figure out how to initialise it and where to view it on the device monitor.
I have aged it in the right place and done the include statement.
advice most welcome.
Regards - CR
Now need to figure out how to initialise it and where to view it on the device monitor.
I have aged it in the right place and done the include statement.
advice most welcome.
Regards - CR
-
Chaosrocket - Sergeant Major
- Posts: 96
- Joined: Mon Jun 13, 2016 9:10 pm
Re: Tracing...
I can't see any mention of tracing...
-
Chaosrocket - Sergeant Major
- Posts: 96
- Joined: Mon Jun 13, 2016 9:10 pm
Re: Tracing...
Are you referring to the the ability to set the trace values on the Titan One and view those in device manager? The Titan Two GPC language doesn't have a trace value such as that, but a much more robust way to do something similar using printf. I'll leave a link to the documentation on it. It really is not a hard one to use, and it leaves the output in the compiler box, bottom center.
http://www.consoletuner.com/wiki/index.php?id=t2:printf
Let us know if you need some help with that one. I've used it quite a bit and have found it to be really helpful.
http://www.consoletuner.com/wiki/index.php?id=t2:printf
Let us know if you need some help with that one. I've used it quite a bit and have found it to be really helpful.
-
The_Rabid_Taco - Major
- Posts: 1066
- Joined: Wed Mar 16, 2016 6:04 pm
- Location: Pensacola, FL
Re: Tracing...
It's nice to see the trace value show up in the little graph. So I've been using preset led values. They work the same as the t1 trace values, in the way that once a value is assigned it will keep its value.
-
Sillyasskid - Captain
- Posts: 574
- Joined: Sat May 14, 2016 3:07 am
Re: Tracing...
Thanks Guys... will take a look...
-
Chaosrocket - Sergeant Major
- Posts: 96
- Joined: Mon Jun 13, 2016 9:10 pm
Re: Tracing...
So tried the printf command and that didn't work.. will post code, I just did a hello world job in a combo to see if it worked. No joy. I didn't output any values will retest and post back.
-
Chaosrocket - Sergeant Major
- Posts: 96
- Joined: Mon Jun 13, 2016 9:10 pm
Re: Tracing...
So, I have uploaded a screenshot of the tracing fail here https://drive.google.com/open?id=0B-TDPJl60rmEMFN0NnpaQWFlbTA
Symptom 1, no debug output when I run the code. the window on the device shows 2 horizontal bars, so its running the code.
Symptom 2, when I tap X or press and hold X one xbox1 elite controller conected to xbox1 I get the guide button presses.
Help Appreciated
Symptom 1, no debug output when I run the code. the window on the device shows 2 horizontal bars, so its running the code.
Symptom 2, when I tap X or press and hold X one xbox1 elite controller conected to xbox1 I get the guide button presses.
- Code: Select all
#include <xb1.gph> // for XB1
#define TRUE !FALSE
bool DetectShortP1 = FALSE;
bool DetectLongP1 = FALSE;
main {
if(check_active(XB1_X, 10)) {
set_val(DetectShortP1, TRUE);
}
if(check_active(XB1_X, 5000)) {
set_val(DetectLongP1, TRUE);
}
if(DetectShortP1 == TRUE && DetectLongP1 == FALSE ){
combo_run (Short);
}
if(DetectShortP1 == TRUE && DetectLongP1 == TRUE){
combo_run (Long);
}
}
combo Short {
set_val(DetectShortP1, FALSE);
set_val(DetectLongP1, FALSE);
set_val(XB1_X, 100);
wait(1000);
set_val(XB1_X, 0);
wait(100);
printf("Short Wait: %d", 1000);
}
combo Long {
set_val(DetectShortP1, FALSE);
set_val(DetectLongP1, FALSE);
set_val(XB1_X, 100);
wait(4000);
set_val(XB1_X, 0);
wait(100);
printf("Long Wait: %d", 4000);
}
Help Appreciated
-
Chaosrocket - Sergeant Major
- Posts: 96
- Joined: Mon Jun 13, 2016 9:10 pm
Re: Tracing...
I found few errors that I corrected in the code below. (ie, assign a value to variables using set_val, for variables assignment the operator is '='). I have also changed some flow logic. however, please note I have not tested the scrip functionality, so in this matter I am not sure if it is working as you expect.
- Code: Select all
#include <xb1.gph> // for XB1
#define TRUE !FALSE
bool DetectShortP1 = FALSE;
bool DetectLongP1 = FALSE;
main {
DetectShortP1 = check_active(XB1_X, 10) ? TRUE : FALSE;
DetectLongP1 = check_active(XB1_X, 5000) ? TRUE : FALSE;
if(DetectShortP1 && DetectLongP1){
if(Short) combo_stop(Short);
combo_run(Long);
} else if(DetectShortP1 && !DetectLongP1){
combo_run(Short);
}
}
combo Short {
set_val(XB1_X, 100);
wait(1000);
set_val(XB1_X, 0);
wait(100);
printf("Short Wait: %d", 1000);
}
combo Long {
set_val(XB1_X, 100);
wait(4000);
set_val(XB1_X, 0);
wait(100);
printf("Long Wait: %d", 4000);
}
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Tracing...
Will test thanks... just playing at the moment...
-
Chaosrocket - Sergeant Major
- Posts: 96
- Joined: Mon Jun 13, 2016 9:10 pm
16 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 145 guests