Skip to content

Commit 9864b07

Browse files
authored
Merge pull request #5 from robbycandra/Devel-Translate_Comment_to_English
Translate code comment to english
2 parents bd05176 + d02548a commit 9864b07

File tree

3 files changed

+36
-35
lines changed

3 files changed

+36
-35
lines changed

TFT/src/User/API/Language/language_en.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
#define EN_PERCENTAGE_SPEED "Speed"
3939
#define EN_PERCENTAGE_FLOW "Flow"
4040
#define EN_VALUE_ZERO "Zero"
41-
#define EN_1_DEGREE "1¡æ"
42-
#define EN_5_DEGREE "5¡æ"
43-
#define EN_10_DEGREE "10¡æ"
41+
#define EN_1_DEGREE "1°"
42+
#define EN_5_DEGREE "5°"
43+
#define EN_10_DEGREE "10°"
4444
#define EN_X_INC "X+"
4545
#define EN_Y_INC "Y+"
4646
#define EN_Z_INC "Z+"

TFT/src/User/Menu/Heat.c

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "heat.h"
22
#include "includes.h"
33

4-
//1个title(标题), ITEM_PER_PAGE个item(图标+标签)
4+
//1 title, ITEM_PER_PAGE items (icon+label)
55
MENUITEMS heatItems = {
66
// title
77
LABEL_HEAT,
@@ -49,37 +49,37 @@ static u32 update_time = 300;
4949
static bool update_waiting = false;
5050
static bool send_waiting[HEATER_NUM];
5151

52-
/*设置目标温度*/
52+
/*Set target temperature*/
5353
void heatSetTargetTemp(TOOL tool,u16 temp)
5454
{
5555
heater.T[tool].target = temp;
5656
}
5757

58-
/*获取目标的温度*/
58+
/*Get target temperature */
5959
u16 heatGetTargetTemp(TOOL tool)
6060
{
6161
return heater.T[tool].target;
6262
}
6363

64-
/* 设置当前的温度 */
64+
/* Set current temperature */
6565
void heatSetCurrentTemp(TOOL tool, s16 temp)
6666
{
6767
heater.T[tool].current = limitValue(-99, temp, 999);
6868
}
6969

70-
/* 获取当前的温度 */
70+
/* Get current temperature */
7171
s16 heatGetCurrentTemp(TOOL tool)
7272
{
7373
return heater.T[tool].current;
7474
}
7575

76-
/* 是否等待加热器升温 */
76+
/* Is heating waiting to heat up */
7777
bool heatGetIsWaiting(TOOL tool)
7878
{
7979
return heater.T[tool].waiting;
8080
}
8181

82-
/* 查询是否有需要等待的加热器 */
82+
/* Check all heater if there is a heater waiting to be waited */
8383
bool heatHasWaiting(void)
8484
{
8585
TOOL i;
@@ -91,7 +91,7 @@ bool heatHasWaiting(void)
9191
return false;
9292
}
9393

94-
/* 设置是否等待加热器升温 */
94+
/* Set heater waiting status */
9595
void heatSetIsWaiting(TOOL tool, bool isWaiting)
9696
{
9797
heater.T[tool].waiting = isWaiting;
@@ -114,43 +114,44 @@ void heatClearIsWaiting(void)
114114
update_time = 300;
115115
}
116116

117-
/* 设置当前是喷头还是热床 */
117+
/* Set current heater tool, nozzle or hot bed */
118118
void heatSetCurrentTool(TOOL tool)
119119
{
120120
if(tool >= HEATER_NUM) return;
121121
heater.tool = tool;
122122
}
123-
/* 获取当前是喷头还是热床 */
123+
/* Get current tool, nozzle or hot bed */
124124
TOOL heatGetCurrentTool(void)
125125
{
126126
return heater.tool;
127127
}
128128

129-
/* 设置当前是哪个喷头*/
129+
/* Set current nozzle */
130130
void heatSetCurrentToolNozzle(TOOL tool)
131131
{
132132
if(tool >= HEATER_NUM && tool < NOZZLE0) return;
133133
heater.nozzle = tool;
134134
heater.tool = tool;
135135
}
136-
/* 获取当前是那个喷头*/
136+
/* Get current nozzle*/
137137
TOOL heatGetCurrentToolNozzle(void)
138138
{
139139
return heater.nozzle;
140140
}
141141

142-
/* 设置查询温度的时间间隔 */
142+
/* Set temperature update time interval */
143143
void heatSetUpdateTime(u32 time)
144144
{
145145
update_time=time;
146146
}
147-
/* 设置当前是否需要查询温度 */
147+
148+
/* Set whether we need to query the current temperature */
148149
void heatSetUpdateWaiting(bool isWaiting)
149150
{
150151
update_waiting = isWaiting;
151152
}
152153

153-
/* 设置是否已经发送加热命令 */
154+
/* Set whether the heating command has been sent */
154155
void heatSetSendWaiting(TOOL tool, bool isWaiting)
155156
{
156157
send_waiting[tool] = isWaiting;
@@ -279,7 +280,7 @@ void loopCheckHeater(void)
279280
static u32 nowTime=0;
280281

281282
do
282-
{ /* 定时发送M105查询温度 */
283+
{ /* Send M105 query temperature continuously */
283284
if(update_waiting == true) {nowTime=OS_GetTime();break;}
284285
if(OS_GetTime()<nowTime+update_time) break;
285286

@@ -289,7 +290,7 @@ void loopCheckHeater(void)
289290
update_waiting=true;
290291
}while(0);
291292

292-
/* 查询需要等待温度上升的加热器,是否达到设定温度 */
293+
/* Query the heater that needs to wait for the temperature to rise, whether it reaches the set temperature */
293294
for(i=0; i<HEATER_NUM; i++)
294295
{
295296
if (heater.T[i].waiting == false) continue;

TFT/src/User/Menu/menu.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "menu.h"
22
#include "includes.h"
33

4+
// exhibitRect is 2 ICON Space in the Upper Row and 2 Center Coloum.
45
const GUI_RECT exhibitRect = {
56
1*ICON_WIDTH+1*SPACE_X+START_X, 0*ICON_HEIGHT+0*SPACE_Y+TITLE_END_Y, 3*ICON_WIDTH+2*SPACE_X+START_X, 1*ICON_HEIGHT+0*SPACE_Y+TITLE_END_Y
67
};
@@ -121,7 +122,7 @@ void loopReminderClear(void)
121122
return;
122123
}
123124

124-
/* 清除警告信息 */
125+
/* Clear warning message */
125126
reminder.status = STATUS_IDLE;
126127
if(curMenuItems == NULL)
127128
return;
@@ -139,7 +140,7 @@ void loopVolumeReminderClear(void)
139140
return;
140141
}
141142

142-
/* 清除警告信息 */
143+
/* Clear warning message */
143144
volumeReminder.status = STATUS_IDLE;
144145
if(curMenuItems == NULL)
145146
return;
@@ -181,61 +182,60 @@ void menuDrawTitle(const MENUITEMS * menuItems)
181182
GUI_SetColor(WHITE);
182183
}
183184

184-
//绘制整个界面
185+
//Draw the entire interface
185186
void menuDrawPage(const MENUITEMS * menuItems)
186187
{
187188
u8 i=0;
188189
curMenuItems = menuItems;
189190
TSC_ReDrawIcon = itemDrawIconPress;
190191
// GUI_Clear(BLACK);
191-
menuClearGaps(); //使用此函数而不是 GUI_Clear 是为了消除清屏时的闪屏现象
192+
menuClearGaps(); //Use this function instead of GUI_Clear to eliminate the splash screen when clearing the screen.
192193
menuDrawTitle(menuItems);
193194
for(i=0; i<ITEM_PER_PAGE; i++)
194195
{
195196
menuDrawItem(&menuItems->items[i], i);
196197
}
197198
}
198199

199-
//有按键值时,图标变色,并重绘
200+
//When there is a button value, the icon changes color and redraws
200201
void itemDrawIconPress(u8 positon, u8 is_press)
201202
{
202203
if(curMenuItems == NULL) return;
203204
if(positon > KEY_ICON_7) return;
204205
if(curMenuItems->items[positon].icon == ICON_BACKGROUND) return;
205206

206207
const GUI_RECT *rect = rect_of_key + positon;
207-
if(is_press) //按下时变绿
208+
if(is_press) //Turn green when pressed
208209
ICON_PressedDisplay(rect->x0, rect->y0, curMenuItems->items[positon].icon);
209-
else //松开时重绘正常图标
210+
else //Redraw normal icon when released
210211
ICON_ReadDisplay(rect->x0, rect->y0, curMenuItems->items[positon].icon);
211212
}
212213

213-
214-
//获取按键值
214+
//Get button value
215215
KEY_VALUES menuKeyGetValue(void)
216216
{
217217
return(KEY_VALUES)KEY_GetValue(sizeof(rect_of_key)/sizeof(rect_of_key[0]), rect_of_key);
218218
}
219219

220220

221-
void loopProcess (void)
221+
void loopProcess(void)
222222
{
223-
getGcodeFromFile(); //从待打印的文件中解析出Gcode命令
223+
getGcodeFromFile(); //Parse the Gcode command from the file to be printed
224224

225225
// parseQueueCmd();
226-
sendQueueCmd(); //处理并发送队列中的Gcode命令
226+
sendQueueCmd(); //Process and send Gcode commands in the queue
227227

228-
parseACK(); //解析接收的从机应答信息
228+
parseACK(); //Parsing the received slave response information
229229

230-
loopCheckHeater(); //温度相关的设置
230+
loopCheckHeater(); //Temperature related settings
231231

232232
loopVolumeSource(); //Check if volume source(SD/U disk) insert
233233

234234
#if defined ONBOARD_SD_SUPPORT && !defined M27_AUTOREPORT
235235
loopCheckPrinting(); //Check if there is a SD or USB print running.
236236
#endif
237237

238-
loopReminderClear(); //若状态栏有提示信息,定时清除
238+
loopReminderClear(); //If there is a message in the status bar, timed clear
239239

240240
loopVolumeReminderClear();
241241

0 commit comments

Comments
 (0)