diff -r a02cf8e8fa36 src/pages/320x240x16/guiobj.h --- a/src/pages/320x240x16/guiobj.h Fri Jan 03 12:28:21 2014 -0800 +++ b/src/pages/320x240x16/guiobj.h Mon Jan 06 19:55:02 2014 +0100 @@ -317,6 +317,11 @@ guiTextSelect_t temp; guiLabel_t lengthlbl; guiTextSelect_t length; +#if HAS_VIBRATINGMOTOR + guiLabel_t head3_3; + guiLabel_t viblbl; + guiTextSelect_t vib; +#endif } g3; } u; }; diff -r a02cf8e8fa36 src/pages/320x240x16/tx_configure.c --- a/src/pages/320x240x16/tx_configure.c Fri Jan 03 12:28:21 2014 -0800 +++ b/src/pages/320x240x16/tx_configure.c Mon Jan 06 19:55:02 2014 +0100 @@ -37,6 +37,8 @@ static void calibrate_touch(void); static void init_touch_calib(); +static const char *_vibration_state_cb(guiObject_t *obj, int dir, void *data); +static void _vibration_test_cb(guiObject_t *obj, void *data); void PAGE_ChangeByName(const char *pageName, u8 menuPage) { // dummy method for devo8, only used in devo10 @@ -198,6 +200,13 @@ if (row+8 >= LCD_HEIGHT) { row = 40; col1 = COL3; col2 = COL4; } GUI_CreateLabelBox(&gui3->lengthlbl, col1, row, 0, 0, &DEFAULT_FONT, NULL, NULL, _tr("Length")); GUI_CreateTextSelect(&gui3->length, col2, row, TEXTSELECT_96, NULL, units_cb, (void *)0L); +#if HAS_VIBRATINGMOTOR + row += space + 8; + GUI_CreateLabelBox(&gui3->head3_3, col1, row, 0, 0, &SECTION_FONT, NULL, NULL, _tr("Vibration settings")); + row += space; + GUI_CreateLabelBox(&gui3->viblbl, col1, row, 0, 0, &DEFAULT_FONT, NULL, NULL, _tr("Vibration:")); + GUI_CreateTextSelect(&gui3->vib, col2, row, TEXTSELECT_96, _vibration_test_cb, _vibration_state_cb, (void *)&Transmitter.vibration_state); +#endif } } @@ -324,3 +333,17 @@ } } +static const char *_vibration_state_cb(guiObject_t *obj, int dir, void *data) +{ + (void)data; + (void)obj; + Transmitter.vibration_state = GUI_TextSelectHelper(Transmitter.vibration_state, 0, 1, dir, 1, 1, NULL); + return Transmitter.vibration_state ? "On" : "Off"; +} + +static void _vibration_test_cb(guiObject_t *obj, void *data) +{ + (void)obj; + (void)data; + MUSIC_Play(MUSIC_TIMER_WARNING); +} diff -r a02cf8e8fa36 src/target/devo8/target_defs.h --- a/src/target/devo8/target_defs.h Fri Jan 03 12:28:21 2014 -0800 +++ b/src/target/devo8/target_defs.h Mon Jan 06 19:55:02 2014 +0100 @@ -14,7 +14,7 @@ #define HAS_TELEMETRY 1 #define HAS_TOUCH 1 #define HAS_RTC 0 -#define HAS_VIBRATINGMOTOR 0 +#define HAS_VIBRATINGMOTOR 1 #define HAS_DATALOG 1 #define HAS_SCANNER 0