1
0
Fork 0

Allow to disable screen sleep

This commit is contained in:
Gregory Eremin 2019-03-25 11:52:14 +01:00
parent 5e925b2cd4
commit 805cffffcd
3 changed files with 7 additions and 1 deletions

View File

@ -42,3 +42,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17 #define RGBLIGHT_VAL_STEP 17
// #define SCREEN_SLEEP

View File

@ -42,3 +42,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17 #define RGBLIGHT_VAL_STEP 17
// #define SCREEN_SLEEP

View File

@ -26,7 +26,7 @@ static const unsigned char font[] PROGMEM;
//#define BatteryUpdateInterval 10000 /* milliseconds */ //#define BatteryUpdateInterval 10000 /* milliseconds */
// 'last_flush' is declared as uint16_t, // 'last_flush' is declared as uint16_t,
// so this must be less than 65535 // so this must be less than 65535
#define ScreenOffInterval 60000 /* milliseconds */ #define ScreenOffInterval 60000 /* milliseconds */
#if DEBUG_TO_SCREEN #if DEBUG_TO_SCREEN
static uint8_t displaying; static uint8_t displaying;
@ -331,9 +331,11 @@ void iota_gfx_task(void) {
force_dirty = false; force_dirty = false;
} }
#ifdef SCREEN_SLEEP
if (timer_elapsed(last_flush) > ScreenOffInterval) { if (timer_elapsed(last_flush) > ScreenOffInterval) {
iota_gfx_off(); iota_gfx_off();
} }
#endif
} }
bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { bool process_record_gfx(uint16_t keycode, keyrecord_t *record) {