Titan 2 script init causing shutoff - CLOSED
Posted: Fri Jul 13, 2018 11:54 pm
Hi guys, I'm in a bit of a pickle. I want to be able to read a BUNCH of checkboxes, and I have the output correct and everything seems to be good to move forward except.... after reading 4 checkboxes my Titan shuts off and reboots
I'm working on a script more as a challenge to myself so I'm gonna stay hush-hush about it for now but I'll open up on it soon. As for now, I'm trying to load 37 bits of data in, with 5 calls of pmem_read(uint8 x, &var);
My output is as desired, but my result is an unexpected shutdown for the Titan 2.
The var "ignoreFunctions" is declared as a field:
bool ignoreFunctions [38];
My output is as follows:
Memory Slots: Updating memory slot 3 (Configuration)
GVM Output: Init started!
GVM Output: Init processing: 9, 5 output:1
GVM Output: Init processing: 9, 4 output:1
GVM Output: Init processing: 9, 3 output:1
GVM Output: Init processing: 9, 2 output:1
Disconnect: Titan Two device disconnected (USB Disconnection)
Device Selector: removed 1 device(s), total of 0 device(s) detected
Device Selector: added 1 device(s), total of 1 device(s) detected
Connect: Naoki's Titan connected
Micro-SD Card: Inserted (14.84GB)
I'm working on a script more as a challenge to myself so I'm gonna stay hush-hush about it for now but I'll open up on it soon. As for now, I'm trying to load 37 bits of data in, with 5 calls of pmem_read(uint8 x, &var);
My output is as desired, but my result is an unexpected shutdown for the Titan 2.
- Code: Select all
init
{
printf("Init started!");
pmem_load();
uint8 ignoreIndex = 38;//to save slight performance, I use a prefix
bool initiation = FALSE;
uint8 i, j, t = 0;
uint8 address = 0;
for(j = 9; j >= 5; --j)
{
pmem_read(j, &address);
for(i = 7; i >= 0; --i){
if(!initiation)//sets the first bit of data in pmem: located at byte 9, bit 5
{
initiation = TRUE;
j = 9;
i = 5;
}
else if (j == 5 && i == 1)//breaks loop when last bit is read
{
continue;
}
ignoreFunctions[--ignoreIndex] = ((*address >> i) % 2 == 1);
printf("Init processing: %d, %d output:%d", j, i, (*address >> i) % 2);
++t;
}
}
printf("Init complete!");
}
The var "ignoreFunctions" is declared as a field:
bool ignoreFunctions [38];
My output is as follows:
Memory Slots: Updating memory slot 3 (Configuration)
GVM Output: Init started!
GVM Output: Init processing: 9, 5 output:1
GVM Output: Init processing: 9, 4 output:1
GVM Output: Init processing: 9, 3 output:1
GVM Output: Init processing: 9, 2 output:1
Disconnect: Titan Two device disconnected (USB Disconnection)
Device Selector: removed 1 device(s), total of 0 device(s) detected
Device Selector: added 1 device(s), total of 1 device(s) detected
Connect: Naoki's Titan connected
Micro-SD Card: Inserted (14.84GB)