Compare commits
2 Commits
2c10fdff62
...
20910d5fda
| Author | SHA1 | Date | |
|---|---|---|---|
| 20910d5fda | |||
| db34c25bb4 |
@ -669,12 +669,9 @@ class TempWebServer:
|
|||||||
header = """
|
header = """
|
||||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;">
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;">
|
||||||
<h3 style="color: #34495e; margin: 0;">⚙️ Edit Schedules</h3>
|
<h3 style="color: #34495e; margin: 0;">⚙️ Edit Schedules</h3>
|
||||||
<form method="POST" action="/schedule" style="margin: 0;">
|
<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;">
|
||||||
<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
|
▶️ Resume Schedule
|
||||||
</button>
|
</button>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
else:
|
else:
|
||||||
|
|||||||
8
main.py
8
main.py
@ -77,6 +77,14 @@ if wifi and wifi.isconnected():
|
|||||||
|
|
||||||
# Send startup message with IP
|
# Send startup message with IP
|
||||||
send_discord_message(f"Pico W online at http://{ifconfig[0]} ✅")
|
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:
|
else:
|
||||||
print("\n" + "="*50)
|
print("\n" + "="*50)
|
||||||
print("WiFi Connection Failed!")
|
print("WiFi Connection Failed!")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user