Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Watchy",
"version": "1.4.14",
"version": "1.4.15",
"description": "Watchy - An Open Source E-Paper Watch by SQFMI",
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Watchy
version=1.4.14
version=1.4.15
author=SQFMI
maintainer=SQFMI
sentence=Watchy - An Open Source E-Paper Watch by SQFMI
Expand Down
30 changes: 16 additions & 14 deletions src/Watchy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,18 @@ void Watchy::handleButtonPress() {
case 4:
setupWifi();
break;
case 5:
/*case 5:
showUpdateFW();
break;
case 6:
break;*/
case 5:
showSyncNTP();
break;
default:
break;
}
} else if (guiState == FW_UPDATE_STATE) {
} /*else if (guiState == FW_UPDATE_STATE) {
updateFWBegin();
}
}*/
}
// Back Button
else if (wakeupBit & BACK_BTN_MASK) {
Expand Down Expand Up @@ -239,18 +239,18 @@ void Watchy::handleButtonPress() {
case 4:
setupWifi();
break;
case 5:
/*case 5:
showUpdateFW();
break;
case 6:
break;*/
case 5:
showSyncNTP();
break;
default:
break;
}
} else if (guiState == FW_UPDATE_STATE) {
}/* else if (guiState == FW_UPDATE_STATE) {
updateFWBegin();
}
}*/
} else if (digitalRead(BACK_BTN_PIN) == ACTIVE_LOW) {
lastTimeout = millis();
if (guiState ==
Expand Down Expand Up @@ -297,7 +297,7 @@ void Watchy::showMenu(byte menuIndex, bool partialRefresh) {

const char *menuItems[] = {
"About Watchy", "Vibrate Motor", "Show Accelerometer",
"Set Time", "Setup WiFi", "Update Firmware",
"Set Time", "Setup WiFi", /*"Update Firmware",*/
"Sync NTP"};
for (int i = 0; i < MENU_LENGTH; i++) {
yPos = MENU_HEIGHT + (MENU_HEIGHT * i);
Expand Down Expand Up @@ -330,7 +330,7 @@ void Watchy::showFastMenu(byte menuIndex) {

const char *menuItems[] = {
"About Watchy", "Vibrate Motor", "Show Accelerometer",
"Set Time", "Setup WiFi", "Update Firmware",
"Set Time", "Setup WiFi", /*"Update Firmware",*/
"Sync NTP"};
for (int i = 0; i < MENU_LENGTH; i++) {
yPos = MENU_HEIGHT + (MENU_HEIGHT * i);
Expand Down Expand Up @@ -975,7 +975,7 @@ bool Watchy::connectWiFi() {
}
return WIFI_CONFIGURED;
}

/*
void Watchy::showUpdateFW() {
display.setFullWindow();
display.fillScreen(GxEPD_BLACK);
Expand Down Expand Up @@ -1081,7 +1081,7 @@ void Watchy::updateFWBegin() {
btStop();
showMenu(menuIndex, false);
}

*/
void Watchy::showSyncNTP() {
display.setFullWindow();
display.fillScreen(GxEPD_BLACK);
Expand Down Expand Up @@ -1118,6 +1118,8 @@ void Watchy::showSyncNTP() {
} else {
display.println("NTP Sync Failed");
}
WiFi.mode(WIFI_OFF);
btStop();
} else {
display.println("WiFi Not Configured");
}
Expand Down
3 changes: 2 additions & 1 deletion src/WatchyRTC.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#include "WatchyRTC.h"

WatchyRTC::WatchyRTC() : rtc_ds(false) {}
WatchyRTC::WatchyRTC(){}

void WatchyRTC::init() {
byte error;
Wire.beginTransmission(RTC_DS_ADDR);
error = Wire.endTransmission();
if (error == 0) {
rtcType = DS3231;
rtc_ds.begin();
} else {
Wire.beginTransmission(RTC_PCF_ADDR);
error = Wire.endTransmission();
Expand Down
2 changes: 1 addition & 1 deletion src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
#define APP_STATE 1
#define FW_UPDATE_STATE 2
#define MENU_HEIGHT 25
#define MENU_LENGTH 7
#define MENU_LENGTH 6
// set time
#define SET_HOUR 0
#define SET_MINUTE 1
Expand Down