Google tests again ok (missing initialization)
This commit is contained in:
@@ -15,6 +15,13 @@ extern uint16_t anaInValues[NUM_STICKS+NUM_POTS];
|
|||||||
|
|
||||||
void doMixerCalculations();
|
void doMixerCalculations();
|
||||||
|
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
#define RADIO_RESET() \
|
||||||
|
g_eeGeneral.switchConfig = 0x00007bff
|
||||||
|
#else
|
||||||
|
#define RADIO_RESET()
|
||||||
|
#endif
|
||||||
|
|
||||||
inline void MODEL_RESET()
|
inline void MODEL_RESET()
|
||||||
{
|
{
|
||||||
memset(&g_model, 0, sizeof(g_model));
|
memset(&g_model, 0, sizeof(g_model));
|
||||||
|
|||||||
@@ -34,19 +34,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <math.h>
|
#include "gtests.h"
|
||||||
#include <gtest/gtest.h>
|
|
||||||
|
|
||||||
#define SWAP_DEFINED
|
|
||||||
#include "opentx.h"
|
|
||||||
|
|
||||||
#define MODEL_RESET() \
|
|
||||||
memset(&g_model, 0, sizeof(g_model)); \
|
|
||||||
extern uint8_t s_mixer_first_run_done; \
|
|
||||||
s_mixer_first_run_done = false; \
|
|
||||||
lastFlightMode = 255;
|
|
||||||
|
|
||||||
extern void MIXER_RESET();
|
|
||||||
|
|
||||||
#if !defined(PCBTARANIS)
|
#if !defined(PCBTARANIS)
|
||||||
TEST(getSwitch, undefCSW)
|
TEST(getSwitch, undefCSW)
|
||||||
@@ -76,6 +64,7 @@ TEST(getSwitch, circularCSW)
|
|||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
TEST(getSwitch, OldTypeStickyCSW)
|
TEST(getSwitch, OldTypeStickyCSW)
|
||||||
{
|
{
|
||||||
|
RADIO_RESET();
|
||||||
MODEL_RESET();
|
MODEL_RESET();
|
||||||
MIXER_RESET();
|
MIXER_RESET();
|
||||||
g_model.logicalSw[0] = { LS_FUNC_AND, SWSRC_SA0, 0, 0, };
|
g_model.logicalSw[0] = { LS_FUNC_AND, SWSRC_SA0, 0, 0, };
|
||||||
|
|||||||
Reference in New Issue
Block a user