136,21 → 136,21 |
// Instead, while away the time by flashing the 2 outputs: |
// First J16, then J17. Makes it easier to see which is which. |
timer = SetDelay(200); |
J16_ON; |
OUTPUT_ON(0); |
GRN_OFF; |
RED_ON; |
while(!CheckDelay(timer)); |
|
timer = SetDelay(200); |
J16_OFF; |
OUTPUT_OFF(0); |
OUTPUT_ON(1); |
RED_OFF; |
GRN_ON; |
J17_ON; |
while(!CheckDelay(timer)); |
|
timer = SetDelay(200); |
while(!CheckDelay(timer)); |
J17_OFF; |
OUTPUT_OFF(1); |
|
twi_diagnostics(); |
|
186,7 → 186,7 |
else printf("\n\rSupport for GPS at 1st UART"); |
#endif |
|
controlMixer_setNeutral(0); |
controlMixer_setNeutral(); |
|
// Cal. attitude sensors and reset integrals. |
attitude_setNeutral(); |
218,7 → 218,13 |
flight_control(); |
J4LOW; |
|
sendMotorData(); // the flight control code |
/* |
* If the motors are running (MKFlags & MKFLAG_MOTOR_RUN in flight.c), transmit |
* the throttle vector just computed. Otherwise, if motor test is engaged, transmit |
* the test throttle vector. If no testing, stop all motors. |
*/ |
// Obsoleted. |
// transmitMotorThrottleData(); |
|
RED_OFF; |
|
269,9 → 275,13 |
usart0_ProcessRxData(); |
|
if(CheckDelay(timer)) { |
if(UBat < staticParams.LowVoltageWarning) { |
if (UBat <= UBAT_AT_5V) { |
// Do nothing. The voltage on the input side of the regulator is <5V; |
// we must be running off USB power. Keep it quiet. |
} else if(UBat < staticParams.LowVoltageWarning) { |
beepBatteryAlarm(); |
} |
|
#ifdef USE_NAVICTRL |
SPI_StartTransmitPacket(); |
SendSPI = 4; |