1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-22 15:55:26 +03:00
opentx/radio/src/tests/crossfire.cpp
Bertrand Songis f7044a20ec #2894 - Crossfire (inverted serial) sent on S.PORT pin in the module bay
16 channels sent every 2.5ms now @ 200KBauds with CRC
2015-11-06 19:32:29 +01:00

55 lines
1.5 KiB
C++

/*
* Authors (alphabetical order)
* - Andre Bernet <bernet.andre@gmail.com>
* - Andreas Weitl
* - Bertrand Songis <bsongis@gmail.com>
* - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
* - Cameron Weeks <th9xer@gmail.com>
* - Erez Raviv
* - Gabriel Birkus
* - Jean-Pierre Parisy
* - Karl Szmutny
* - Michael Blandford
* - Michal Hlavinka
* - Pat Mackenzie
* - Philip Moss
* - Rob Thomson
* - Romolo Manfredini <romolo.manfredini@gmail.com>
* - Thomas Husterer
*
* opentx is based on code named
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
* er9x by Erez Raviv: http://code.google.com/p/er9x/,
* and the original (and ongoing) project by
* Thomas Husterer, th9x: http://code.google.com/p/th9x/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#include "gtests.h"
#if defined(CROSSFIRE)
TEST(Crossfire, createCrossfireFrame)
{
int16_t pulsesStart[NUM_TRAINER];
uint8_t crossfire[CROSSFIRE_FRAME_LEN];
memset(crossfire, 0, sizeof(crossfire));
for (int i=0; i<NUM_TRAINER; i++) {
pulsesStart[i] = -1024 + (2048 / NUM_TRAINER) * i;
}
createCrossfireFrame(crossfire, pulsesStart);
// TODO check
}
#endif