fix
This commit is contained in:
		@@ -12,14 +12,17 @@
 | 
				
			|||||||
static bool configChanged = false;
 | 
					static bool configChanged = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void configHandleFlash() {
 | 
					static void configHandleFlash() {
 | 
				
			||||||
 | 
					  uint8_t color = eepromReadFlashColor();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  canvasFillRow(CANVAS_HEIGHT-1, color);
 | 
				
			||||||
 | 
					  displaySetValue(color);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (buttonsConfig2Pressed()) {
 | 
					  if (buttonsConfig2Pressed()) {
 | 
				
			||||||
    configChanged = true;
 | 
					    configChanged = true;
 | 
				
			||||||
    uint8_t color = eepromReadFlashColor() + 1;
 | 
					    color += 1;
 | 
				
			||||||
    if (color > _color_end) {
 | 
					    if (color > _color_end) {
 | 
				
			||||||
      color = 0;
 | 
					      color = 0;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    canvasFillRow(CANVAS_HEIGHT-1, color);
 | 
					 | 
				
			||||||
    displaySetValue(color);
 | 
					 | 
				
			||||||
    eepromSetFlashColor(color);
 | 
					    eepromSetFlashColor(color);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -73,13 +76,13 @@ void configExec(void *handle) {
 | 
				
			|||||||
  configHandler[configState]();
 | 
					  configHandler[configState]();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (configChanged) {
 | 
					  if (configChanged) {
 | 
				
			||||||
    miniCanvasSetPixel(0, 2, _red);
 | 
					    miniCanvasSetPixel(0, 3, _red);
 | 
				
			||||||
    if (buttonsConfig4Pressed()) {
 | 
					    if (buttonsConfig4Pressed()) {
 | 
				
			||||||
      eepromCommit();
 | 
					      eepromCommit();
 | 
				
			||||||
      configChanged = false;
 | 
					      configChanged = false;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    miniCanvasSetPixel(0, 2, _green);
 | 
					    miniCanvasSetPixel(0, 3, _green);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  canvasShow();
 | 
					  canvasShow();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,5 @@
 | 
				
			|||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
 | 
					#include <string.h>
 | 
				
			||||||
#include "eeprom.h"
 | 
					#include "eeprom.h"
 | 
				
			||||||
#include "spi.h"
 | 
					#include "spi.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user