Closed optoisolated closed 8 months ago
Hmm, I think this might be too complex/much to go into the main watch face... but maybe ok for now. Things to fix:
if (!cachedTrig)
{
cachedTrig = true;
setup_trig();
}
Is in your if statement, should be in the analogue portion.
bool isOnOff(int number, int position) {
<- wrong formatting - requires snake_case and brackets on new line. Also, use specific int types, not generic int
:)
int hours = rtc.get_hours();
int mins = rtc.get_mins();
int secs = rtc.get_seconds();
int day = rtc.get_day();
String month = rtc.get_month_word();
int year = rtc.get_year();
That's hitting the RTC I2C bus 6 times in a row, every second. Most of that doesn't change often or at all during a viewing. If you are modifying rtc.cpp
anyway, maybe turn that into 1 function that returns all values you need by reference or the cached value.
see.. https://github.com/TinyWATCH-S3/Official-firmware/blob/c6d125577bafe37fd45b6b0b50eb76443fc257e4/Platform-io-source/src/tw_widgets/widget_ActivityRing.cpp#L15
Happy to discuss this more on Discord.
That looks great! Thanks :)
Initial commit for the Binary Watch face. Also added an extra function in the RTC module for requesting the Month without the Day. Single tap cycles colour palette. After one full cycle, it changes LED style.