68 lines
2.3 KiB
C
68 lines
2.3 KiB
C
/*
|
|
* Copyright (C) OpenTX
|
|
*
|
|
* Based on code named
|
|
* th9x - http://code.google.com/p/th9x
|
|
* er9x - http://code.google.com/p/er9x
|
|
* gruvin9x - http://code.google.com/p/gruvin9x
|
|
*
|
|
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
#ifndef _GUI_HELPERS_H_
|
|
#define _GUI_HELPERS_H_
|
|
|
|
typedef bool (*IsValueAvailable)(int);
|
|
|
|
int circularIncDec(int current, int inc, int min, int max, IsValueAvailable isValueAvailable=NULL);
|
|
int getFirstAvailable(int min, int max, IsValueAvailable isValueAvailable);
|
|
|
|
#if defined(VIRTUALINPUTS)
|
|
bool isInputAvailable(int input);
|
|
#endif
|
|
|
|
bool isInputSourceAvailable(int source);
|
|
bool isThrottleSourceAvailable(int source);
|
|
bool isLogicalSwitchFunctionAvailable(int function);
|
|
bool isLogicalSwitchAvailable(int index);
|
|
bool isAssignableFunctionAvailable(int function);
|
|
bool isSourceAvailable(int source);
|
|
bool isSourceAvailableInGlobalFunctions(int source);
|
|
bool isSourceAvailableInCustomSwitches(int source);
|
|
bool isSourceAvailableInResetSpecialFunction(int index);
|
|
bool isSourceAvailableInGlobalResetSpecialFunction(int index);
|
|
bool isSwitchAvailableInLogicalSwitches(int swtch);
|
|
bool isSwitchAvailableInCustomFunctions(int swtch);
|
|
bool isSwitchAvailableInMixes(int swtch);
|
|
bool isSwitchAvailableInTimers(int swtch);
|
|
bool isModuleAvailable(int module);
|
|
bool isRfProtocolAvailable(int protocol);
|
|
bool isTrainerModeAvailable(int mode);
|
|
|
|
bool isSensorUnit(int sensor, uint8_t unit);
|
|
bool isCellsSensor(int sensor);
|
|
bool isGPSSensor(int sensor);
|
|
bool isAltSensor(int sensor);
|
|
bool isVoltsSensor(int sensor);
|
|
bool isCurrentSensor(int sensor);
|
|
bool isTelemetryFieldAvailable(int index);
|
|
bool isTelemetryFieldComparisonAvailable(int index);
|
|
bool isSensorAvailable(int sensor);
|
|
|
|
bool modelHasNotes();
|
|
|
|
#if defined(COLORLCD)
|
|
bool isSwitchWarningStateAvailable(int state);
|
|
#endif // #if defined(COLORLCD)
|
|
|
|
#endif // _GUI_HELPERS_H_
|