Moderators: daxtojeiro, muythaibxr, jsmcortina
elsp1991 wrote:Hey guys I'm working for my Fsae team and i want to implement a traction control so i want to be able to change the advance on the run and cut some spark events if spark retard is not enough.
And i was thinking if it is possible to do something wrong that could make ms2 unprogramable?

//my code
user_value_1 = user_value_2*(????adc7???);
if (user_value_1 >= 20) //spark retard is not enough cut some events
{
user_value_1 = 20;
spk_cutx = 4;
spk_cuty = 7;
outpc.status2 |= status2_spkcut; //do spark cut with above x,y
}
else if (user_value_1 <= 20) //spark retard is enough dont need to cut events
{
outpc.status2 &= ~status2_spkcut; //disable spark cut
}
else if (user_value_1 <=0)
{
user_value_1 = 0;
outpc.status2 &= ~status2_spkcut; //disable spark cut
}
lsum += user_value_1;
//end of my code
outpc.adv_deg = (int)lsum; // Report advance before we fudge itelsp1991 wrote:1. The thing is that i dont know the internal variable of adc7, do you know where i can find this info.
[jsm@jsm2 ms2extra]$ grep -i adc7 *.c
ms2_extra_main.c: retard based on ADC7 sensor.
ms2_extra_misc.c: outpc.adc7 = ATD0DR7;
ms2_extra_misc.c: tmpadc = outpc.adc7;
ms2_extra_misc.c: tmpadc = outpc.adc7;
ms2_extra_misc.c: txbuf.adc7 = outpc.adc7;
jsmcortina wrote:Martin Young wrote:Anyway, I try to follow the instruction but having entered the tar command with the path to get to the tools.tar.gz file, nothing appears to happen. I don't know if anything ought to happen, but nothing does.
If it didn't give an error message then it worked.
If you prefer to see tons of output, use:
cd /
tar xvfz <path>/tools.tar.gz
To see if it extracted:
ls -l /usr/bin/m9s*
James
cd /
tar xvfz /tmp/tools.tar.gzReturn to MS2/Extra Development
Users browsing this forum: No registered users and 1 guest