- Posts: 199
- Forum
- News, Announcements and Feedback
- Feedback & Questions
- [Bug & Fix] Need help on pull request and review
[Bug & Fix] Need help on pull request and review
- richardclli
- Topic Author
- Offline
Less
More
15 Oct 2015 01:55 #38825
by richardclli
[Bug & Fix] Need help on pull request and review was created by richardclli
I am now testing out the latest version and figure out several bugs. I have worked out fixes anyway, but need somebody to work out the pull request and review. I will attach all my findings and fixes here. If anybody have something that would like me to work on, please post here and I will give it a try.
Can mwm help to create pull request for me?
Can others help to review my changes? I will state clearly what the problem is and why I make these changes.
Can mwm help to create pull request for me?
Can others help to review my changes? I will state clearly what the problem is and why I make these changes.
Please Log in or Create an account to join the conversation.
- richardclli
- Topic Author
- Offline
Less
More
- Posts: 199
15 Oct 2015 03:02 #38828
by richardclli
Replied by richardclli on topic [Bug & Fix] Need help on pull request and review
BUG #1: Hard coded font problem (Issue #641)
When playing around with Lydros's Red Black theme, I figured that there are some fonts in the user interfaces are hard coded and not following the definition in config.ini
I changed 2 places where hard code fonts are used, so that the hardcoded fonts only change the alignment from the default font and inherit all the color settings of the default font. The fix is quite obvious and I think it is safe to commit.
src/pages/320/240x16/chantest_page.c
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -150,7 +150,14 @@
OFFSET_Y = ((LCD_HEIGHT - 240) / 2),
};
enum {X = 0, Y = 1};
- struct LabelDesc alignRight = { DEFAULT_FONT.font, 0, 0, DEFAULT_FONT.font_color, LABEL_RIGHT };
+ struct LabelDesc alignRight = {
+ .font = DEFAULT_FONT.font,
+ .style = LABEL_RIGHT,
+ .font_color = DEFAULT_FONT.font_color,
+ .fill_color = DEFAULT_FONT.fill_color,
+ .outline_color = DEFAULT_FONT.outline_color
+ };
+
const int label_pos[NUM_TX_BUTTONS][2] = CHANTEST_BUTTON_PLACEMENT;
cp->is_locked = 3;
GUI_CreateLabelBox(&gui->lock, OFFSET_X, 34, 320, 20, &NARROW_FONT, lockstr_cb, NULL, NULL);
src/pages/320x240x16/toggle_select.c
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -104,7 +104,14 @@
u8 toggleinput = MIXER_SRC(Model.pagecfg2.elem[tp->tglidx].src);
// style the switch textbox
- struct LabelDesc outline = { DEFAULT_FONT.font, 0, 0, DEFAULT_FONT.font_color, LABEL_TRANSPARENT };
+ struct LabelDesc outline = {
+ .font = DEFAULT_FONT.font,
+ .style = LABEL_TRANSPARENT,
+ .font_color = DEFAULT_FONT.font_color,
+ .fill_color = DEFAULT_FONT.fill_color,
+ .outline_color = DEFAULT_FONT.outline_color
+ };
+
GUI_CreateRect(&gui->toggleframe, 80+80*SelectedIcon, 39, 77, 33, &outline);
GUI_CreateLabelBox(&gui->switchbox, 4, 47, 70, 22, &NORMALBOX_FONT, NULL, NULL,
When playing around with Lydros's Red Black theme, I figured that there are some fonts in the user interfaces are hard coded and not following the definition in config.ini
I changed 2 places where hard code fonts are used, so that the hardcoded fonts only change the alignment from the default font and inherit all the color settings of the default font. The fix is quite obvious and I think it is safe to commit.
src/pages/320/240x16/chantest_page.c
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -150,7 +150,14 @@
OFFSET_Y = ((LCD_HEIGHT - 240) / 2),
};
enum {X = 0, Y = 1};
- struct LabelDesc alignRight = { DEFAULT_FONT.font, 0, 0, DEFAULT_FONT.font_color, LABEL_RIGHT };
+ struct LabelDesc alignRight = {
+ .font = DEFAULT_FONT.font,
+ .style = LABEL_RIGHT,
+ .font_color = DEFAULT_FONT.font_color,
+ .fill_color = DEFAULT_FONT.fill_color,
+ .outline_color = DEFAULT_FONT.outline_color
+ };
+
const int label_pos[NUM_TX_BUTTONS][2] = CHANTEST_BUTTON_PLACEMENT;
cp->is_locked = 3;
GUI_CreateLabelBox(&gui->lock, OFFSET_X, 34, 320, 20, &NARROW_FONT, lockstr_cb, NULL, NULL);
src/pages/320x240x16/toggle_select.c
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -104,7 +104,14 @@
u8 toggleinput = MIXER_SRC(Model.pagecfg2.elem[tp->tglidx].src);
// style the switch textbox
- struct LabelDesc outline = { DEFAULT_FONT.font, 0, 0, DEFAULT_FONT.font_color, LABEL_TRANSPARENT };
+ struct LabelDesc outline = {
+ .font = DEFAULT_FONT.font,
+ .style = LABEL_TRANSPARENT,
+ .font_color = DEFAULT_FONT.font_color,
+ .fill_color = DEFAULT_FONT.fill_color,
+ .outline_color = DEFAULT_FONT.outline_color
+ };
+
GUI_CreateRect(&gui->toggleframe, 80+80*SelectedIcon, 39, 77, 33, &outline);
GUI_CreateLabelBox(&gui->switchbox, 4, 47, 70, 22, &NORMALBOX_FONT, NULL, NULL,
Please Log in or Create an account to join the conversation.
- richardclli
- Topic Author
- Offline
Less
More
- Posts: 199
15 Oct 2015 04:59 #38831
by richardclli
Replied by richardclli on topic [Bug & Fix] Need help on pull request and review
BUG #2: RTC format error in Devo12, will display hour > 24, e.g. hour 13 display as 25 when using Time in "BigBox"
The fix is quite obvious that the transformation is unnecessary, removing the transformation will fix the problem.
src/rtc.c
@@ -253,11 +253,9 @@
// for big boxes only these will fit
void RTC_GetTimeFormattedBigbox(char *str, u32 time)
{
- unsigned am = ((time % DAYSEC) / 3600) < 12;
- unsigned hour = _RTC_GetHour(time);
- if (hour == 12) hour = 0;
- sprintf(str, "%2d:%02d:%02d", hour + (am ? 0 : 12), _RTC_GetMinute(time), _RTC_GetSecond(time));
+ sprintf(str, "%2d:%02d:%02d", _RTC_GetHour(time), _RTC_GetMinute(time), _RTC_GetSecond(time));
}
+
void RTC_GetDateFormattedBigbox(char *str, u32 date)
{
_RTC_SetDayStart(date);
The fix is quite obvious that the transformation is unnecessary, removing the transformation will fix the problem.
src/rtc.c
@@ -253,11 +253,9 @@
// for big boxes only these will fit
void RTC_GetTimeFormattedBigbox(char *str, u32 time)
{
- unsigned am = ((time % DAYSEC) / 3600) < 12;
- unsigned hour = _RTC_GetHour(time);
- if (hour == 12) hour = 0;
- sprintf(str, "%2d:%02d:%02d", hour + (am ? 0 : 12), _RTC_GetMinute(time), _RTC_GetSecond(time));
+ sprintf(str, "%2d:%02d:%02d", _RTC_GetHour(time), _RTC_GetMinute(time), _RTC_GetSecond(time));
}
+
void RTC_GetDateFormattedBigbox(char *str, u32 date)
{
_RTC_SetDayStart(date);
Please Log in or Create an account to join the conversation.
- Forum
- News, Announcements and Feedback
- Feedback & Questions
- [Bug & Fix] Need help on pull request and review
Time to create page: 0.028 seconds
- Home
- Forum
- News, Announcements and Feedback
- Feedback & Questions
- [Bug & Fix] Need help on pull request and review