Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1521 → Rev 1522

/beta/Code Redesign killagreg/fc.c
590,11 → 590,10
}
if(MotorTest_Active) MotorTest_Active--;
}
 
DebugOut.Analog[12] = Motor[0].SetPoint; // Front
DebugOut.Analog[13] = Motor[1].SetPoint; // Rear
DebugOut.Analog[14] = Motor[3].SetPoint; // Left
DebugOut.Analog[15] = Motor[2].SetPoint; // Right
DebugOut.Analog[14] = Motor[2].SetPoint; // Left
DebugOut.Analog[15] = Motor[3].SetPoint; // Right
//Start I2C Interrupt Mode
I2C_Start(TWI_STATE_MOTOR_TX);
}
895,55 → 894,60
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if(PPM_in[ParamSet.ChannelAssignment[CH_GAS]] < -85)
{
if(PPM_in[ParamSet.ChannelAssignment[CH_YAW]] < -75)
if(!(FCFlags&FCFLAG_MOTOR_RUN)) // motors are not running
{
// gas/yaw joystick is bottom right
// _________
// | |
// | |
// | |
// | |
// | x|
// ¯¯¯¯¯¯¯¯¯
// Start Motors
if(++delay_startmotors > 200) // not immediately (wait 200 loops = 200 * 2ms = 0.4 s)
if(PPM_in[ParamSet.ChannelAssignment[CH_YAW]] < -75)
{
delay_startmotors = 200; // do not repeat if once executed
ModelIsFlying = 1;
FCFlags |= (FCFLAG_MOTOR_RUN|FCFLAG_START); // set flag RUN and START
SetPointYaw = 0;
ReadingIntegralGyroYaw = 0;
ReadingIntegralGyroNick = ParamSet.GyroAccFactor * (int32_t)AccNick;
ReadingIntegralGyroRoll = ParamSet.GyroAccFactor * (int32_t)AccRoll;
ReadingIntegralGyroNick2 = IntegralGyroNick;
ReadingIntegralGyroRoll2 = IntegralGyroRoll;
IPartNick = 0;
IPartRoll = 0;
// gas/yaw joystick is bottom right
// _________
// | |
// | |
// | |
// | |
// | x|
// ¯¯¯¯¯¯¯¯¯
// Start Motors
if(++delay_startmotors > 200) // not immediately (wait 200 loops = 200 * 2ms = 0.4 s)
{
delay_startmotors = 0;
ModelIsFlying = 1;
FCFlags |= (FCFLAG_MOTOR_RUN|FCFLAG_START); // set flag RUN and START
SetPointYaw = 0;
ReadingIntegralGyroYaw = 0;
ReadingIntegralGyroNick = ParamSet.GyroAccFactor * (int32_t)AccNick;
ReadingIntegralGyroRoll = ParamSet.GyroAccFactor * (int32_t)AccRoll;
ReadingIntegralGyroNick2 = IntegralGyroNick;
ReadingIntegralGyroRoll2 = IntegralGyroRoll;
IPartNick = 0;
IPartRoll = 0;
}
}
else delay_startmotors = 0; // reset delay timer if sticks are not in this position
}
else delay_startmotors = 0; // reset delay timer if sticks are not in this position
 
if(PPM_in[ParamSet.ChannelAssignment[CH_YAW]] > 75)
else // motors are running
{
// gas/yaw joystick is bottom left
// _________
// | |
// | |
// | |
// | |
// |x |
// ¯¯¯¯¯¯¯¯¯
// Stop Motors
if(++delay_stopmotors > 200) // not immediately (wait 200 loops = 200 * 2ms = 0.4 s)
if(PPM_in[ParamSet.ChannelAssignment[CH_YAW]] > 75)
{
delay_stopmotors = 200; // do not repeat if once executed
ModelIsFlying = 0;
FCFlags &= ~(FCFLAG_MOTOR_RUN);
// gas/yaw joystick is bottom left
// _________
// | |
// | |
// | |
// | |
// |x |
// ¯¯¯¯¯¯¯¯¯
// Stop Motors
if(++delay_stopmotors > 200) // not immediately (wait 200 loops = 200 * 2ms = 0.4 s)
{
delay_stopmotors = 0;
ModelIsFlying = 0;
FCFlags &= ~(FCFLAG_MOTOR_RUN);
}
}
else delay_stopmotors = 0; // reset delay timer if sticks are not in this position
}
else delay_stopmotors = 0; // reset delay timer if sticks are not in this position
}
// remapping of paameters only if the signal rc-sigbnal conditions are good
// remapping of parameters only if the signal rc-signal conditions are good
} // eof RC_Quality > 150
 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/beta/Code Redesign killagreg/jetimenu.c
65,21 → 65,21
switch (GPSInfo.SatFix)
{
case SATFIX_NONE:
JetiBox_printfxy(6,0,"NoFix");
JetiBox_printfxy(7,0,"NoFix");
break;
case SATFIX_2D:
JetiBox_printfxy(6,0,"2DFix");
JetiBox_printfxy(7,0,"2DFix");
break;
case SATFIX_3D:
JetiBox_printfxy(6,0,"3DFix");
JetiBox_printfxy(7,0,"3DFix");
break;
default:
JetiBox_printfxy(6,0,"??Fix");
JetiBox_printfxy(7,0,"??Fix");
break;
}
if(GPSInfo.Flags & FLAG_DIFFSOLN)
{
JetiBox_printfxy(11,0,"/DGPS");
JetiBox_printfxy(9,0,"/DGPS");
}
JetiBox_printfxy(0,1,"Home:%03dm %03d%c", GPSInfo.HomeDistance/10, GPSInfo.HomeBearing, 0xDF);
}
/beta/Code Redesign killagreg/uart0.c
145,16 → 145,16
"Voltage [0.1V] ",
"Receiver Level ", //10
"YawGyro Heading ",
"Motor Front ",
"Motor Rear ",
"Motor Left ",
"Motor Right ", //15
"Motor 1 ",
"Motor 2 ",
"Motor 3 ",
"Motor 4 ", //15
" ",
" ",
"VarioMeter ",
"MK3MAG CalState ",
"NickServo ", //20
"Hoovergas ",
"Hovergas ",
"Current [0.1A]",
"Capacity [mAh] ",
" ",