mirror of https://github.com/sqfmi/Watchy.git
Compare commits
No commits in common. "c5b43d2eac7781a60cd066d29e0e96b6c07321fb" and "26f5ac20c0a254ed8e414a14202cabd47787f63f" have entirely different histories.
c5b43d2eac
...
26f5ac20c0
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Watchy",
|
"name": "Watchy",
|
||||||
"version": "1.3.3",
|
"version": "1.3.2",
|
||||||
"description": "Watchy - An Open Source E-Paper Watch by SQFMI",
|
"description": "Watchy - An Open Source E-Paper Watch by SQFMI",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name=Watchy
|
name=Watchy
|
||||||
version=1.3.3
|
version=1.3.2
|
||||||
author=SQFMI
|
author=SQFMI
|
||||||
maintainer=SQFMI
|
maintainer=SQFMI
|
||||||
sentence=Watchy - An Open Source E-Paper Watch by SQFMI
|
sentence=Watchy - An Open Source E-Paper Watch by SQFMI
|
||||||
|
|
|
@ -72,7 +72,7 @@ void Watchy::handleButtonPress(){
|
||||||
switch(menuIndex)
|
switch(menuIndex)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
showAbout();
|
showBattery();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
showBuzz();
|
showBuzz();
|
||||||
|
@ -154,7 +154,7 @@ void Watchy::handleButtonPress(){
|
||||||
switch(menuIndex)
|
switch(menuIndex)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
showAbout();
|
showBattery();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
showBuzz();
|
showBuzz();
|
||||||
|
@ -223,7 +223,7 @@ void Watchy::showMenu(byte menuIndex, bool partialRefresh){
|
||||||
uint16_t w, h;
|
uint16_t w, h;
|
||||||
int16_t yPos;
|
int16_t yPos;
|
||||||
|
|
||||||
const char *menuItems[] = {"About Watchy", "Vibrate Motor", "Show Accelerometer", "Set Time", "Setup WiFi", "Update Firmware", "Sync NTP"};
|
const char *menuItems[] = {"Check Battery", "Vibrate Motor", "Show Accelerometer", "Set Time", "Setup WiFi", "Update Firmware", "Sync NTP"};
|
||||||
for(int i=0; i<MENU_LENGTH; i++){
|
for(int i=0; i<MENU_LENGTH; i++){
|
||||||
yPos = MENU_HEIGHT+(MENU_HEIGHT*i);
|
yPos = MENU_HEIGHT+(MENU_HEIGHT*i);
|
||||||
display.setCursor(0, yPos);
|
display.setCursor(0, yPos);
|
||||||
|
@ -252,7 +252,7 @@ void Watchy::showFastMenu(byte menuIndex){
|
||||||
uint16_t w, h;
|
uint16_t w, h;
|
||||||
int16_t yPos;
|
int16_t yPos;
|
||||||
|
|
||||||
const char *menuItems[] = {"About Watchy", "Vibrate Motor", "Show Accelerometer", "Set Time", "Setup WiFi", "Update Firmware", "Sync NTP"};
|
const char *menuItems[] = {"Check Battery", "Vibrate Motor", "Show Accelerometer", "Set Time", "Setup WiFi", "Update Firmware", "Sync NTP"};
|
||||||
for(int i=0; i<MENU_LENGTH; i++){
|
for(int i=0; i<MENU_LENGTH; i++){
|
||||||
yPos = MENU_HEIGHT+(MENU_HEIGHT*i);
|
yPos = MENU_HEIGHT+(MENU_HEIGHT*i);
|
||||||
display.setCursor(0, yPos);
|
display.setCursor(0, yPos);
|
||||||
|
@ -272,25 +272,17 @@ void Watchy::showFastMenu(byte menuIndex){
|
||||||
guiState = MAIN_MENU_STATE;
|
guiState = MAIN_MENU_STATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Watchy::showAbout(){
|
void Watchy::showBattery(){
|
||||||
display.setFullWindow();
|
display.setFullWindow();
|
||||||
display.fillScreen(GxEPD_BLACK);
|
display.fillScreen(GxEPD_BLACK);
|
||||||
display.setFont(&FreeMonoBold9pt7b);
|
display.setFont(&FreeMonoBold9pt7b);
|
||||||
display.setTextColor(GxEPD_WHITE);
|
display.setTextColor(GxEPD_WHITE);
|
||||||
display.setCursor(0, 20);
|
display.setCursor(20, 30);
|
||||||
|
display.println("Battery Voltage:");
|
||||||
display.print("Lib Ver: v");
|
|
||||||
display.println(WATCHY_LIB_VER);
|
|
||||||
|
|
||||||
const char *RTC_HW[3] = { "<UNKNOWN>", "DS3231", "PCF8563" };
|
|
||||||
display.print("RTC: ");
|
|
||||||
display.println(RTC_HW[RTC.rtcType]); //0 = UNKNOWN, 1 = DS3231, 2 = PCF8563
|
|
||||||
|
|
||||||
display.print("Batt: ");
|
|
||||||
float voltage = getBatteryVoltage();
|
float voltage = getBatteryVoltage();
|
||||||
|
display.setCursor(70, 80);
|
||||||
display.print(voltage);
|
display.print(voltage);
|
||||||
display.println("V");
|
display.println("V");
|
||||||
|
|
||||||
display.display(false); //full refresh
|
display.display(false); //full refresh
|
||||||
|
|
||||||
guiState = APP_STATE;
|
guiState = APP_STATE;
|
||||||
|
|
|
@ -54,7 +54,7 @@ class Watchy {
|
||||||
void handleButtonPress();
|
void handleButtonPress();
|
||||||
void showMenu(byte menuIndex, bool partialRefresh);
|
void showMenu(byte menuIndex, bool partialRefresh);
|
||||||
void showFastMenu(byte menuIndex);
|
void showFastMenu(byte menuIndex);
|
||||||
void showAbout();
|
void showBattery();
|
||||||
void showBuzz();
|
void showBuzz();
|
||||||
void showAccelerometer();
|
void showAccelerometer();
|
||||||
void showUpdateFW();
|
void showUpdateFW();
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "time.h"
|
#include "time.h"
|
||||||
|
|
||||||
#define DS3231 1
|
#define DS3231 0
|
||||||
#define PCF8563 2
|
#define PCF8563 1
|
||||||
#define RTC_DS_ADDR 0x68
|
#define RTC_DS_ADDR 0x68
|
||||||
#define RTC_PCF_ADDR 0x51
|
#define RTC_PCF_ADDR 0x51
|
||||||
#define YEAR_OFFSET_DS 1970
|
#define YEAR_OFFSET_DS 1970
|
||||||
|
|
|
@ -50,6 +50,5 @@
|
||||||
#define SOFTWARE_VERSION_PATCH 0
|
#define SOFTWARE_VERSION_PATCH 0
|
||||||
#define HARDWARE_VERSION_MAJOR 1
|
#define HARDWARE_VERSION_MAJOR 1
|
||||||
#define HARDWARE_VERSION_MINOR 0
|
#define HARDWARE_VERSION_MINOR 0
|
||||||
//Versioning
|
|
||||||
#define WATCHY_LIB_VER "1.3.3"
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue