Browse Source

Merge pull request #265 from setar/Marlin_v1

Added Russian translation
ErikZalm 12 years ago
parent
commit
9f089756b7
5 changed files with 696 additions and 2 deletions
  1. 389
    0
      Marlin/LiquidCrystalRus.cpp
  2. 129
    0
      Marlin/LiquidCrystalRus.h
  3. 160
    1
      Marlin/language.h
  4. 10
    1
      Marlin/ultralcd.h
  5. 8
    0
      Marlin/ultralcd.pde

+ 389
- 0
Marlin/LiquidCrystalRus.cpp View File

@@ -0,0 +1,389 @@
1
+#include "LiquidCrystalRus.h"
2
+
3
+#include <stdio.h>
4
+#include <string.h>
5
+#include <inttypes.h>
6
+#include <avr/pgmspace.h>
7
+
8
+#if defined(ARDUINO) && ARDUINO >= 100
9
+  #include "Arduino.h"
10
+#else
11
+  #include "WProgram.h"
12
+#endif
13
+
14
+// it is a russian alphabet translation
15
+// except 0401 --> 0xa2 = ╗, 0451 --> 0xb5
16
+PROGMEM prog_uchar utf_recode[] = 
17
+       { 0x41,0xa0,0x42,0xa1,0xe0,0x45,0xa3,0xa4,0xa5,0xa6,0x4b,0xa7,0x4d,0x48,0x4f,
18
+         0xa8,0x50,0x43,0x54,0xa9,0xaa,0x58,0xe1,0xab,0xac,0xe2,0xad,0xae,0x62,0xaf,0xb0,0xb1,
19
+         0x61,0xb2,0xb3,0xb4,0xe3,0x65,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0x6f,
20
+         0xbe,0x70,0x63,0xbf,0x79,0xe4,0x78,0xe5,0xc0,0xc1,0xe6,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7
21
+        };     
22
+
23
+// When the display powers up, it is configured as follows:
24
+//
25
+// 1. Display clear
26
+// 2. Function set: 
27
+//    DL = 1; 8-bit interface data 
28
+//    N = 0; 1-line display 
29
+//    F = 0; 5x8 dot character font 
30
+// 3. Display on/off control: 
31
+//    D = 0; Display off 
32
+//    C = 0; Cursor off 
33
+//    B = 0; Blinking off 
34
+// 4. Entry mode set: 
35
+//    I/D = 1; Increment by 1 
36
+//    S = 0; No shift 
37
+//
38
+// Note, however, that resetting the Arduino doesn't reset the LCD, so we
39
+// can't assume that its in that state when a sketch starts (and the
40
+// LiquidCrystal constructor is called).
41
+// 
42
+// modified 27 Jul 2011
43
+// by Ilya V. Danilov http://mk90.ru/
44
+
45
+
46
+LiquidCrystalRus::LiquidCrystalRus(uint8_t rs, uint8_t rw, uint8_t enable,
47
+			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
48
+			     uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
49
+{
50
+  init(0, rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
51
+}
52
+
53
+LiquidCrystalRus::LiquidCrystalRus(uint8_t rs, uint8_t enable,
54
+			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
55
+			     uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
56
+{
57
+  init(0, rs, 255, enable, d0, d1, d2, d3, d4, d5, d6, d7);
58
+}
59
+
60
+LiquidCrystalRus::LiquidCrystalRus(uint8_t rs, uint8_t rw, uint8_t enable,
61
+			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
62
+{
63
+  init(1, rs, rw, enable, d0, d1, d2, d3, 0, 0, 0, 0);
64
+}
65
+
66
+LiquidCrystalRus::LiquidCrystalRus(uint8_t rs,  uint8_t enable,
67
+			     uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
68
+{
69
+  init(1, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);
70
+}
71
+
72
+void LiquidCrystalRus::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
73
+			 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
74
+			 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
75
+{
76
+  _rs_pin = rs;
77
+  _rw_pin = rw;
78
+  _enable_pin = enable;
79
+  
80
+  _data_pins[0] = d0;
81
+  _data_pins[1] = d1;
82
+  _data_pins[2] = d2;
83
+  _data_pins[3] = d3; 
84
+  _data_pins[4] = d4;
85
+  _data_pins[5] = d5;
86
+  _data_pins[6] = d6;
87
+  _data_pins[7] = d7; 
88
+
89
+  pinMode(_rs_pin, OUTPUT);
90
+  // we can save 1 pin by not using RW. Indicate by passing 255 instead of pin#
91
+  if (_rw_pin != 255) { 
92
+    pinMode(_rw_pin, OUTPUT);
93
+  }
94
+  pinMode(_enable_pin, OUTPUT);
95
+  
96
+  if (fourbitmode)
97
+    _displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
98
+  else 
99
+    _displayfunction = LCD_8BITMODE | LCD_1LINE | LCD_5x8DOTS;
100
+  
101
+  begin(16, 1);  
102
+}
103
+
104
+void LiquidCrystalRus::begin(uint8_t cols, uint8_t lines, uint8_t dotsize) {
105
+  if (lines > 1) {
106
+    _displayfunction |= LCD_2LINE;
107
+  }
108
+  _numlines = lines;
109
+  _currline = 0;
110
+
111
+  // for some 1 line displays you can select a 10 pixel high font
112
+  if ((dotsize != 0) && (lines == 1)) {
113
+    _displayfunction |= LCD_5x10DOTS;
114
+  }
115
+
116
+  // SEE PAGE 45/46 FOR INITIALIZATION SPECIFICATION!
117
+  // according to datasheet, we need at least 40ms after power rises above 2.7V
118
+  // before sending commands. Arduino can turn on way befer 4.5V so we'll wait 50
119
+  delayMicroseconds(50000); 
120
+  // Now we pull both RS and R/W low to begin commands
121
+  digitalWrite(_rs_pin, LOW);
122
+  digitalWrite(_enable_pin, LOW);
123
+  if (_rw_pin != 255) { 
124
+    digitalWrite(_rw_pin, LOW);
125
+  }
126
+  
127
+  //put the LCD into 4 bit or 8 bit mode
128
+  if (! (_displayfunction & LCD_8BITMODE)) {
129
+    // this is according to the hitachi HD44780 datasheet
130
+    // figure 24, pg 46
131
+
132
+    // we start in 8bit mode, try to set 4 bit mode
133
+    writeNbits(0x03,4);
134
+    delayMicroseconds(4500); // wait min 4.1ms
135
+
136
+    // second try
137
+    writeNbits(0x03,4);
138
+    delayMicroseconds(4500); // wait min 4.1ms
139
+    
140
+    // third go!
141
+    writeNbits(0x03,4); 
142
+    delayMicroseconds(150);
143
+
144
+    // finally, set to 8-bit interface
145
+    writeNbits(0x02,4); 
146
+  } else {
147
+    // this is according to the hitachi HD44780 datasheet
148
+    // page 45 figure 23
149
+
150
+    // Send function set command sequence
151
+    command(LCD_FUNCTIONSET | _displayfunction);
152
+    delayMicroseconds(4500);  // wait more than 4.1ms
153
+
154
+    // second try
155
+    command(LCD_FUNCTIONSET | _displayfunction);
156
+    delayMicroseconds(150);
157
+
158
+    // third go
159
+    command(LCD_FUNCTIONSET | _displayfunction);
160
+  }
161
+
162
+  // finally, set # lines, font size, etc.
163
+  command(LCD_FUNCTIONSET | _displayfunction);  
164
+
165
+  // turn the display on with no cursor or blinking default
166
+  _displaycontrol = LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF;  
167
+  display();
168
+
169
+  // clear it off
170
+  clear();
171
+
172
+  // Initialize to default text direction (for romance languages)
173
+  _displaymode = LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT;
174
+  // set the entry mode
175
+  command(LCD_ENTRYMODESET | _displaymode);
176
+
177
+}
178
+
179
+void LiquidCrystalRus::setDRAMModel(uint8_t model) {
180
+  _dram_model = model;
181
+}
182
+
183
+/********** high level commands, for the user! */
184
+void LiquidCrystalRus::clear()
185
+{
186
+  command(LCD_CLEARDISPLAY);  // clear display, set cursor position to zero
187
+  delayMicroseconds(2000);  // this command takes a long time!
188
+}
189
+
190
+void LiquidCrystalRus::home()
191
+{
192
+  command(LCD_RETURNHOME);  // set cursor position to zero
193
+  delayMicroseconds(2000);  // this command takes a long time!
194
+}
195
+
196
+void LiquidCrystalRus::setCursor(uint8_t col, uint8_t row)
197
+{
198
+  int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };
199
+  if ( row >= _numlines ) {
200
+    row = _numlines-1;    // we count rows starting w/0
201
+  }
202
+  
203
+  command(LCD_SETDDRAMADDR | (col + row_offsets[row]));
204
+}
205
+
206
+// Turn the display on/off (quickly)
207
+void LiquidCrystalRus::noDisplay() {
208
+  _displaycontrol &= ~LCD_DISPLAYON;
209
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
210
+}
211
+void LiquidCrystalRus::display() {
212
+  _displaycontrol |= LCD_DISPLAYON;
213
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
214
+}
215
+
216
+// Turns the underline cursor on/off
217
+void LiquidCrystalRus::noCursor() {
218
+  _displaycontrol &= ~LCD_CURSORON;
219
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
220
+}
221
+void LiquidCrystalRus::cursor() {
222
+  _displaycontrol |= LCD_CURSORON;
223
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
224
+}
225
+
226
+// Turn on and off the blinking cursor
227
+void LiquidCrystalRus::noBlink() {
228
+  _displaycontrol &= ~LCD_BLINKON;
229
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
230
+}
231
+void LiquidCrystalRus::blink() {
232
+  _displaycontrol |= LCD_BLINKON;
233
+  command(LCD_DISPLAYCONTROL | _displaycontrol);
234
+}
235
+
236
+// These commands scroll the display without changing the RAM
237
+void LiquidCrystalRus::scrollDisplayLeft(void) {
238
+  command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVELEFT);
239
+}
240
+void LiquidCrystalRus::scrollDisplayRight(void) {
241
+  command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVERIGHT);
242
+}
243
+
244
+// This is for text that flows Left to Right
245
+void LiquidCrystalRus::leftToRight(void) {
246
+  _displaymode |= LCD_ENTRYLEFT;
247
+  command(LCD_ENTRYMODESET | _displaymode);
248
+}
249
+
250
+// This is for text that flows Right to Left
251
+void LiquidCrystalRus::rightToLeft(void) {
252
+  _displaymode &= ~LCD_ENTRYLEFT;
253
+  command(LCD_ENTRYMODESET | _displaymode);
254
+}
255
+
256
+// This will 'right justify' text from the cursor
257
+void LiquidCrystalRus::autoscroll(void) {
258
+  _displaymode |= LCD_ENTRYSHIFTINCREMENT;
259
+  command(LCD_ENTRYMODESET | _displaymode);
260
+}
261
+
262
+// This will 'left justify' text from the cursor
263
+void LiquidCrystalRus::noAutoscroll(void) {
264
+  _displaymode &= ~LCD_ENTRYSHIFTINCREMENT;
265
+  command(LCD_ENTRYMODESET | _displaymode);
266
+}
267
+
268
+// Allows us to fill the first 8 CGRAM locations
269
+// with custom characters
270
+void LiquidCrystalRus::createChar(uint8_t location, uint8_t charmap[]) {
271
+  location &= 0x7; // we only have 8 locations 0-7
272
+  command(LCD_SETCGRAMADDR | (location << 3));
273
+  for (int i=0; i<8; i++) {
274
+    write(charmap[i]);
275
+  }
276
+}
277
+
278
+/*********** mid level commands, for sending data/cmds */
279
+
280
+inline void LiquidCrystalRus::command(uint8_t value) {
281
+  send(value, LOW);
282
+}
283
+
284
+#if defined(ARDUINO) && ARDUINO >= 100
285
+  size_t LiquidCrystalRus::write(uint8_t value)
286
+#else
287
+  void   LiquidCrystalRus::write(uint8_t value)
288
+#endif
289
+{
290
+  uint8_t out_char=value;
291
+
292
+  if (_dram_model == LCD_DRAM_WH1601) {  
293
+    uint8_t ac=recv(LOW) & 0x7f;
294
+    if (ac>7 && ac<0x14) command(LCD_SETDDRAMADDR | (0x40+ac-8));
295
+  }
296
+
297
+  if (value>=0x80) { // UTF-8 handling
298
+    if (value >= 0xc0) {
299
+      utf_hi_char = value - 0xd0;
300
+    } else {
301
+      value &= 0x3f;
302
+      if (!utf_hi_char && (value == 1)) 
303
+        send(0xa2,HIGH); // ╗
304
+      else if ((utf_hi_char == 1) && (value == 0x11)) 
305
+        send(0xb5,HIGH); // ╦
306
+      else 
307
+        send(pgm_read_byte_near(utf_recode + value + (utf_hi_char<<6) - 0x10), HIGH);
308
+    }    
309
+  } else send(out_char, HIGH);
310
+#if defined(ARDUINO) && ARDUINO >= 100
311
+  return 1; // assume sucess 
312
+#endif
313
+}
314
+
315
+/************ low level data pushing commands **********/
316
+
317
+// write either command or data, with automatic 4/8-bit selection
318
+void LiquidCrystalRus::send(uint8_t value, uint8_t mode) {
319
+  digitalWrite(_rs_pin, mode);
320
+
321
+  // if there is a RW pin indicated, set it low to Write
322
+  if (_rw_pin != 255) { 
323
+    digitalWrite(_rw_pin, LOW);
324
+  }
325
+  
326
+  if (_displayfunction & LCD_8BITMODE) {
327
+    writeNbits(value,8); 
328
+  } else {
329
+    writeNbits(value>>4,4);
330
+    writeNbits(value,4);
331
+  }
332
+}
333
+
334
+// read  data, with automatic 4/8-bit selection
335
+uint8_t LiquidCrystalRus::recv(uint8_t mode) {
336
+  uint8_t retval;
337
+  digitalWrite(_rs_pin, mode);
338
+
339
+  // if there is a RW pin indicated, set it low to Write
340
+  if (_rw_pin != 255) { 
341
+    digitalWrite(_rw_pin, HIGH);
342
+  }
343
+  
344
+  if (_displayfunction & LCD_8BITMODE) {
345
+    retval = readNbits(8); 
346
+  } else {
347
+    retval = readNbits(4) << 4;
348
+    retval |= readNbits(4);
349
+  }
350
+  return retval;
351
+}
352
+void LiquidCrystalRus::pulseEnable() {
353
+  digitalWrite(_enable_pin, LOW);
354
+  delayMicroseconds(1);    
355
+  digitalWrite(_enable_pin, HIGH);
356
+  delayMicroseconds(1);    // enable pulse must be >450ns
357
+  digitalWrite(_enable_pin, LOW);
358
+  delayMicroseconds(100);   // commands need > 37us to settle
359
+}
360
+
361
+void LiquidCrystalRus::writeNbits(uint8_t value, uint8_t n) {
362
+  for (int i = 0; i < n; i++) {
363
+    pinMode(_data_pins[i], OUTPUT);
364
+    digitalWrite(_data_pins[i], (value >> i) & 0x01);
365
+  }
366
+
367
+  pulseEnable();
368
+}
369
+
370
+uint8_t LiquidCrystalRus::readNbits(uint8_t n) {
371
+  uint8_t retval=0;
372
+  for (int i = 0; i < n; i++) {
373
+    pinMode(_data_pins[i], INPUT);
374
+  }
375
+
376
+  digitalWrite(_enable_pin, LOW);
377
+  delayMicroseconds(1);    
378
+  digitalWrite(_enable_pin, HIGH);
379
+  delayMicroseconds(1);    // enable pulse must be >450ns
380
+  
381
+  for (int i = 0; i < n; i++) {
382
+    retval |= (digitalRead(_data_pins[i]) == HIGH)?(1 << i):0;
383
+  }
384
+
385
+  digitalWrite(_enable_pin, LOW);
386
+
387
+  return retval;
388
+}
389
+

+ 129
- 0
Marlin/LiquidCrystalRus.h View File

@@ -0,0 +1,129 @@
1
+//
2
+// based on LiquidCrystal library from ArduinoIDE, see http://arduino.cc
3
+//  modified 27 Jul 2011
4
+// by Ilya V. Danilov http://mk90.ru/
5
+// 
6
+
7
+#ifndef LiquidCrystalRus_h
8
+#define LiquidCrystalRus_h
9
+
10
+#include <inttypes.h>
11
+#include "Print.h"
12
+
13
+// commands
14
+#define LCD_CLEARDISPLAY 0x01
15
+#define LCD_RETURNHOME 0x02
16
+#define LCD_ENTRYMODESET 0x04
17
+#define LCD_DISPLAYCONTROL 0x08
18
+#define LCD_CURSORSHIFT 0x10
19
+#define LCD_FUNCTIONSET 0x20
20
+#define LCD_SETCGRAMADDR 0x40
21
+#define LCD_SETDDRAMADDR 0x80
22
+
23
+// flags for display entry mode
24
+#define LCD_ENTRYRIGHT 0x00
25
+#define LCD_ENTRYLEFT 0x02
26
+#define LCD_ENTRYSHIFTINCREMENT 0x01
27
+#define LCD_ENTRYSHIFTDECREMENT 0x00
28
+
29
+// flags for display on/off control
30
+#define LCD_DISPLAYON 0x04
31
+#define LCD_DISPLAYOFF 0x00
32
+#define LCD_CURSORON 0x02
33
+#define LCD_CURSOROFF 0x00
34
+#define LCD_BLINKON 0x01
35
+#define LCD_BLINKOFF 0x00
36
+
37
+// flags for display/cursor shift
38
+#define LCD_DISPLAYMOVE 0x08
39
+#define LCD_CURSORMOVE 0x00
40
+#define LCD_MOVERIGHT 0x04
41
+#define LCD_MOVELEFT 0x00
42
+
43
+// flags for function set
44
+#define LCD_8BITMODE 0x10
45
+#define LCD_4BITMODE 0x00
46
+#define LCD_2LINE 0x08
47
+#define LCD_1LINE 0x00
48
+#define LCD_5x10DOTS 0x04
49
+#define LCD_5x8DOTS 0x00
50
+
51
+// enum for 
52
+#define LCD_DRAM_Normal 0x00
53
+#define LCD_DRAM_WH1601 0x01
54
+
55
+
56
+class LiquidCrystalRus : public Print {
57
+public:
58
+  LiquidCrystalRus(uint8_t rs, uint8_t enable,
59
+		uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
60
+		uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
61
+  LiquidCrystalRus(uint8_t rs, uint8_t rw, uint8_t enable,
62
+		uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
63
+		uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
64
+  LiquidCrystalRus(uint8_t rs, uint8_t rw, uint8_t enable,
65
+		uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
66
+  LiquidCrystalRus(uint8_t rs, uint8_t enable,
67
+		uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
68
+
69
+  void init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
70
+	    uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
71
+	    uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
72
+    
73
+  void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS);
74
+
75
+  void clear();
76
+  void home();
77
+
78
+  void noDisplay();
79
+  void display();
80
+  void noBlink();
81
+  void blink();
82
+  void noCursor();
83
+  void cursor();
84
+  void scrollDisplayLeft();
85
+  void scrollDisplayRight();
86
+  void leftToRight();
87
+  void rightToLeft();
88
+  void autoscroll();
89
+  void noAutoscroll();
90
+
91
+  void createChar(uint8_t, uint8_t[]);
92
+  void setCursor(uint8_t, uint8_t);
93
+ 
94
+#if defined(ARDUINO) && ARDUINO >= 100
95
+  virtual size_t write(uint8_t);
96
+  using Print::write;
97
+#else
98
+  virtual void write(uint8_t);
99
+#endif
100
+
101
+  void command(uint8_t);
102
+
103
+  void setDRAMModel(uint8_t);
104
+
105
+private:
106
+  void send(uint8_t, uint8_t);
107
+  void writeNbits(uint8_t, uint8_t);
108
+  uint8_t recv(uint8_t);
109
+  uint8_t readNbits(uint8_t); 
110
+  void pulseEnable();
111
+
112
+  uint8_t _rs_pin; // LOW: command.  HIGH: character.
113
+  uint8_t _rw_pin; // LOW: write to LCD.  HIGH: read from LCD.
114
+  uint8_t _enable_pin; // activated by a HIGH pulse.
115
+  uint8_t _data_pins[8];
116
+
117
+  uint8_t _displayfunction;
118
+  uint8_t _displaycontrol;
119
+  uint8_t _displaymode;
120
+
121
+  uint8_t _initialized;
122
+
123
+  uint8_t _numlines,_currline;
124
+
125
+  uint8_t _dram_model;
126
+  uint8_t utf_hi_char; // UTF-8 high part
127
+};
128
+
129
+#endif

+ 160
- 1
Marlin/language.h View File

@@ -12,7 +12,8 @@
12 12
 // 3  French	(Waiting translation)
13 13
 // 4  German
14 14
 // 5  Spanish
15
-// 6  Etc
15
+// 6  Russian
16
+// 7  Etc
16 17
 
17 18
 #define LANGUAGE_CHOICE 1  // Pick your language from the list above
18 19
 
@@ -503,4 +504,162 @@
503 504
 #define MSG_ERR_LONG_EXTRUDE_STOP " extrusion demasiado larga evitada"
504 505
 
505 506
 #endif
507
+
508
+#if LANGUAGE_CHOICE == 6
509
+
510
+// LCD Menu Messages
511
+#define WELCOME_MSG MACHINE_NAME			" Готов."
512
+#define MSG_SD_INSERTED						"Карта вставлена"
513
+#define MSG_SD_REMOVED						"Карта извлечена"
514
+#define MSG_MAIN							" Меню              \003"
515
+#define MSG_AUTOSTART						" Автостарт          "
516
+#define MSG_DISABLE_STEPPERS				" Выключить двигатели"
517
+#define MSG_AUTO_HOME						" Парковка           "
518
+#define MSG_SET_ORIGIN						" Запомнить ноль     "
519
+#define MSG_PREHEAT_PLA						" Преднагрев PLA     "
520
+#define MSG_PREHEAT_PLA_SETTINGS			" Настр. преднагр.PLA"
521
+#define MSG_PREHEAT_ABS						" Преднагрев ABS     "
522
+#define MSG_PREHEAT_ABS_SETTINGS			" Настр. преднагр.ABS"
523
+#define MSG_COOLDOWN						" Охлаждение         "
524
+#define MSG_EXTRUDE							" Экструзия          "
525
+#define MSG_RETRACT							" Откат"
526
+#define MSG_MOVE_AXIS						" Движение по осям  \x7E"
527
+#define MSG_SPEED							" Скорость:"
528
+#define MSG_NOZZLE							" \002 Фильера:"
529
+#define MSG_NOZZLE1							" \002 Фильера2:"
530
+#define MSG_NOZZLE2							" \002 Фильера3:"
531
+#define MSG_BED								" \002 Кровать:"
532
+#define MSG_FAN_SPEED						" Куллер:"
533
+#define MSG_FLOW							" Поток:"
534
+#define MSG_CONTROL							" Настройки \003"
535
+#define MSG_MIN								" \002 Минимум:"
536
+#define MSG_MAX								" \002 Максимум:"
537
+#define MSG_FACTOR							" \002 Фактор:"
538
+#define MSG_AUTOTEMP						" Autotemp:"
539
+#define MSG_ON								"Вкл. "
540
+#define MSG_OFF								"Выкл. "
541
+#define MSG_PID_P							" PID-P: "
542
+#define MSG_PID_I							" PID-I: "
543
+#define MSG_PID_D							" PID-D: "
544
+#define MSG_PID_C							" PID-C: "
545
+#define MSG_ACC								" Acc:"
546
+#define MSG_VXY_JERK						" Vxy-jerk: "
547
+#define MSG_VMAX							" Vmax "
548
+#define MSG_X								"x:"
549
+#define MSG_Y								"y:"
550
+#define MSG_Z								"z:"
551
+#define MSG_E								"e:"
552
+#define MSG_VMIN							" Vmin:"
553
+#define MSG_VTRAV_MIN						" VTrav min:"
554
+#define MSG_AMAX							" Amax "
555
+#define MSG_A_RETRACT						" A-retract:"
556
+#define MSG_XSTEPS							" X шаг/mm:"
557
+#define MSG_YSTEPS							" Y шаг/mm:"
558
+#define MSG_ZSTEPS							" Z шаг/mm:"
559
+#define MSG_ESTEPS							" E шаг/mm:"
560
+#define MSG_MAIN_WIDE						" Меню              \003"
561
+#define MSG_RECTRACT_WIDE					" Откат подачи      \x7E"
562
+#define MSG_TEMPERATURE_WIDE				" Температура       \x7E"
563
+#define MSG_TEMPERATURE_RTN					" Температура       \003"
564
+#define MSG_MOTION_WIDE						" Скорости          \x7E"
565
+#define MSG_STORE_EPROM						" Сохранить настройки"
566
+#define MSG_LOAD_EPROM						" Загрузить настройки"
567
+#define MSG_RESTORE_FAILSAFE				" Сброс настроек     "
568
+#define MSG_REFRESH							"\004Обновить           "
569
+#define MSG_WATCH							" Обзор             \003"
570
+#define MSG_PREPARE							" Действия          \x7E"
571
+#define MSG_PREPARE_ALT						" Действия          \003"
572
+#define MSG_CONTROL_ARROW					" Настройки         \x7E"
573
+#define MSG_RETRACT_ARROW					" Настройки отката  \x7E"
574
+#define MSG_TUNE							" Tune              \x7E"
575
+#define MSG_PAUSE_PRINT						" Пауза печати      \x7E"
576
+#define MSG_RESUME_PRINT					" Продолжить печать \x7E"
577
+#define MSG_STOP_PRINT						" Остановить печать \x7E"
578
+#define MSG_CARD_MENU						" Меню карты        \x7E"
579
+#define MSG_NO_CARD							" Нет карты"
580
+#define MSG_DWELL							"Сон..."
581
+#define MSG_USERWAIT						"Нажмите для продолж."
582
+#define MSG_NO_MOVE							"Нет движения.       "
583
+#define MSG_PART_RELEASE					" Извлечение принта  "
584
+#define MSG_KILLED							"УБИТО. "
585
+#define MSG_STOPPED							"ОСТАНОВЛЕНО. "
586
+#define MSG_STEPPER_RELEASED				"Двигатели отключены."
587
+#define MSG_CONTROL_RETRACT					" Откат mm:"
588
+#define MSG_CONTROL_RETRACTF				" Откат  F:"
589
+#define MSG_CONTROL_RETRACT_ZLIFT			" Прыжок mm:"
590
+#define MSG_CONTROL_RETRACT_RECOVER			" Возврат +mm:"
591
+#define MSG_CONTROL_RETRACT_RECOVERF		" Возврат  F:"
592
+#define MSG_AUTORETRACT						" АвтоОткат:"
593
+#define MSG_SERIAL_ERROR_MENU_STRUCTURE		"Ошибка в структуре меню."
594
+
595
+// Serial Console Messages
596
+
597
+#define MSG_Enqueing						"Запланировано \""
598
+#define MSG_POWERUP							"Включение питания"
599
+#define MSG_EXTERNAL_RESET					" Внешний сброс"
600
+#define MSG_BROWNOUT_RESET					" Brown out сброс"
601
+#define MSG_WATCHDOG_RESET					" Watchdog сброс"
602
+#define MSG_SOFTWARE_RESET					" программный сброс"
603
+#define MSG_MARLIN							"Marlin "
604
+#define MSG_AUTHOR							" | Автор: "
605
+#define MSG_CONFIGURATION_VER				" Последнее обновление: "
606
+#define MSG_FREE_MEMORY						" Памяти свободно: "
607
+#define MSG_PLANNER_BUFFER_BYTES			"  Буффер очереди команд Bytes: "
608
+#define MSG_OK								"ok"
609
+#define MSG_FILE_SAVED						"Файл записан."
610
+#define MSG_ERR_LINE_NO						"Номен строки это не последняя строка+1, последняя строка:"
611
+#define MSG_ERR_CHECKSUM_MISMATCH			"контрольная сумма не совпадает, последняя строка:"
612
+#define MSG_ERR_NO_CHECKSUM					"нет контрольной суммы для строки, последняя строка:"
613
+#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM	"нет строки для контрольной суммы, последняя строка:"
614
+#define MSG_FILE_PRINTED					"Печать файла завершена"
615
+#define MSG_BEGIN_FILE_LIST					"Список файлов"
616
+#define MSG_END_FILE_LIST					"Конец списка файлов"
617
+#define MSG_M104_INVALID_EXTRUDER			"M104 ошибка экструдера "
618
+#define MSG_M105_INVALID_EXTRUDER			"M105 ошибка экструдера "
619
+#define MSG_ERR_NO_THERMISTORS				"Нет термистра - нет температуры"
620
+#define MSG_M109_INVALID_EXTRUDER			"M109 ошибка экструдера "
621
+#define MSG_HEATING							"Нагрев...  "
622
+#define MSG_HEATING_COMPLETE				"Наргето.    "
623
+#define MSG_BED_HEATING						"Нагрев стола...     "
624
+#define MSG_BED_DONE						"Стол нагрет.        "
625
+#define MSG_M115_REPORT						"FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n"
626
+#define MSG_COUNT_X							" Count X:"
627
+#define MSG_ERR_KILLED						"Принтер остановлен. вызов kill() !!"
628
+#define MSG_ERR_STOPPED						"Ошибка принтера, останов. Устраните неисправность и используйте M999 для перезагрузки!. (Температура недоступна. Проверьте датчики)"
629
+#define MSG_RESEND							"Переотправка:"
630
+#define MSG_UNKNOWN_COMMAND					"Неизвестная команда:\""
631
+#define MSG_ACTIVE_EXTRUDER					"Активный экструдер: "
632
+#define MSG_INVALID_EXTRUDER				"Ошибка экструдера"
633
+#define MSG_X_MIN							"x_min:"
634
+#define MSG_X_MAX							"x_max:"
635
+#define MSG_Y_MIN							"y_min:"
636
+#define MSG_Y_MAX							"y_max:"
637
+#define MSG_Z_MIN							"z_min:"
638
+#define MSG_Z_MAX							"z_max:"
639
+
640
+#define MSG_SD_CANT_OPEN_SUBDIR				"Не открыть папку"
641
+#define MSG_SD_INIT_FAIL					"Ошибка инициализации SD"
642
+#define MSG_SD_VOL_INIT_FAIL				"Ошибка инициализации раздела"
643
+#define MSG_SD_OPENROOT_FAIL				"Не прочесть содержимое корня"
644
+#define MSG_SD_CARD_OK						"SD карта в порядке"
645
+#define MSG_SD_WORKDIR_FAIL					"не открыть рабочую папку"
646
+#define MSG_SD_OPEN_FILE_FAIL				"Ошибка чтения, файл: "
647
+#define MSG_SD_FILE_OPENED					"Файл открыт:"
648
+#define MSG_SD_SIZE							" Размер:"
649
+#define MSG_SD_FILE_SELECTED				"Файл выбран"
650
+#define MSG_SD_WRITE_TO_FILE				"Запись в файл: "
651
+#define MSG_SD_PRINTING_BYTE				"SD печать byte "
652
+#define MSG_SD_NOT_PRINTING					"нет SD печати"
653
+#define MSG_SD_ERR_WRITE_TO_FILE			"ошибка записи в файл"
654
+#define MSG_SD_CANT_ENTER_SUBDIR			"Не зайти в папку:"
655
+
656
+#define MSG_STEPPER_TO_HIGH					"Частота шагов очень высока : "
657
+#define MSG_ENDSTOPS_HIT					"концевик сработал: "
658
+#define MSG_ERR_COLD_EXTRUDE_STOP			" защита холодной экструзии"
659
+#define MSG_ERR_LONG_EXTRUDE_STOP			" защита превышения длинны экструзии"
660
+#define MSG_M119_REPORT						"Статус концевиков"
661
+#define MSG_ENDSTOP_HIT						"Срабатывание концевика"
662
+#define MSG_ENDSTOP_OPEN					"Концевик освобожден"
663
+
664
+#endif
506 665
 #endif // ifndef LANGUAGE_H

+ 10
- 1
Marlin/ultralcd.h View File

@@ -2,7 +2,12 @@
2 2
 #define ULTRALCD_H
3 3
 #include "Marlin.h"
4 4
 #ifdef ULTRA_LCD
5
-  #include <LiquidCrystal.h>
5
+#include "language.h"
6
+#if LANGUAGE_CHOICE == 6
7
+#include "LiquidCrystalRus.h"
8
+#else
9
+#include <LiquidCrystal.h>
10
+#endif
6 11
   void lcd_status();
7 12
   void lcd_init();
8 13
   void lcd_status(const char* message);
@@ -12,7 +17,11 @@
12 17
 
13 18
   #define LCD_UPDATE_INTERVAL 100
14 19
   #define STATUSTIMEOUT 15000
20
+#if LANGUAGE_CHOICE == 6
21
+  extern LiquidCrystalRus lcd;
22
+#else
15 23
   extern LiquidCrystal lcd;
24
+#endif
16 25
   extern volatile char buttons;  //the last checked buttons in a bit array.
17 26
   
18 27
   #ifdef NEWPANEL

+ 8
- 0
Marlin/ultralcd.pde View File

@@ -6,7 +6,11 @@
6 6
 #include "language.h"
7 7
 #include "temperature.h"
8 8
 #include "EEPROMwrite.h"
9
+#if LANGUAGE_CHOICE == 6
10
+#include "LiquidCrystalRus.h"
11
+#else
9 12
 #include <LiquidCrystal.h>
13
+#endif
10 14
 //===========================================================================
11 15
 //=============================imported variables============================
12 16
 //===========================================================================
@@ -38,7 +42,11 @@ static char messagetext[LCD_WIDTH]="";
38 42
 //return for string conversion routines
39 43
 static char conv[8];
40 44
 
45
+#if LANGUAGE_CHOICE == 6
46
+LiquidCrystalRus lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5,LCD_PINS_D6,LCD_PINS_D7);  //RS,Enable,D4,D5,D6,D7
47
+#else
41 48
 LiquidCrystal lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5,LCD_PINS_D6,LCD_PINS_D7);  //RS,Enable,D4,D5,D6,D7 
49
+#endif
42 50
 
43 51
 static unsigned long previous_millis_lcd=0;
44 52
 //static long previous_millis_buttons=0;

Loading…
Cancel
Save