Commit Graph

36 Commits (22cfe5d38424c9d6806323bbb72c26915db5d768)

Author SHA1 Message Date
Andre LaFleur 22cfe5d384 Completely switch over to _rtc variable
* Doing this will make it easier to shuffle the logic in WatchyRTC to
  these other subclasses of AbstractRTC
* I think we may even want to collapse WatchyRTC completely into
  AbstractRTC, as the two resemble each other pretty close. We will
  see what sort of design we end up with in the meantime
2021-12-18 15:26:50 -07:00
Andre LaFleur 793ff8e61f Perform next step by pushing WatchyRTC to check in with other variables 2021-12-18 15:26:50 -07:00
Andre LaFleur 3a2974b997 Crossing the Rubicon
* We are now going to make _rtc a pointer, and use that
  process of polymorphism as part of the refactors. Again,
  I worry about memory management, but there does not seem
  to be a very clear way around this
2021-12-18 15:26:50 -07:00
Andre LaFleur 3ca79867b9 Rely on two types with if statements
* I worry about the simple constructors here though. I believe that
  causes things to be instantiated on the stack which is then blown
  away. That would mean that I would need to rely on the heap with
  the new keyword, but if I do that I will need to deallocate later.
* Digging into DS3232RTC, it looks like it has no deallocator, and I
  kind of suspect the same for Rtc_Pcf8563. Either way, we will want
  to ensure that we can delete those classes where we need to. I
  would hate to introduce a memory leak somewhere on something so
  small
2021-12-18 15:26:50 -07:00
Andre LaFleur b7800f0b21 Simplify init() a bit more 2021-12-18 15:26:50 -07:00
Andre LaFleur bac7b4eb51 Setup AbstractRTC, cleanup init(), and add some declarations 2021-12-18 15:26:50 -07:00
Andre LaFleur 715bbaf85d Begin RTC refactor
* My current understanding of the WatchyRTC class is that it came about
  due to the need to ship Watchys with new RTC chips. The class here is
  designed to accomodate both chips
* This class is a good way of doing just that--a single spot that
  hides the implementation details of both chips. The downside to this
  approach in the moment is that we have a bunch of conditionals that
  check if we have this or that chip, and if we ever need to support
  yet another chip, we will have an even more complex WatchyRTC class
* I am going to refactor this to simplify it so that way we will not
  have to worry about modifying this much if we need to support a new
  chip, or if someone else wants to support a new chip
2021-12-18 15:25:05 -07:00
SQFMI 768f681c7b Moved clear alarm function 2021-12-18 15:23:51 -07:00
Daniel Ansorregui 81ab3feb94 Set all pins to INPUT before deep sleep
* Some pins otherwise are left as output
  And their value is kept in deep sleep
  This can cause power usage in deep sleep
* From my measurements 0.13mA
  Or, 3mAh / day extra usage
2021-12-18 15:23:07 -07:00
Daniel Ansorregui d94bf3ac54 Optimize display update
* Hibernate should only be called before deep sleep
* Init should only be called once and notify the last init
* Set up init properly with 10ms reset and pulldown
* Use GxEDP2 1.4.0 library new busy callback
  to trigger a lightsleep in the mean time
  Saving 600ms of CPU time per update, (12mAs/minute)
  That is -4mAh per day savings
2021-12-18 15:20:32 -07:00
sqfmi 6fbb335552 fixed freeze bug 2021-12-18 15:20:32 -07:00
sqfmi 57725d9793 fixed setting datetime 2021-12-18 15:20:32 -07:00
sqfmi ec26c84da2 fixed bugs and change temp. sensor 2021-12-18 15:20:32 -07:00
sqfmi 7380c6b8f1 auto switch ADC pin 2021-12-18 15:20:32 -07:00
sqfmi 733c1abfb9 Fix RTC
- Added RTC scan
- Support for both RTCs in abstraction lib
2021-12-18 15:20:32 -07:00
SQFMI 66b8fe9c8c
Merge pull request #97 from gwilsonOSU/master
Added variable HOUR_12_24 to config.h
2021-08-25 21:24:48 -04:00
SQFMI 2f12a2babd
Merge pull request #87 from clayton-rogers/change-battery-adc-call
Change to more accurate ADC call
2021-08-25 21:20:53 -04:00
Greg Wilson 20ee700d5a Added variable HOUR_12_24 to config.h, for setting a 12-hour or 24-hour time display. Set to 24 by default. 2021-08-21 16:46:51 -07:00
Clayton Rogers d2d4ea4d08 Change to more accurate ADC call 2021-07-31 18:47:13 -04:00
наб 6c2e613e07
Fix "Please [Vv]isit" typo in firmware update screen 2021-07-17 20:29:04 +02:00
SQFMI aabb888069 Add support for ESP RTC 2021-06-13 21:21:37 -04:00
SQFMI 15179cfa0c update version 2021-04-01 15:25:22 -04:00
SQFMI 55cb672cee update weather interval 2021-04-01 15:24:32 -04:00
SQFMI 7d3b899123 experimental fast menu 2021-03-24 17:00:05 -04:00
Eric Doughty-Papassideris 0ed0d0922e Removing some warning and potential undefined behaviours 2021-03-09 23:42:51 +01:00
SQFMI 88e683931c update to 1.2.3 2021-01-30 17:09:24 -05:00
Leon Matthes 2317303522
Correct axes remapping of BMA423
Wrist detection now also works well.
2021-01-29 13:50:36 +01:00
SQFMI ef501c42e0 updated to 1.1.7 2021-01-05 00:03:49 -05:00
sqfmi 03ea538e32 BMA423 added accelerometer support 2020-02-23 13:49:44 -05:00
sqfmi 179f7657e5 updated to use GxEDP2 2020-02-17 17:47:28 -05:00
SQFMI 12c282e7c8
Update GxGDEH0154D67.cpp 2020-02-16 14:24:48 -05:00
SQFMI cd3353da68
updated timing 2020-02-16 14:24:10 -05:00
SQFMI bd8919e2c0
Update GxGDEH0154D67.h 2019-11-18 15:12:29 -05:00
SQFMI ed0815f610
Update GxGDEH0154D67.h 2019-11-18 15:11:59 -05:00
sqfmi fac615443a Added Button Example 2019-11-17 15:51:25 -05:00
sqfmi 80c448c32b Added Watchy basic example 2019-11-16 23:08:17 -05:00