asterics / FLipMouse-esp32

This repository contains the FLipMouse firmware for upcoming version 3 with the ESP32
GNU General Public License v3.0
17 stars 6 forks source link

Create adapted copy of the Web Configuration GUI for FABI #12

Closed klues closed 5 years ago

klues commented 5 years ago

Introduction

This github project is both for the new version of the FlipMouse and for the new Version of FABI: 1) FlipMouse = Lip mouse, see http://www.asterics-academy.net/tools/flip 2) FABI = Button interface, see http://www.asterics-academy.net/tools/fabi

Both use nearly the same Firmware, the same communication protocol (see AT API), and therefore it makes sense to also use (nearly) the same Web Configuration API.

Goal

The goal of this isssue is to split the current source folder of the Web GUI in two folders: 1) webgui/flipmouse/ --> containing the current contents of the spiffs_content folder 2) webgui/fabi/ --> containing a copy of the current contents of the spiffs_content folder, but adapted to the FABI.

Adaptions for the FABI Web GUI

Compared to the current Web GUI for the FlipMouse (see it at https://asterics.github.io/FLipMouse-esp32/ ) the following adaptions are needed for the FABI Web GUI: 1) General appearance, see Screenshot 1 1.1 Header is "FABI Configuration" 1.2 Tab "Basic Setup" should be removed 1.3 Tab "Sip and Puff" should only be visible if Live-data is provided by the FABI device (see method "parseLiveValues()" here) 1.4. By default only the Tabs "Slot Configuration" and "Action Configuration" should be visible 2) Changes in Tab "Action Configuration", see Screenshot 2 2.1 FlipMouse Mode is not needed for FABI -> should be removed 2.2 In "Actions to define" FABI has more possible buttons 2.3 Sip/puff actions in "Actions to define" should only be shown if "Sip and Puff" tab is also shown 3) Design 3.1 Maybe it would be nice if the FABI page has a different color theme (e.g. green instead of Blue) in order to make it possible to easily distinguish between them.

klues commented 5 years ago

ad 1.3) Starting the reporting of live raw values is done with the command AT SR (see AT API).

At https://github.com/asterics/FLipMouse-esp32/blob/master/webguitest/spiffs_content/index.htm#L568 a callback method for the live values is registered which then does something with the live data. So if the registered callback method is called once we know that the FABI sends live sip/puff data and therefore the tab "Sip and puff" should be shown. If the registered callback method is never called after sending AT SR to FABI, the tab "Sip and puff" should not be shown.

I would maybe implement it like this: Tab "Sip and Puff" is initially hidden and will be shown if the FABI once has sent live values. This check is done on each page refresh. After the Tab is once shown it will be stay until the next page refresh.

klues commented 5 years ago

is fixed with https://github.com/asterics/FLipMouse-esp32/pull/13