Browse Source

Merge pull request #2050 from leptun/MK3_fix_languages_lcd3

Fix shifted languages. Use \n and \x0a
DRracer 5 năm trước cách đây
mục cha
commit
da7ce65bb4

+ 5 - 1
Firmware/lcd.cpp

@@ -143,7 +143,7 @@ static void lcd_command(uint8_t value, uint16_t delayExtra = 0)
 
 static void lcd_write(uint8_t value)
 {
-	if (value == '\n' || value == '\r')
+	if (value == '\n')
 	{
 		if (lcd_currline > 3) lcd_currline = -1;
 		lcd_set_cursor(0, lcd_currline + 1); // LF
@@ -257,7 +257,9 @@ void lcd_no_display(void)
 	lcd_displaycontrol &= ~LCD_DISPLAYON;
 	lcd_command(LCD_DISPLAYCONTROL | lcd_displaycontrol);
 }
+#endif
 
+#ifdef VT100 //required functions for VT100
 // Turns the underline cursor on/off
 void lcd_no_cursor(void)
 {
@@ -270,7 +272,9 @@ void lcd_cursor(void)
 	lcd_displaycontrol |= LCD_CURSORON;
 	lcd_command(LCD_DISPLAYCONTROL | lcd_displaycontrol);
 }
+#endif
 
+#if 0
 // Turn on and off the blinking cursor
 void lcd_no_blink(void)
 {

+ 2 - 2
Firmware/ultralcd.cpp

@@ -4344,7 +4344,7 @@ static void lcd_crash_mode_info()
 	if ((tim + 1000) < _millis())
 	{
 		lcd_clear();
-		fputs_P(_i("Crash detection can\rbe turned on only in\rNormal mode"), lcdout);////MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
+		fputs_P(_i("Crash detection can\nbe turned on only in\nNormal mode"), lcdout);////MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
 		tim = _millis();
 	}
     menu_back_if_clicked();
@@ -4357,7 +4357,7 @@ static void lcd_crash_mode_info2()
 	if ((tim + 1000) < _millis())
 	{
 		lcd_clear();
-		fputs_P(_i("WARNING:\rCrash detection\rdisabled in\rStealth mode"), lcdout);////MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
+		fputs_P(_i("WARNING:\nCrash detection\ndisabled in\nStealth mode"), lcdout);////MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
 		tim = _millis();
 	}
     menu_back_if_clicked();

+ 1 - 1
lang/fw-build.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # postbuild.sh - multi-language support script
 #  Generate binary with secondary language.

+ 1 - 1
lang/fw-clean.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # fw-clean.sh - multi-language support script
 #  Remove all firmware output files from lang folder.

+ 1 - 1
lang/lang-add.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # lang-add.sh - multi-language support script
 #  add new texts from list (lang_add.txt) to all dictionary files

+ 1 - 1
lang/lang-check.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # lang_check.sh - multi-language support script
 #  check lang_xx.bin (language binary file)

+ 2 - 2
lang/lang_en.txt

@@ -8,10 +8,10 @@
 "[0;0] point offset"
 
 #MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
-"Crash detection can\rbe turned on only in\rNormal mode"
+"Crash detection can\x0abe turned on only in\x0aNormal mode"
 
 #MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
-"WARNING:\rCrash detection\rdisabled in\rStealth mode"
+"WARNING:\x0aCrash detection\x0adisabled in\x0aStealth mode"
 
 #
 ">Cancel"

+ 4 - 4
lang/lang_en_cz.txt

@@ -11,12 +11,12 @@
 "[0;0] odsazeni bodu"
 
 #MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
-"Crash detection can\rbe turned on only in\rNormal mode"
-"Crash detekce muze\rbyt zapnuta pouze v\rNormal modu"
+"Crash detection can\x0abe turned on only in\x0aNormal mode"
+"Crash detekce muze\x0abyt zapnuta pouze v\x0aNormal modu"
 
 #MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
-"WARNING:\rCrash detection\rdisabled in\rStealth mode"
-"POZOR:\rCrash detekce\rdeaktivovana ve\rStealth modu"
+"WARNING:\x0aCrash detection\x0adisabled in\x0aStealth mode"
+"POZOR:\x0aCrash detekce\x0adeaktivovana ve\x0aStealth modu"
 
 #
 ">Cancel"

+ 4 - 4
lang/lang_en_de.txt

@@ -11,12 +11,12 @@
 "[0;0] Punktversatz"
 
 #MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
-"Crash detection can\rbe turned on only in\rNormal mode"
-"Crash Erkennung kann\rnur im Modus Normal\rgenutzt werden"
+"Crash detection can\x0abe turned on only in\x0aNormal mode"
+"Crash Erkennung kann\x0anur im Modus Normal\x0agenutzt werden"
 
 #MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
-"WARNING:\rCrash detection\rdisabled in\rStealth mode"
-"WARNUNG:\rCrash Erkennung\rdeaktiviert im\rStealth Modus"
+"WARNING:\x0aCrash detection\x0adisabled in\x0aStealth mode"
+"WARNUNG:\x0aCrash Erkennung\x0adeaktiviert im\x0aStealth Modus"
 
 #
 ">Cancel"

+ 4 - 4
lang/lang_en_es.txt

@@ -11,12 +11,12 @@
 "[0;0] punto offset"
 
 #MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
-"Crash detection can\rbe turned on only in\rNormal mode"
-"Dec. choque\rpuede ser activada solo en\rModo normal"
+"Crash detection can\x0abe turned on only in\x0aNormal mode"
+"Dec. choque puede\x0aser activada solo en\x0aModo normal"
 
 #MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
-"WARNING:\rCrash detection\rdisabled in\rStealth mode"
-"ATENCION:\rDec. choque\rdesactivada en\rModo silencio"
+"WARNING:\x0aCrash detection\x0adisabled in\x0aStealth mode"
+"ATENCION:\x0aDec. choque\x0adesactivada en\x0aModo silencio"
 
 #
 ">Cancel"

+ 4 - 4
lang/lang_en_fr.txt

@@ -11,12 +11,12 @@
 "Offset point [0;0]"
 
 #MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
-"Crash detection can\rbe turned on only in\rNormal mode"
-"La detection de crash peut etre\ractive seulement\ren mode Normal"
+"Crash detection can\x0abe turned on only in\x0aNormal mode"
+"La detection de\x0acrash peut etre\x0aactive seulement en\x0amode Normal"
 
 #MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
-"WARNING:\rCrash detection\rdisabled in\rStealth mode"
-"ATTENTION :\rDetection de crash\r desactivee en\rmode Furtif"
+"WARNING:\x0aCrash detection\x0adisabled in\x0aStealth mode"
+"ATTENTION:\x0aDetection de crash\x0adesactivee en\x0amode Furtif"
 
 #
 ">Cancel"

+ 4 - 4
lang/lang_en_it.txt

@@ -11,12 +11,12 @@
 "[0;0] punto offset"
 
 #MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
-"Crash detection can\rbe turned on only in\rNormal mode"
-"Rilev. impatto\rattivabile solo\rin Modalita normale"
+"Crash detection can\x0abe turned on only in\x0aNormal mode"
+"Rilev. impatto\x0aattivabile solo\x0ain Modalita normale"
 
 #MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
-"WARNING:\rCrash detection\rdisabled in\rStealth mode"
-"ATTENZIONE:\rRilev. impatto\rdisattivato in\rModalita silenziosa"
+"WARNING:\x0aCrash detection disabled in Stealth mode"
+"ATTENZIONE:\x0aRilev. impatto\x0adisattivato in\x0aModalita silenziosa"
 
 #
 ">Cancel"

+ 4 - 4
lang/lang_en_pl.txt

@@ -11,12 +11,12 @@
 "[0;0] przesuniecie punktu"
 
 #MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
-"Crash detection can\rbe turned on only in\rNormal mode"
-"Wykrywanie zderzen moze\rbyc wlaczone tylko w\rtrybie Normalnym"
+"Crash detection can\x0abe turned on only in\x0aNormal mode"
+"Wykrywanie zderzen\x0amoze byc wlaczone\x0atylko w\x0atrybie Normalnym"
 
 #MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
-"WARNING:\rCrash detection\rdisabled in\rStealth mode"
-"UWAGA:\rWykrywanie zderzen\rwylaczone w\rtrybie Stealth"
+"WARNING:\x0aCrash detection\x0adisabled in\x0aStealth mode"
+"UWAGA:\x0aWykrywanie zderzen\x0awylaczone w\x0atrybie Stealth"
 
 #
 ">Cancel"

+ 2 - 1
lang/progmem.sh

@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # progmem.sh - multi-language support script
 #  Examine content of progmem sections (default is progmem1).
@@ -104,6 +104,7 @@ cat $PROGMEM.chr | \
  sed 's/\\x1b/\\\\\\x1b/g;' | \
  sed 's/\\x01/\\\\\\x01/g;' | \
  sed 's/\\xf8/\\\\\\xf8/g;' | \
+ sed 's/\\x0a/\\\\\\x0a/g;' | \
  sed 's/\\x00$/\n/;s/^/\"/;s/$/\"\\/'; \
 ) | sh > $PROGMEM.var