Subversion Repositories NaviCtrl

Rev

Rev 430 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 430 Rev 432
Line 57... Line 57...
57
#include "91x_lib.h"
57
#include "91x_lib.h"
58
#include "mkprotocol.h" 
58
#include "mkprotocol.h" 
59
#include "ramfunc.h"
59
#include "ramfunc.h"
60
#include "usb.h"
60
#include "usb.h"
61
#include "uart1.h"
61
#include "uart1.h"
-
 
62
#include "main.h"
Line 62... Line 63...
62
 
63
 
63
/**************************************************************/
64
/**************************************************************/
64
/* Create serial output frame                                 */
65
/* Create serial output frame                                 */
65
/**************************************************************/
66
/**************************************************************/
Line 189... Line 190...
189
                                {
190
                                {
190
                                    // checksum is valid
191
                                    // checksum is valid
191
                                        pRxBuff->Position = 0;                                 
192
                                        pRxBuff->Position = 0;                                 
192
                                        pRxBuff->Locked = TRUE;                                     // lock the rxd buffer 
193
                                        pRxBuff->Locked = TRUE;                                     // lock the rxd buffer 
193
                                        // if 2nd byte is an 'R' start bootloader
194
                                        // if 2nd byte is an 'R' start bootloader
194
                                        if(pRxBuff->pData[2] == 'R')
195
                                        if(pRxBuff->pData[2] == 'R' && !(FC.StatusFlags & FC_STATUS_MOTOR_RUN)) // not if the motors are running)
195
                                        {
196
                                        {
196
                                                PowerOff();
197
                                                PowerOff();
197
                                                VIC_DeInit();
198
                                                VIC_DeInit();
198
                                                Execute_Bootloader(); // Reset-Commando - Bootloader starten
199
                                                Execute_Bootloader(); // Reset-Commando - Bootloader starten
199
                                        }
200
                                        }