diff options
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/apps/settings.c b/apps/settings.c index 025a911557..673bca70d1 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -866,33 +866,33 @@ bool set_time(char* string, int timedate[]) | |||
866 | lcd_puts(0, 1, buffer); | 866 | lcd_puts(0, 1, buffer); |
867 | 867 | ||
868 | /* recalculate the positions and offsets */ | 868 | /* recalculate the positions and offsets */ |
869 | lcd_getstringsize(string, FONT_UI, &width, &prev_line_height); | 869 | lcd_getstringsize(string, &width, &prev_line_height); |
870 | lcd_getstringsize(buffer, FONT_UI, &width, &line_height); | 870 | lcd_getstringsize(buffer, &width, &line_height); |
871 | lcd_getstringsize(":", FONT_UI, &separator_width, &height); | 871 | lcd_getstringsize(":", &separator_width, &height); |
872 | 872 | ||
873 | strncpy(reffub, buffer, 2); | 873 | strncpy(reffub, buffer, 2); |
874 | reffub[2] = '\0'; | 874 | reffub[2] = '\0'; |
875 | lcd_getstringsize(reffub, FONT_UI, &width, &height); | 875 | lcd_getstringsize(reffub, &width, &height); |
876 | cursor[0][INDEX_X] = 0; | 876 | cursor[0][INDEX_X] = 0; |
877 | cursor[0][INDEX_Y] = prev_line_height; | 877 | cursor[0][INDEX_Y] = prev_line_height; |
878 | cursor[0][INDEX_WIDTH] = width; | 878 | cursor[0][INDEX_WIDTH] = width; |
879 | 879 | ||
880 | strncpy(reffub, buffer + 3, 2); | 880 | strncpy(reffub, buffer + 3, 2); |
881 | reffub[2] = '\0'; | 881 | reffub[2] = '\0'; |
882 | lcd_getstringsize(reffub, FONT_UI, &width, &height); | 882 | lcd_getstringsize(reffub, &width, &height); |
883 | cursor[1][INDEX_X] = cursor[0][INDEX_WIDTH] + separator_width; | 883 | cursor[1][INDEX_X] = cursor[0][INDEX_WIDTH] + separator_width; |
884 | cursor[1][INDEX_Y] = prev_line_height; | 884 | cursor[1][INDEX_Y] = prev_line_height; |
885 | cursor[1][INDEX_WIDTH] = width; | 885 | cursor[1][INDEX_WIDTH] = width; |
886 | 886 | ||
887 | strncpy(reffub, buffer + 6, 2); | 887 | strncpy(reffub, buffer + 6, 2); |
888 | reffub[2] = '\0'; | 888 | reffub[2] = '\0'; |
889 | lcd_getstringsize(reffub, FONT_UI, &width, &height); | 889 | lcd_getstringsize(reffub, &width, &height); |
890 | cursor[2][INDEX_X] = cursor[0][INDEX_WIDTH] + separator_width + | 890 | cursor[2][INDEX_X] = cursor[0][INDEX_WIDTH] + separator_width + |
891 | cursor[1][INDEX_WIDTH] + separator_width; | 891 | cursor[1][INDEX_WIDTH] + separator_width; |
892 | cursor[2][INDEX_Y] = prev_line_height; | 892 | cursor[2][INDEX_Y] = prev_line_height; |
893 | cursor[2][INDEX_WIDTH] = width; | 893 | cursor[2][INDEX_WIDTH] = width; |
894 | 894 | ||
895 | lcd_getstringsize(buffer, FONT_UI, &width, &prev_line_height); | 895 | lcd_getstringsize(buffer, &width, &prev_line_height); |
896 | 896 | ||
897 | snprintf(buffer, sizeof(buffer), "%s 20%02d %s %02d ", | 897 | snprintf(buffer, sizeof(buffer), "%s 20%02d %s %02d ", |
898 | dayname[timedate[6]], | 898 | dayname[timedate[6]], |
@@ -902,22 +902,22 @@ bool set_time(char* string, int timedate[]) | |||
902 | lcd_puts(0, 2, buffer); | 902 | lcd_puts(0, 2, buffer); |
903 | 903 | ||
904 | /* recalculate the positions and offsets */ | 904 | /* recalculate the positions and offsets */ |
905 | lcd_getstringsize(buffer, FONT_UI, &width, &line_height); | 905 | lcd_getstringsize(buffer, &width, &line_height); |
906 | strncpy(reffub, buffer, 3); | 906 | strncpy(reffub, buffer, 3); |
907 | reffub[3] = '\0'; | 907 | reffub[3] = '\0'; |
908 | lcd_getstringsize(reffub, FONT_UI, &weekday_width, &height); | 908 | lcd_getstringsize(reffub, &weekday_width, &height); |
909 | lcd_getstringsize(" ", FONT_UI, &separator_width, &height); | 909 | lcd_getstringsize(" ", &separator_width, &height); |
910 | 910 | ||
911 | strncpy(reffub, buffer + 4, 4); | 911 | strncpy(reffub, buffer + 4, 4); |
912 | reffub[4] = '\0'; | 912 | reffub[4] = '\0'; |
913 | lcd_getstringsize(reffub, FONT_UI, &width, &height); | 913 | lcd_getstringsize(reffub, &width, &height); |
914 | cursor[3][INDEX_X] = weekday_width + separator_width; | 914 | cursor[3][INDEX_X] = weekday_width + separator_width; |
915 | cursor[3][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height; | 915 | cursor[3][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height; |
916 | cursor[3][INDEX_WIDTH] = width; | 916 | cursor[3][INDEX_WIDTH] = width; |
917 | 917 | ||
918 | strncpy(reffub, buffer + 9, 3); | 918 | strncpy(reffub, buffer + 9, 3); |
919 | reffub[3] = '\0'; | 919 | reffub[3] = '\0'; |
920 | lcd_getstringsize(reffub, FONT_UI, &width, &height); | 920 | lcd_getstringsize(reffub, &width, &height); |
921 | cursor[4][INDEX_X] = weekday_width + separator_width + | 921 | cursor[4][INDEX_X] = weekday_width + separator_width + |
922 | cursor[3][INDEX_WIDTH] + separator_width; | 922 | cursor[3][INDEX_WIDTH] + separator_width; |
923 | cursor[4][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height; | 923 | cursor[4][INDEX_Y] = cursor[0][INDEX_Y] + prev_line_height; |
@@ -925,7 +925,7 @@ bool set_time(char* string, int timedate[]) | |||
925 | 925 | ||
926 | strncpy(reffub, buffer + 13, 2); | 926 | strncpy(reffub, buffer + 13, 2); |
927 | reffub[2] = '\0'; | 927 | reffub[2] = '\0'; |
928 | lcd_getstringsize(reffub, FONT_UI, &width, &height); | 928 | lcd_getstringsize(reffub, &width, &height); |
929 | cursor[5][INDEX_X] = weekday_width + separator_width + | 929 | cursor[5][INDEX_X] = weekday_width + separator_width + |
930 | cursor[3][INDEX_WIDTH] + separator_width + | 930 | cursor[3][INDEX_WIDTH] + separator_width + |
931 | cursor[4][INDEX_WIDTH] + separator_width; | 931 | cursor[4][INDEX_WIDTH] + separator_width; |