Provides index-based usernames that will avoid the issues inherent in free text entry.
- Author
- Jeremy Stintzcum (jerem.nosp@m.y.st.nosp@m.intzc.nosp@m.um@g.nosp@m.mail..nosp@m.com)
- Date
- 2025-05-02
- Copyright
- Copyright (c) 2025
◆ USER_LIST_SHIFT
#define USER_LIST_SHIFT 2 |
◆ ADJ1_X
◆ WORDSPACING
◆ ADJ2_X
◆ NOUN_X
◆ WORD_OFFSET
◆ COLOR_OFFSET
◆ listArrayIdx_t
Enumerator |
---|
ADJ1 | |
ADJ2 | |
NOUN | |
RAND_NUM | |
◆ initUsernameSystem()
void initUsernameSystem |
( |
void | | ) |
|
Call this to initialize the MAC variable. Call inside the swadge2024.h file.
◆ generateMACUsername()
Generates a username based on the MAC of the swadge.
- Parameters
-
nd | Data struct the name is saved to |
◆ generateRandUsername()
Generates a random username.
- Parameters
-
nd | Data struct the name is saved to |
◆ setUsernameFromND()
Sets the username from a predefined nd.
- Parameters
-
◆ setUsernameFromIdxs()
void setUsernameFromIdxs |
( |
nameData_t * | nd, |
|
|
int | idx1, |
|
|
int | idx2, |
|
|
int | idx3, |
|
|
int | randomCode ) |
Set the Username From indices. Useful for loading data from swadgepass.
- Parameters
-
nd | Data struct to receive the objects |
idx1 | First index |
idx2 | Second index |
idx3 | Third index |
randomCode | numbers at the end of the swadge |
◆ handleUsernamePickerInput()
Handles the input of the username.
- Parameters
-
evt | The button event object |
nd | Data structure to store data in |
- Returns
- true If the user presses A to finalize the name
-
false If the user is still selecting a name
◆ drawUsernamePicker()
Draws the picker input.
- Parameters
-
◆ getSystemUsername()
Get the System Username object.
- Returns
- nameData_t* The username for the system at large
◆ setSystemUsername()
Saves the username to NVS.
- Parameters
-
◆ setUsernameFrom32()
void setUsernameFrom32 |
( |
nameData_t * | nd, |
|
|
int32_t | packed ) |
Set the Username from a int32.
- Parameters
-
nd | nameData_t to initialize |
packed | int32_t to load name from |
◆ swadgeUsername