NanoLux (Device) 3.0
Codebase for the open-source AudioLux device.
|
#include <iterator>
#include <algorithm>
Go to the source code of this file.
Functions | |
void | initialize_pattern_list () |
Creates a JSON file with the list of patterns. | |
void | handle_patterns_list_request (AsyncWebServerRequest *request) |
Handles sending the JSON of patterns to other devices. | |
void | handle_pattern_get_request (AsyncWebServerRequest *request) |
Handler function for getting pattern data. | |
void | handle_strip_get_request (AsyncWebServerRequest *request) |
Handler function for getting pattern data. | |
void | handle_strip_put_request (AsyncWebServerRequest *request, JsonVariant &json) |
Handler function for updating strip data. | |
void | handle_pattern_put_request (AsyncWebServerRequest *request, JsonVariant &json) |
Handler function for updating pattern data. | |
void | handle_load_save_slot_put_request (AsyncWebServerRequest *request, JsonVariant &json) |
Handler function for loading a saved pattern. | |
void | handle_save_to_slot_put_request (AsyncWebServerRequest *request, JsonVariant &json) |
Handler function for saving the currently-running pattern. | |
void | handle_system_settings_put_request (AsyncWebServerRequest *request, JsonVariant &json) |
Handler function for updating system settings. | |
void | handle_system_settings_get_request (AsyncWebServerRequest *request) |
Handler function for getting system settings. | |
void | handle_new_password_put_request (AsyncWebServerRequest *request, JsonVariant &json) |
Variables | |
constexpr int | PATTERN_BUFFER_SIZE = 4096 |
APIGetHook | apiGetHooks [] |
The currently active get requests. | |
constexpr int | API_GET_HOOK_COUNT = 4 |
APIPutHook | apiPutHooks [] |
The currently active put requests. | |
constexpr int | API_PUT_HOOK_COUNT = 6 |
This file contains most of the web request API, in particular pertaining to pattern and pattern settings.
For the remaining parts of the API, see webServer.h
|
inline |
Handler function for loading a saved pattern.
request | The incoming put request |
json | The incoming JSON file holding the slot to load. |
If the save slot to load is less than 0 or above NUM_SAVES, send a failure response and don't load anything.
|
inline |
Handler function for getting pattern data.
request | The incoming request for data. |
This handler is responsible for sending data from a particular pattern. The web request contains the particular pattern to get through a string query. Once that pattern has been requested, the device sends back information like the currently selected pattern id, the pattern brightness, and the smoothing.
|
inline |
Handler function for updating pattern data.
request | The incoming put request |
json | The incoming JSON file holding new data. |
This handler is responsible for updating pattern-level data from a web request. The specific pattern to update is obtained from a string query.
|
inline |
Handles sending the JSON of patterns to other devices.
request | The incoming request for data. |
|
inline |
Handler function for saving the currently-running pattern.
request | The incoming put request |
json | The incoming JSON file holding the slot to save to. |
If the save slot to load is less than 0 or above NUM_SAVES, send a failure response and don't load anything.
|
inline |
Handler function for getting pattern data.
request | The incoming request for data. |
This handler is responsible for sending strip configuration data. The device device sends back information like the pattern count, pattern transparancy, and the current mode (Z-layering or Strip Splitting)
|
inline |
Handler function for updating strip data.
request | The incoming put request |
json | The incoming JSON file holding new data. |
This handler is responsible for updating strip-level data from a web request.
|
inline |
Handler function for getting system settings.
request | The incoming get request |
Includes data such as strip length, loop times, and debug mode.
|
inline |
Handler function for updating system settings.
request | The incoming put request |
json | The incoming JSON file holding the new system settings to save |
Includes data such as strip length, loop times, and debug mode.
|
inline |
Creates a JSON file with the list of patterns.
This file is intended to be sent to connecting devices in order to present a list of patterns to the user.
APIGetHook apiGetHooks[] |
The currently active get requests.
APIPutHook apiPutHooks[] |
The currently active put requests.