Skip to content

Commit 4cc58ad

Browse files
authored
Merge pull request #19 from OpenTimeWatch-Project/revert-18-main
Revert "V0.3.2"
2 parents f241bb6 + 9841e0f commit 4cc58ad

3 files changed

Lines changed: 38 additions & 166 deletions

File tree

README.md

Lines changed: 16 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -31,69 +31,19 @@ which is closer to your location in line 44 ```const char* ntpServer = "pool.ntp
3131
Below are a few common NTP server URLs:-
3232
<br>
3333

34-
Area | HostName
35-
-------:|:-------------------------
36-
Asia | asia.pool.ntp.org
37-
Europe | europe.pool.ntp.org
38-
North America | north-america.pool.ntp.org
39-
Oceania | oceania.pool.ntp.org
40-
South America | south-america.pool.ntp.org
34+
![Alt text](images/ntp.png)
4135

4236
## For Platformio users
4337
### TQT pro N4R2 (Flash: 4MB, PSRAM: 2MB)
4438
Just upload the code without any changes to the ```platformio.ini``` file. It should look like this:
4539
<br>
46-
```
47-
; PlatformIO Project Configuration File
48-
49-
50-
[platformio]
51-
boards_dir = ./board
52-
;default_envs = T-QT-Pro-N8
53-
default_envs = T-QT-Pro-N4R2
54-
description = Open source watch OS for ESP32 based watches
55-
56-
;[env:T-QT-Pro-N8]
57-
[env:T-QT-Pro-N4R2]
58-
platform = espressif32@6.6.0
59-
board = esp32-s3-t-qt-pro
60-
framework = arduino
61-
build_flags =
62-
-DBOARD_HAS_PSRAM
63-
lib_deps =
64-
lennarthennigs/Button2@^2.3.3
65-
adafruit/Adafruit GFX Library@^1.11.11
66-
adafruit/Adafruit MPU6050 @ ^2.0.3
67-
adafruit/Adafruit Unified Sensor @ ^1.1.4
68-
```
40+
![Alt text](images/TQT-psram-conf.png)
6941

7042
Note:- Platformio is currently assuming we have total 1MB of flash and not detecting the PSRAM.
7143
### TQT pro N8 (Flash: 8MB, PSRAM: none)
7244
You will need to do some changes in the ```platformio.ini``` file before uploading the code. It should look like this:
7345
<br>
74-
```
75-
; PlatformIO Project Configuration File
76-
77-
78-
[platformio]
79-
boards_dir = ./board
80-
default_envs = T-QT-Pro-N8
81-
;default_envs = T-QT-Pro-N4R2
82-
description = Open source watch OS for ESP32 based watches
83-
84-
[env:T-QT-Pro-N8]
85-
;[env:T-QT-Pro-N4R2]
86-
platform = espressif32@6.6.0
87-
board = esp32-s3-t-qt-pro
88-
framework = arduino
89-
build_flags =
90-
; -DBOARD_HAS_PSRAM
91-
lib_deps =
92-
lennarthennigs/Button2@^2.3.3
93-
adafruit/Adafruit GFX Library@^1.11.11
94-
adafruit/Adafruit MPU6050 @ ^2.0.3
95-
adafruit/Adafruit Unified Sensor @ ^1.1.4
96-
```
46+
![Alt text](images/TQT-non-psram-conf.png)
9747

9848
## For Arduino IDE users
9949
All of the required code is in the ```src``` directory, just rename the file ```main.cpp``` to ```main.ino``` and install the below libraries and upload the code
@@ -106,7 +56,7 @@ All of the required code is in the ```src``` directory, just rename the file ```
10656
Note:- also refer to the README.md at [TQT pro](https://github.com/Xinyuan-LilyGO/T-QT/tree/main?tab=readme-ov-file#quick-start) for setting up the board in arduino ide.
10757

10858
## Configurator Tool
109-
The OpenTimeWatch Configurator tool is a python script which allows users to configure the Board, WiFi network and time settings before compiling and uploading the firmware to the watch. This tool does not compile and upload the code. To run the tool type
59+
The OpenTimeWatch Configurator tool is a python script which allows users to configure the WiFi network and time settings before compiling and uploading the firmware to the watch. This tool does not configure your board type nor does it compile and upload the code. To run the tool type
11060

11161
```python otwConfigurator.py```
11262

@@ -116,8 +66,6 @@ or
11666

11767
in your terminal.
11868

119-
Note:- This tool only configures the board for the usage in PlatformIO IDE
120-
12169
# Features
12270
1. Home screen with custom background
12371
2. Activity view shows steps walked, calories burned and weather (It is just a dummy and not functionally implemented yet)
@@ -139,25 +87,25 @@ Note:- This tool only configures the board for the usage in PlatformIO IDE
13987
4. While playing pong scroll button moves the paddle up and the menu button moves the paddle down
14088

14189
# Release Notes
142-
1. **V0.3.3** - OpenTimeWatch Configurator tool can now configure board settings.
143-
2. **V0.3.2** - New OpenTimeWatch Configurator tool.
144-
3. **V0.3.1** - otwUI bug fix, updated configuration for TQT pro N8 in ```platformio.ini``` file and better documentation.
145-
4. **V0.3** - New UI (created using [lopaka.app](https://lopaka.app/sandbox)), multiple watch faces, Wifi support, time synchronisation, back option in menus, accelerometer support and apps and sub menus separated from the ```main.cpp``` file.
146-
5. **V0.2.1** - Added refinements to the OS navigation, added a manual in the ```README.md``` and changed the tone of the speaker.
147-
6. **V0.2** - A significant update compared to V0.1, as it introduced menus, pong, interaction with peripherals (torch and speaker), OS being open sourced, matrix effect, settings menu.
148-
7. **V0.1** - The initial release it just had a home screen and an about screen.
90+
1. **V0.3.2** - New OpenTimeWatch Configurator tool.
91+
2. **V0.3.1** - otwUI bug fix, updated configuration for TQT pro N8 in ```platformio.ini``` file and better documentation.
92+
3. **V0.3** - New UI (created using [lopaka.app](https://lopaka.app/sandbox)), multiple watch faces, Wifi support, time synchronisation, back option in menus, accelerometer support and apps and sub menus separated from the ```main.cpp``` file.
93+
4. **V0.2.1** - Added refinements to the OS navigation, added a manual in the ```README.md``` and changed the tone of the speaker.
94+
5. **V0.2** - A significant update compared to V0.1, as it introduced menus, pong, interaction with peripherals (torch and speaker), OS being open sourced, matrix effect, settings menu.
95+
6. **V0.1** - The initial release it just had a home screen and an about screen.
14996

15097
# What to expect in V0.4?
15198
1. Support for our new watch hardware:- OpenTimeWatch 1
15299
2. Weather synchronisation
153100
3. Accent colours
154101
4. IR transmitter support
155102
5. Support for 3 navigation buttons
156-
6. Screen brightness adjustment
157-
7. Screen on-time adjustment
158-
8. Watch endurance
159-
9. Flappy bird clone
160-
10. UART console support
103+
6. Pulse sensor support
104+
7. Screen brightness adjustment
105+
8. Screen on-time adjustment
106+
9. Watch endurance
107+
10. Flappy bird clone
108+
11. UART console support
161109

162110
# Can I contribute ?
163111
Yes, you can contribute to the project by the following ways :

otwConfigurator.py

Lines changed: 22 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,14 @@
1-
# OpenTimeWatchOS Configurator Tool
2-
3-
print("Welcome to OpenTimeWatchOS configuration script")
4-
OSVarPath = "src/osVariables/osVariables.cpp"
5-
OSConfPath = "platformio.ini"
6-
7-
def configureBoard(userBoard):
8-
if userBoard == 1:
9-
try:
10-
with open(OSConfPath, 'r') as file:
11-
lines = file.readlines()
12-
for i, line in enumerate(lines):
13-
if i == 6: # Uncomment line 7
14-
lines[i] = line.lstrip(";")
15-
elif i == 5: # Comment line 6
16-
if not line.startswith(";"):
17-
lines[i] = ";" + line
18-
elif i == 10: # Uncomment line 11
19-
lines[i] = line.lstrip(";")
20-
elif i == 9: # Comment line 10
21-
if not line.startswith(";"):
22-
lines[i] = ";" + line
23-
elif i == 15: # Uncomment line 16
24-
lines[i] = line.lstrip(";")
25-
with open(OSConfPath, 'w') as file:
26-
file.writelines(lines)
27-
except Exception as e:
28-
print(f"An error occurred: {e}")
29-
30-
else:
31-
try:
32-
with open(OSConfPath, 'r') as file:
33-
lines = file.readlines()
34-
for i, line in enumerate(lines):
35-
if i == 5: # Uncomment line 6
36-
lines[i] = line.lstrip(";")
37-
elif i == 6: # Comment line 7
38-
if not line.startswith(";"):
39-
lines[i] = ";" + line
40-
elif i == 9: # Uncomment line 10
41-
lines[i] = line.lstrip(";")
42-
elif i == 10: # Comment line 11
43-
if not line.startswith(";"):
44-
lines[i] = ";" + line
45-
elif i == 15: # Comment line 16
46-
if not line.startswith(";"):
47-
lines[i] = ";" + line
48-
with open(OSConfPath, 'w') as file:
49-
file.writelines(lines)
50-
except Exception as e:
51-
print(f"An error occurred: {e}")
1+
# OpenTimeWatch Configurator tool
522

3+
print("Welcome to OpenTimeWatchOS configurator tool")
4+
file_path = "/home/jaswanth/Developer/Arduino/OpenTimeWatch-OS/src/osVariables/osVariables.cpp"
535

546
def configureWifiNetwork(userSSID):
557
try:
56-
with open(OSVarPath, 'r') as file:
8+
with open(file_path, 'r') as file:
579
lines = file.readlines()
5810

59-
with open(OSVarPath, 'w') as file:
11+
with open(file_path, 'w') as file:
6012
for line in lines:
6113
if 'const char* ssid = ' in line:
6214
line = f'const char* ssid = "{userSSID}";\n'
@@ -66,10 +18,10 @@ def configureWifiNetwork(userSSID):
6618

6719
def configureWifiPassword(userPassword):
6820
try:
69-
with open(OSVarPath, 'r') as file:
21+
with open(file_path, 'r') as file:
7022
lines = file.readlines()
7123

72-
with open(OSVarPath, 'w') as file:
24+
with open(file_path, 'w') as file:
7325
for line in lines:
7426
if 'const char* password = ' in line:
7527
line = f'const char* password = "{userPassword}";\n'
@@ -79,10 +31,10 @@ def configureWifiPassword(userPassword):
7931

8032
def configureGMTOffset(userGMT):
8133
try:
82-
with open(OSVarPath, 'r') as file:
34+
with open(file_path, 'r') as file:
8335
lines = file.readlines()
8436

85-
with open(OSVarPath, 'w') as file:
37+
with open(file_path, 'w') as file:
8638
for line in lines:
8739
if 'const long gmtOffset_sec = ' in line:
8840
line = f'const long gmtOffset_sec = {userGMT};\n'
@@ -92,10 +44,10 @@ def configureGMTOffset(userGMT):
9244

9345
def configureDayLightOffset(userDayLight):
9446
try:
95-
with open(OSVarPath, 'r') as file:
47+
with open(file_path, 'r') as file:
9648
lines = file.readlines()
9749

98-
with open(OSVarPath, 'w') as file:
50+
with open(file_path, 'w') as file:
9951
for line in lines:
10052
if 'const int daylightOffset_sec = ' in line:
10153
line = f'const int daylightOffset_sec = {userDayLight};\n'
@@ -104,40 +56,14 @@ def configureDayLightOffset(userDayLight):
10456
print(f"An error occurred: {e}")
10557

10658
if __name__ == "__main__":
107-
print("1. Configure")
108-
print("2. About")
109-
print("3. Exit")
110-
userOption = input("Select an option: ")
111-
112-
if userOption == "1":
113-
print("Watch Hardware: ")
114-
print("1. T-QT-Pro-N4R2")
115-
print("2. T-QT-Pro-N8")
116-
userBoard = int(input("Select your board: "))
117-
configureBoard(userBoard)
118-
if userBoard == 1:
119-
print("You have selected T-QT-Pro-N8")
120-
else:
121-
print("You have selected T-QT-Pro-N4R2")
122-
userSSID = input("Enter your WiFi network name: ")
123-
configureWifiNetwork(userSSID)
124-
userPassword = input("Enter your WiFi network password: ")
125-
configureWifiPassword(userPassword)
126-
userGMT = input("Enter your area's GMT offset(in seconds): ")
127-
configureGMTOffset(userGMT)
128-
userDayLight = input("Enter your area's day light offset(in seconds): ")
129-
configureDayLightOffset(userDayLight)
130-
print("Configuration complete. Please upload the code.")
131-
elif userOption == "2":
132-
print("OpenTimeWatchOS Configuration Script V1.1")
133-
print("This is a configuration script for OpenTimeWatchOS for your watch hardware")
134-
print("It allows you to configure the Board, WiFi SSID, password, GMT offset, and daylight offset")
135-
print("For more information, visit the OpenTimeWatchOS GitHub repository.")
136-
print("https://github.com/OpenTimeWatch-Project/OpenTimeWatch-OS")
137-
elif userOption == "3":
138-
print("Exiting the script. Goodbye!")
139-
exit(0)
140-
else:
141-
print("Invalid option. Please try again.")
142-
exit(1)
143-
59+
60+
userSSID = input("Enter your WiFi network name: ")
61+
configureWifiNetwork(userSSID)
62+
userPassword = input("Enter your WiFi network password: ")
63+
configureWifiPassword(userPassword)
64+
userGMT = input("Enter your area's GMT offset(in seconds): ")
65+
configureGMTOffset(userGMT)
66+
userDayLight = input("Enter your area's day light offset(in seconds): ")
67+
configureDayLightOffset(userDayLight)
68+
69+
print("Configuration complete. Please compile and upload the firmware.")

src/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
* Minor update, otwUI bug fix and better documentation.
2222
* 19 April 2025 - V 0.3.1 -
2323
* A new configurator tool.
24-
* 24 April 2025 - V 0.3.2 -
25-
* OpenTimeWatch Configurator tool update.
2624
*/
2725

2826
// include all the necessary libraries for the OS

0 commit comments

Comments
 (0)