From a0409d0c7f1bc4afa6389010fbef1168662700b6 Mon Sep 17 00:00:00 2001
From: fvanroie <15969459+fvanroie@users.noreply.github.com>
Date: Sat, 23 Jan 2021 22:22:25 +0100
Subject: [PATCH] Add Invert Colors display option
---
src/hasp_config.h | 23 ++++++++++++-----------
src/hasp_gui.cpp | 4 ++++
src/svc/hasp_http.cpp | 9 +++++++--
3 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/src/hasp_config.h b/src/hasp_config.h
index 9a05d065..cd556da5 100644
--- a/src/hasp_config.h
+++ b/src/hasp_config.h
@@ -3,12 +3,12 @@
#if HASP_USE_CONFIG > 0
-#ifndef HASP_CONFIG_H
-#define HASP_CONFIG_H
+ #ifndef HASP_CONFIG_H
+ #define HASP_CONFIG_H
-#include "hasp_conf.h"
-#include "ArduinoJson.h"
-#include "hasp_debug.h" // for TAG_CONF
+ #include "hasp_conf.h"
+ #include "ArduinoJson.h"
+ #include "hasp_debug.h" // for TAG_CONF
/* ===== Default Event Processors ===== */
void configSetup(void);
@@ -49,18 +49,19 @@ const char F_CONFIG_GROUP[] PROGMEM = "group";
const char F_CONFIG_BAUD[] PROGMEM = "baud";
const char F_CONFIG_LOG[] PROGMEM = "log";
const char F_CONFIG_PROTOCOL[] PROGMEM = "proto";
-const char F_GUI_ROTATION[] PROGMEM = "rotation";
-const char F_GUI_TICKPERIOD[] PROGMEM = "tickperiod";
+const char F_GUI_ROTATION[] PROGMEM = "rotate";
+const char F_GUI_INVERT[] PROGMEM = "invert";
+const char F_GUI_TICKPERIOD[] PROGMEM = "tick";
const char F_GUI_IDLEPERIOD1[] PROGMEM = "idle1";
const char F_GUI_IDLEPERIOD2[] PROGMEM = "idle2";
const char F_GUI_CALIBRATION[] PROGMEM = "calibration";
-const char F_GUI_BACKLIGHTPIN[] PROGMEM = "bcklpin";
-const char F_GUI_POINTER[] PROGMEM = "pointer";
-const char F_DEBUG_TELEPERIOD[] PROGMEM = "teleperiod";
+const char F_GUI_BACKLIGHTPIN[] PROGMEM = "bckl";
+const char F_GUI_POINTER[] PROGMEM = "cursor";
+const char F_DEBUG_TELEPERIOD[] PROGMEM = "tele";
const char F_GPIO_CONFIG[] PROGMEM = "config";
const char HASP_CONFIG_FILE[] PROGMEM = "/config.json";
-#endif
+ #endif
#endif // HASP_USE_CONFIG
\ No newline at end of file
diff --git a/src/hasp_gui.cpp b/src/hasp_gui.cpp
index 681c4f00..da0217ff 100644
--- a/src/hasp_gui.cpp
+++ b/src/hasp_gui.cpp
@@ -506,6 +506,9 @@ bool guiGetConfig(const JsonObject & settings)
if(guiShowPointer != settings[FPSTR(F_GUI_POINTER)].as
()) httpMessage += F(" checked"); + httpMessage += F(">Invert Colors"); + + httpMessage += F("
()) httpMessage += F(" checked"); httpMessage += F(">Show Pointer");