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

Fix compile error due to undefined references in move.c, Fix Custom gcode not working in List Mode, disable global info from showing on Status Screen and Move menu #279

Merged
merged 11 commits into from
Jan 7, 2020
Merged
7 changes: 6 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: '[BUG] (short description)'
labels: ''
labels: 'BUG'
guruathwal marked this conversation as resolved.
Show resolved Hide resolved
assignees: ''

---
Expand All @@ -25,6 +25,11 @@ Do you want to ask a question? Are you looking for support? Please don't post he
**Actual behavior**
<!-- What actually happens -->

### Hardware Variant
<!-- which TFT controller did you used?-->
### TFT Firmware Version & Main Board Firmware details
<!-- current TFT Firmware version number & Marlin firmware version number -->

### Additional Information
* Include a ZIP file containing your `Configuration.h` or use [Pastebin](https://pastebin.com/) and paste a link in this issue.
* Provide pictures or links to videos that clearly demonstrate the issue.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: '[FR] (feature request title)'
labels: ''
labels: 'enhancement'
assignees: ''

---
Expand Down
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Ask a question
about: Ask a question or request details
title: '[Q] (Your Question?)'
labels: 'question'
assignees: ''

---

**Your question or details you need. Please describe.**
A clear and concise question or detail you would like to ask. Like Hardware related or firmware related.

**specify the device variant related to your question.**

**Additional context**
Add any other context or screenshots about the question here.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions TFT/src/User/API/UI/ui_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ void ICON_ReadDisplay(u16 sx,u16 sy, u8 icon)
lcd_frame_display(sx, sy, ICON_WIDTH, ICON_HEIGHT, ICON_ADDR(icon));
}

//draw icon with different length and width (sx & sy cordinates for top left of icon, w width, h height, addr flash byte address)
void ICON_CustomReadDisplay(u16 sx,u16 sy,u16 w, u16 h, u32 addr)
{
lcd_frame_display(sx, sy, w, h, addr);
}

void SMALLICON_ReadDisplay(u16 sx,u16 sy, u8 icon)
{
lcd_frame_display(sx, sy, SMALLICON_WIDTH, SMALLICON_HEIGHT, SMALL_ICON_ADDR(icon));
Expand Down
1 change: 1 addition & 0 deletions TFT/src/User/API/UI/ui_draw.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ void LCD_DMA_Config(void);

void LOGO_ReadDisplay(void);
void ICON_ReadDisplay(uint16_t sx, uint16_t sy, uint8_t icon);
void ICON_CustomReadDisplay(u16 sx,u16 sy,u16 w, u16 h, u32 addr);
void ICON_PressedDisplay(uint16_t sx, uint16_t sy, uint8_t icon);

#endif
Expand Down
5 changes: 5 additions & 0 deletions TFT/src/User/API/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ void updateIcon(void)
{
LOGO_ReadDisplay();
}

GUI_Clear(BACKGROUND_COLOR);
for(int i=0; i<COUNT(iconBmpName); i++)
{
Expand All @@ -135,6 +136,10 @@ void updateIcon(void)
ICON_ReadDisplay(iconUpdateRect.x0, iconUpdateRect.y0, i);
}
}
if(bmpDecode(BMP_ROOT_DIR"/InfoBox.bmp", INFOBOX_ADDR))
{
ICON_CustomReadDisplay(iconUpdateRect.x0, iconUpdateRect.y0, INFOBOX_WIDTH, INFOBOX_HEIGHT,INFOBOX_ADDR);
}
}

void updateFont(char *font, u32 addr)
Expand Down
14 changes: 8 additions & 6 deletions TFT/src/User/API/boot.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
#define BYTE_ASCII_ADDR 0x700000 // ascii (+0x1000 4K)
//#define BYTE_RESERVE_ADDR 0x710000

#define SMALL_ICON_START_ADDR ICON_ADDR(ICON_PREVIEW+1)
#define SMALL_ICON_ADDR(num) ((num)*0x1000+SMALL_ICON_START_ADDR)
#define INFOBOX_ADDR (BYTE_ASCII_ADDR + 0x1000) // total byte size 0xA7F8
#define SMALL_ICON_START_ADDR (INFOBOX_ADDR+0xA7F8)
#define SMALL_ICON_ADDR(num) ((num)*0x1000+SMALL_ICON_START_ADDR)

#define BMP (1<<1)
#define FONT (1<<2)
Expand Down Expand Up @@ -141,13 +142,14 @@ enum
ICON_GLOBAL_NOZZLE0,
ICON_GLOBAL_BED,
ICON_LEDCOLOR,


//add new icons above this line only
// ICON_RESERVE
// Back ground sign
ICON_BACKGROUND,

// Preview should be in the last place
// Preview should be in the last place before ICON_BACKGROUND to save flash storage space
ICON_PREVIEW,
// Back ground sign
ICON_BACKGROUND
};

typedef union
Expand Down
12 changes: 6 additions & 6 deletions TFT/src/User/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,12 @@
*/
#define CUSTOM_0_LABEL "Restore EEPROM"
#define CUSTOM_0_GCODE "M501\n"
//#define CUSTOM_1_LABEL "Custom2"
//#define CUSTOM_1_GCODE "M105\n"
//#define CUSTOM_2_LABEL "Custom2"
//#define CUSTOM_2_GCODE "M105\n"
//#define CUSTOM_3_LABEL "Custom3"
//#define CUSTOM_3_GCODE "M105\n"
#define CUSTOM_1_LABEL "Disable Steppers"
#define CUSTOM_1_GCODE "M84\n"
#define CUSTOM_2_LABEL "init SD Card"
#define CUSTOM_2_GCODE "M21\n"
#define CUSTOM_3_LABEL "Release Sd Card"
#define CUSTOM_3_GCODE "M22\n"
//#define CUSTOM_4_LABEL "Custom4"
//#define CUSTOM_4_GCODE "M105\n"
//#define CUSTOM_5_LABEL "Custom5"
Expand Down
1 change: 0 additions & 1 deletion TFT/src/User/Menu/MachineSettings.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ void menuCustom(void)
void sendCustomGcode(uint32_t key_val)
{
uint32_t item_index = gc_cur_page*LISTITEM_PER_PAGE+ key_val;
storeCmd("%d",item_index);
if (item_index < CKEY_COUNT){
storeCmd(gcodelist[item_index][1]);
}
Expand Down
Loading