Merge pull request #20 from IMXNOOBX/main

QOL Changes
This commit is contained in:
Noah Axon 2023-11-19 00:51:42 -06:00 committed by GitHub
commit 2cb3ffb15f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 66 additions and 26 deletions

38
.gitignore vendored Normal file
View File

@ -0,0 +1,38 @@
# Visual Studio Code
.vscode/
# Prerequisites
build/
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app

View File

@ -11,18 +11,6 @@ String buildver="2.0.0rc2";
#define BGCOLOR BLACK #define BGCOLOR BLACK
#define FGCOLOR GREEN #define FGCOLOR GREEN
struct QRCODE {
char name[19];
String url;
};
QRCODE qrcodes[] = {
{ "Rickroll", "https://youtu.be/dQw4w9WgXcQ"},
{ "HackerTyper", "https://hackertyper.net/"},
{ "ZomboCom", "https://html5zombo.com/"},
{ "Back", "" },
};
#if defined(STICK_C_PLUS) #if defined(STICK_C_PLUS)
#include <M5StickCPlus.h> #include <M5StickCPlus.h>
#define BIG_TEXT 4 #define BIG_TEXT 4
@ -117,6 +105,18 @@ struct MENU {
// 17 - Bluetooth Maelstrom // 17 - Bluetooth Maelstrom
// 18 - QR Codes // 18 - QR Codes
struct QRCODE {
char name[19];
String url;
};
QRCODE qrcodes[] = {
{ "Back", "" },
{ "Rickroll", "https://youtu.be/dQw4w9WgXcQ"},
{ "HackerTyper", "https://hackertyper.net/"},
{ "ZomboCom", "https://html5zombo.com/"},
};
bool isSwitching = true; bool isSwitching = true;
#if defined(RTC) #if defined(RTC)
int current_proc = 0; // Start in Clock Mode int current_proc = 0; // Start in Clock Mode
@ -269,13 +269,13 @@ void mmenu_loop() {
/// Dimmer MENU /// /// Dimmer MENU ///
MENU dmenu[] = { MENU dmenu[] = {
{ "Back", screen_dim_time},
{ "5 seconds", 5}, { "5 seconds", 5},
{ "10 seconds", 10}, { "10 seconds", 10},
{ "15 seconds", 15}, { "15 seconds", 15},
{ "20 seconds", 20}, { "20 seconds", 20},
{ "25 seconds", 25}, { "25 seconds", 25},
{ "30 seconds", 30}, { "30 seconds", 30},
{ "Back", screen_dim_time},
}; };
void dmenu_drawmenu() { void dmenu_drawmenu() {
@ -354,6 +354,7 @@ void mmenu_loop() {
/// SETTINGS MENU /// /// SETTINGS MENU ///
MENU smenu[] = { MENU smenu[] = {
{ "Back", 1},
#if defined(AXP) #if defined(AXP)
{ "Battery Info", 6}, { "Battery Info", 6},
{ "Brightness", 4}, { "Brightness", 4},
@ -368,7 +369,6 @@ MENU smenu[] = {
#if defined(USE_EEPROM) #if defined(USE_EEPROM)
{ "Clear Settings", 99}, { "Clear Settings", 99},
#endif #endif
{ "Back", 1},
}; };
void smenu_drawmenu() { void smenu_drawmenu() {
@ -416,9 +416,9 @@ int rotation = 1;
#if defined(ROTATION) #if defined(ROTATION)
/// Rotation MENU /// /// Rotation MENU ///
MENU rmenu[] = { MENU rmenu[] = {
{ "Back", rotation},
{ "Right", 1}, { "Right", 1},
{ "Left", 3}, { "Left", 3},
{ "Back", rotation},
}; };
void rmenu_drawmenu() { void rmenu_drawmenu() {
@ -532,6 +532,7 @@ void tvbgone_loop()
/// TVBG-Region MENU /// /// TVBG-Region MENU ///
MENU tvbgmenu[] = { MENU tvbgmenu[] = {
{ "Back", 3},
{ "Americas / Asia", 0}, { "Americas / Asia", 0},
{ "EU/MidEast/Africa", 1}, { "EU/MidEast/Africa", 1},
}; };
@ -568,6 +569,14 @@ void tvbgmenu_loop() {
} }
if (check_select_press()) { if (check_select_press()) {
region = tvbgmenu[cursor].command; region = tvbgmenu[cursor].command;
if (region == 3) {
current_proc = 1;
isSwitching = true;
rstOverride = false;
return;
}
#if defined(USE_EEPROM) #if defined(USE_EEPROM)
EEPROM.write(3, region); EEPROM.write(3, region);
EEPROM.commit(); EEPROM.commit();
@ -749,11 +758,11 @@ void sendAllCodes() {
/// Bluetooth Spamming /// /// Bluetooth Spamming ///
/// BTSPAM MENU /// /// BTSPAM MENU ///
MENU btmenu[] = { MENU btmenu[] = {
{ "Back", 4},
{ "AppleJuice", 0}, { "AppleJuice", 0},
{ "Swift Pair", 1}, { "Swift Pair", 1},
{ "SourApple Crash", 2}, { "SourApple Crash", 2},
{ "BT Maelstrom", 3}, { "BT Maelstrom", 3},
{ "Back", 4}
}; };
void btmenu_drawmenu() { void btmenu_drawmenu() {
@ -834,6 +843,7 @@ void btmenu_loop() {
} }
MENU ajmenu[] = { MENU ajmenu[] = {
{ "Back", 29},
{ "AirPods", 1}, { "AirPods", 1},
{ "Transfer Number", 27}, { "Transfer Number", 27},
{ "AirPods Pro", 2}, { "AirPods Pro", 2},
@ -862,7 +872,6 @@ MENU ajmenu[] = {
{ "AppleTV Network", 25}, { "AppleTV Network", 25},
{ "TV Color Balance", 26}, { "TV Color Balance", 26},
{ "Setup New Phone", 28}, { "Setup New Phone", 28},
{ "Back", 29},
}; };
void aj_drawmenu() { void aj_drawmenu() {
@ -1270,11 +1279,11 @@ void btmaelstrom_loop(){
/// WIFI MENU /// /// WIFI MENU ///
MENU wsmenu[] = { MENU wsmenu[] = {
{ "Back", 4},
{ "Scan Wifi", 0}, { "Scan Wifi", 0},
{ "Spam Funny", 1}, { "Spam Funny", 1},
{ "Spam Rickroll", 2}, { "Spam Rickroll", 2},
{ "Spam Random", 3}, { "Spam Random", 3},
{ "Back", 4},
}; };
void wsmenu_drawmenu() { void wsmenu_drawmenu() {
@ -1408,14 +1417,7 @@ void wscan_result_loop(){
DISP.setTextSize(SMALL_TEXT); DISP.setTextSize(SMALL_TEXT);
DISP.printf("Chan : %d\n", WiFi.channel(cursor)); DISP.printf("Chan : %d\n", WiFi.channel(cursor));
DISP.printf("Crypt: %s\n", encryptType); DISP.printf("Crypt: %s\n", encryptType);
DISP.printf("BSSID:\n %02x:%02x:%02x:%02x:%02x:%02x\n", DISP.print("BSSID:\n" + WiFi.BSSIDstr(i));
WiFi.BSSID(i)[0],
WiFi.BSSID(i)[1],
WiFi.BSSID(i)[2],
WiFi.BSSID(i)[3],
WiFi.BSSID(i)[4],
WiFi.BSSID(i)[5]
);
DISP.printf("\nNext: Back\n"); DISP.printf("\nNext: Back\n");
} }
} }