Skip to content

Commit

Permalink
🔨 chore: Improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Cp0204 committed Jul 26, 2024
1 parent 0c230a1 commit 2d0c454
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions cubefx/cubefx.ino
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,23 @@ void saveToEEPROM() {

void openAP() {
WiFi.setHostname(hostname);
WiFi.mode(WIFI_AP);
WiFi.softAPConfig(local_ip, gateway, subnet);
WiFi.softAP(ssid, password);
// Print AP Info
Serial.println("-- Open AP --");
// Serial.printf("ssid: %s\n", ssid);
// Serial.printf("password: %s\n", password);
// Serial.printf("local_ip: %s\n", WiFi.softAPIP().toString());
// Serial.printf("subnet: %s\n", subnet.toString());
// Serial.printf("gateway: %s\n", gateway.toString());
// Serial.println("");
}

void closeAP() {
WiFi.softAPdisconnect(true);
WiFi.mode(WIFI_OFF);
Serial.println("Closed AP");
Serial.println("-- Close AP --");
}

void setupMDNS() {
Expand Down Expand Up @@ -369,8 +378,7 @@ void setup() {
digitalWrite(BOARD_LED, HIGH);
// Output startup parameter
Serial.begin(15200);
Serial.println("Initial CubeFX");
Serial.println("==============================");
Serial.println("== Initial CubeFX ==");
loadFromEEPROM();
Serial.printf("isLightOn: %d\n", isLightOn);
Serial.printf("effectId: %d\n", effectId);
Expand All @@ -380,7 +388,7 @@ void setup() {
for (int i = 0; i < NUM_PIXELS; i++) {
Serial.printf("%06X%s", colors[i], (i < NUM_PIXELS - 1) ? ", " : "\n");
}
Serial.println("==============================");
Serial.println("");
// WS2812FX
ws2812fx.init();
// 自定义效果,从 0:72 开始注册
Expand Down

0 comments on commit 2d0c454

Please sign in to comment.