update docs
This commit is contained in:
@@ -514,6 +514,7 @@ void DisplayManager_::loadNativeApps()
|
||||
|
||||
void DisplayManager_::setup()
|
||||
{
|
||||
|
||||
TJpgDec.setCallback(jpg_output);
|
||||
FastLED.addLeds<NEOPIXEL, MATRIX_PIN>(leds, MATRIX_WIDTH * MATRIX_HEIGHT);
|
||||
gif.setMatrix(&matrix);
|
||||
|
||||
@@ -116,7 +116,7 @@ IPAddress gateway;
|
||||
IPAddress subnet;
|
||||
IPAddress primaryDNS;
|
||||
IPAddress secondaryDNS;
|
||||
const char *VERSION = "0.45";
|
||||
const char *VERSION = "0.46";
|
||||
String MQTT_HOST = "";
|
||||
uint16_t MQTT_PORT = 1883;
|
||||
String MQTT_USER;
|
||||
|
||||
@@ -44,11 +44,10 @@ const char *menuItems[] PROGMEM = {
|
||||
"TEMP",
|
||||
"APPS",
|
||||
"SOUND",
|
||||
"VOLUME",
|
||||
"UPDATE"};
|
||||
|
||||
int8_t menuIndex = 0;
|
||||
uint8_t menuItemCount = 14;
|
||||
uint8_t menuItemCount = 13;
|
||||
|
||||
const char *timeFormat[] PROGMEM = {
|
||||
"%H:%M:%S",
|
||||
@@ -374,8 +373,9 @@ void MenuManager_::selectButton()
|
||||
case 12:
|
||||
#ifdef AWTRIX_UPGRADE
|
||||
currentState = VolumeMenu;
|
||||
break;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 13:
|
||||
if (FirmwareVersionCheck())
|
||||
{
|
||||
|
||||
@@ -123,13 +123,14 @@ void ServerManager_::setup()
|
||||
{
|
||||
WiFi.config(local_IP, gateway, subnet, primaryDNS, secondaryDNS);
|
||||
}
|
||||
IPAddress myIP = mws.startWiFi(10000, uniqueID, "12345678");
|
||||
myIP = mws.startWiFi(10000, uniqueID, "12345678");
|
||||
|
||||
isConnected = !(myIP == IPAddress(192, 168, 4, 1));
|
||||
Serial.println(myIP.toString());
|
||||
|
||||
if (isConnected)
|
||||
{
|
||||
|
||||
|
||||
mws.addOptionBox("Network");
|
||||
mws.addOption("Static IP", NET_STATIC);
|
||||
mws.addOption("Local IP", NET_IP);
|
||||
|
||||
@@ -14,6 +14,7 @@ public:
|
||||
void tick();
|
||||
void loadSettings();
|
||||
bool isConnected;
|
||||
IPAddress myIP;
|
||||
};
|
||||
|
||||
extern ServerManager_ &ServerManager;
|
||||
|
||||
14
src/main.cpp
14
src/main.cpp
@@ -61,15 +61,10 @@ void setup()
|
||||
delay(500);
|
||||
Serial.begin(9600);
|
||||
loadSettings();
|
||||
Serial.println("1");
|
||||
ServerManager.loadSettings();
|
||||
Serial.println("2");
|
||||
DisplayManager.setup();
|
||||
Serial.println("3");
|
||||
DisplayManager.HSVtext(9, 6, VERSION, true);
|
||||
Serial.println("4");
|
||||
delay(500);
|
||||
Serial.println("5");
|
||||
PeripheryManager.playBootSound();
|
||||
xTaskCreatePinnedToCore(BootAnimation, "Task", 10000, NULL, 1, &taskHandle, 1);
|
||||
ServerManager.setup();
|
||||
@@ -78,13 +73,20 @@ void setup()
|
||||
{
|
||||
MQTTManager.setup();
|
||||
DisplayManager.loadNativeApps();
|
||||
StopTask = true;
|
||||
float x = 4;
|
||||
while (x >= -85)
|
||||
{
|
||||
DisplayManager.HSVtext(x, 6, ("AWTRIX " + ServerManager.myIP.toString()).c_str(), true);
|
||||
x -= 0.18;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AP_MODE = true;
|
||||
StopTask = true;
|
||||
}
|
||||
|
||||
StopTask = true;
|
||||
delay(200);
|
||||
DisplayManager.clearMatrix();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user