Compare commits

...

2 Commits

2 changed files with 11 additions and 6 deletions

View File

@ -669,12 +669,9 @@ class TempWebServer:
header = """
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;">
<h3 style="color: #34495e; margin: 0;"> Edit Schedules</h3>
<form method="POST" action="/schedule" style="margin: 0;">
<input type="hidden" name="resume_schedule" value="true">
<button type="submit" style="padding: 10px 20px; background: linear-gradient(135deg, #2ecc71, #27ae60); color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: transform 0.2s;">
Resume Schedule
</button>
</form>
<button type="submit" name="resume_schedule" value="true" style="padding: 10px 20px; background: linear-gradient(135deg, #2ecc71, #27ae60); color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: transform 0.2s;">
Resume Schedule
</button>
</div>
"""
else:

View File

@ -77,6 +77,14 @@ if wifi and wifi.isconnected():
# Send startup message with IP
send_discord_message(f"Pico W online at http://{ifconfig[0]}")
# Sync time with NTP
try:
import ntptime
ntptime.settime()
print("Time synced with NTP server")
except Exception as e:
print("Failed to sync time: {}".format(e))
else:
print("\n" + "="*50)
print("WiFi Connection Failed!")