Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTP bugfix #2

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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 contrib/ChronosTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ def wbsl_download( self, txtdata ):
#Command must be given
if len( args ) == 0:
print >> sys.stderr, "ERROR: you must specify a command"
parser.print_help()
sys.exit( 5 )

#If no device option given, try to guess
Expand Down
30 changes: 2 additions & 28 deletions logic/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,35 +381,9 @@ void sx_time(u8 line)
// *************************************************************************************************
void display_time(u8 line, u8 update)
{
// Partial update
if (update == DISPLAY_LINE_UPDATE_PARTIAL)
// Partial and full update
if (update == DISPLAY_LINE_UPDATE_PARTIAL || update == DISPLAY_LINE_UPDATE_FULL)
{
if(sTime.drawFlag != 0)
{
if (sTime.line1ViewStyle == DISPLAY_DEFAULT_VIEW)
{
switch(sTime.drawFlag)
{
case 3:
#ifndef LZH
display_hours_12_or_24(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), sTime.hour, 2, 1, SEG_ON);
#else
display_hours_12_or_24(switch_seg(line, LCD_SEG_L1_3_2, LCD_SEG_L2_3_2), sTime.hour, 2, 0, SEG_ON);
#endif
case 2:
display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), _itoa(sTime.minute, 2, 0), SEG_ON);
}
}
else
{
// Seconds are always updated
display_chars(switch_seg(line, LCD_SEG_L1_1_0, LCD_SEG_L2_1_0), _itoa(sTime.second, 2, 0), SEG_ON);
}
}
}
else if (update == DISPLAY_LINE_UPDATE_FULL)
{
// Full update
if ( ( line == LINE1 && sTime.line1ViewStyle == DISPLAY_DEFAULT_VIEW ) || ( line == LINE2 && sTime.line2ViewStyle == DISPLAY_DEFAULT_VIEW ) )
{
// Display hours
Expand Down
2 changes: 1 addition & 1 deletion logic/date.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ void display_date(line_t line, update_t update)

//pfs BEGIN replace year display with day of week
//pfs algorith from http://klausler.com/new-dayofweek.html
#define BASE_YEAR 2001 // not a leap year, so no need to add 1
#define BASE_YEAR 1984 // not a leap year, so no need to add 1
u8 skew;
skew = (sDate.year - BASE_YEAR)+(sDate.year - BASE_YEAR)/4; // compute number of leap years since BASE_YEAR
if ((29 == get_numberOfDays(2, sDate.year)) && (sDate.month < 3))
Expand Down
2 changes: 1 addition & 1 deletion logic/otp.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ void display_otp(u8 line, u8 update)

display_symbol(LCD_ICON_HEART, SEG_ON);

#if TOTP
#ifdef TOTP
otp();
#endif

Expand Down