mirror of https://github.com/sqfmi/Watchy.git
commit
3e69aad334
|
@ -27,10 +27,16 @@ void Watchy7SEG::drawWatchFace(){
|
||||||
void Watchy7SEG::drawTime(){
|
void Watchy7SEG::drawTime(){
|
||||||
display.setFont(&DSEG7_Classic_Bold_53);
|
display.setFont(&DSEG7_Classic_Bold_53);
|
||||||
display.setCursor(5, 53+5);
|
display.setCursor(5, 53+5);
|
||||||
if(currentTime.Hour < 10){
|
int displayHour;
|
||||||
|
if(HOUR_12_24==12){
|
||||||
|
displayHour = ((currentTime.Hour+11)%12)+1;
|
||||||
|
} else {
|
||||||
|
displayHour = currentTime.Hour;
|
||||||
|
}
|
||||||
|
if(displayHour < 10){
|
||||||
display.print("0");
|
display.print("0");
|
||||||
}
|
}
|
||||||
display.print(currentTime.Hour);
|
display.print(displayHour);
|
||||||
display.print(":");
|
display.print(":");
|
||||||
if(currentTime.Minute < 10){
|
if(currentTime.Minute < 10){
|
||||||
display.print("0");
|
display.print("0");
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Watchy",
|
"name": "Watchy",
|
||||||
"version": "1.2.6",
|
"version": "1.2.7",
|
||||||
"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.2.6
|
version=1.2.7
|
||||||
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
|
||||||
|
|
|
@ -648,7 +648,8 @@ weatherData Watchy::getWeatherData(){
|
||||||
}
|
}
|
||||||
|
|
||||||
float Watchy::getBatteryVoltage(){
|
float Watchy::getBatteryVoltage(){
|
||||||
return analogRead(ADC_PIN) / 4096.0 * 7.23;
|
// Battery voltage goes through a 1/2 divider.
|
||||||
|
return analogReadMilliVolts(ADC_PIN) / 1000.0f * 2.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t Watchy::_readRegister(uint8_t address, uint8_t reg, uint8_t *data, uint16_t len)
|
uint16_t Watchy::_readRegister(uint8_t address, uint8_t reg, uint8_t *data, uint16_t len)
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#define SET_MONTH 3
|
#define SET_MONTH 3
|
||||||
#define SET_DAY 4
|
#define SET_DAY 4
|
||||||
#define YEAR_OFFSET 1970
|
#define YEAR_OFFSET 1970
|
||||||
|
#define HOUR_12_24 24
|
||||||
//BLE OTA
|
//BLE OTA
|
||||||
#define BLE_DEVICE_NAME "Watchy BLE OTA"
|
#define BLE_DEVICE_NAME "Watchy BLE OTA"
|
||||||
#define WATCHFACE_NAME "Watchy 7 Segment"
|
#define WATCHFACE_NAME "Watchy 7 Segment"
|
||||||
|
@ -57,4 +58,4 @@
|
||||||
#define HARDWARE_VERSION_MAJOR 1
|
#define HARDWARE_VERSION_MAJOR 1
|
||||||
#define HARDWARE_VERSION_MINOR 0
|
#define HARDWARE_VERSION_MINOR 0
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue