Bug fix on gruvin9x board (strange sound / no [Menu] key)

This commit is contained in:
bsongis
2012-06-19 12:22:34 +00:00
parent cb24c1e46e
commit 831541bd61
+4 -5
View File
@@ -1008,17 +1008,16 @@ void message(const pm_char *title, const pm_char *t, const char *last)
void checkTrims() void checkTrims()
{ {
uint8_t event = getEvent(true); uint8_t event = getEvent(true);
if (event) {
int8_t k = (event & EVT_KEY_MASK) - TRM_BASE;
int8_t s = g_model.trimInc;
#else #else
uint8_t checkTrim(uint8_t event) uint8_t checkTrim(uint8_t event)
{ {
#endif
int8_t k = (event & EVT_KEY_MASK) - TRM_BASE; int8_t k = (event & EVT_KEY_MASK) - TRM_BASE;
int8_t s = g_model.trimInc; int8_t s = g_model.trimInc;
if (k>=0 && k<8) {
#if !defined(PCBV4)
if (k>=0 && k<8)
#endif #endif
{ // && (event & _MSK_KEY_REPT))
// LH_DWN LH_UP LV_DWN LV_UP RV_DWN RV_UP RH_DWN RH_UP // LH_DWN LH_UP LV_DWN LV_UP RV_DWN RV_UP RH_DWN RH_UP
uint8_t idx = CONVERT_MODE(1+k/2) - 1; uint8_t idx = CONVERT_MODE(1+k/2) - 1;
uint8_t phase = getTrimFlightPhase(s_perout_flight_phase, idx); uint8_t phase = getTrimFlightPhase(s_perout_flight_phase, idx);