Subversion Repositories FlightCtrl

Rev

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

Rev 2124 Rev 2132
Line 11... Line 11...
11
#include "rc.h"
11
#include "rc.h"
12
#include "externalControl.h"
12
#include "externalControl.h"
13
#include "output.h"
13
#include "output.h"
14
#include "attitude.h"
14
#include "attitude.h"
15
#include "commands.h"
15
#include "commands.h"
-
 
16
#include "main.h"
Line 16... Line 17...
16
 
17
 
17
#define FC_ADDRESS 1
18
#define FC_ADDRESS 1
18
#define NC_ADDRESS 2
19
#define NC_ADDRESS 2
Line 181... Line 182...
181
        rxDataLen = 0;
182
        rxDataLen = 0;
Line 182... Line 183...
182
 
183
 
183
        // no bytes to send
184
        // no bytes to send
Line 184... Line -...
184
        txd_complete = TRUE;
-
 
185
 
-
 
186
#ifdef USE_DIRECT_GPS
-
 
187
        toMk3MagTimer = setDelay(220);
-
 
188
#endif
185
        txd_complete = TRUE;
189
 
186
 
190
        versionInfo.SWMajor = VERSION_MAJOR;
187
        versionInfo.SWMajor = VERSION_MAJOR;
191
        versionInfo.SWMinor = VERSION_MINOR;
188
        versionInfo.SWMinor = VERSION_MINOR;
192
        versionInfo.SWPatch = VERSION_PATCH;
189
        versionInfo.SWPatch = VERSION_PATCH;
Line 257... Line 254...
257
                                rxd_buffer[ptr_rxd_buffer] = '\r'; // set termination character
254
                                rxd_buffer[ptr_rxd_buffer] = '\r'; // set termination character
258
                                receivedBytes = ptr_rxd_buffer + 1;// store number of received bytes
255
                                receivedBytes = ptr_rxd_buffer + 1;// store number of received bytes
259
                                rxd_buffer_locked = TRUE; // lock the rxd buffer
256
                                rxd_buffer_locked = TRUE; // lock the rxd buffer
260
                                // if 2nd byte is an 'R' enable watchdog that will result in an reset
257
                                // if 2nd byte is an 'R' enable watchdog that will result in an reset
261
                                if (rxd_buffer[2] == 'R') {
258
                                if (rxd_buffer[2] == 'R') {
262
                                        wdt_enable(WDTO_250MS);
259
                                        reset();
263
                                } // Reset-Commando
260
                                }
264
                        } else { // checksum invalid
261
                        } else { // checksum invalid
265
                                rxd_buffer_locked = FALSE; // unlock rxd buffer
262
                                rxd_buffer_locked = FALSE; // unlock rxd buffer
266
                        }
263
                        }
267
                        ptr_rxd_buffer = 0; // reset rxd buffer pointer
264
                        ptr_rxd_buffer = 0; // reset rxd buffer pointer
268
                }
265
                }