NL TTS as copy of EN as per new info on #6108.

This commit is contained in:
Kilrah
2018-08-19 11:43:04 +02:00
parent d3d5e6f215
commit 9df21ceb6e
4 changed files with 30 additions and 13 deletions
+21 -6
View File
@@ -1,8 +1,21 @@
/*
* Authors (alphabetical order)
* - Andre Bernet <bernet.andre@gmail.com>
* - Andreas Weitl
* - Bertrand Songis <bsongis@gmail.com>
* - Jean-Pierre van Melis
* - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
* - Cameron Weeks <th9xer@gmail.com>
* - Erez Raviv
* - Gabriel Birkus
* - Jean-Pierre Parisy
* - Karl Szmutny
* - Michael Blandford
* - Michal Hlavinka
* - Pat Mackenzie
* - Philip Moss
* - Rob Thomson
* - Romolo Manfredini <romolo.manfredini@gmail.com>
* - Thomas Husterer
*
* opentx is based on code named
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
@@ -21,6 +34,8 @@
*
*/
// NOTE: This file is identical to the EN version
#include "opentx.h"
enum DutchPrompts {
@@ -32,13 +47,13 @@ enum DutchPrompts {
NL_PROMPT_MINUS = NL_PROMPT_NUMBERS_BASE+111,
NL_PROMPT_POINT = NL_PROMPT_NUMBERS_BASE+112,
NL_PROMPT_UNITS_BASE = 113,
NL_PROMPT_POINT_BASE = 165, //.0 - .9
NL_PROMPT_POINT_BASE = 167, //.0 - .9
};
#define NL_PUSH_UNIT_PROMPT(u, p) nl_pushUnitPrompt((u), (p), id)
I18N_PLAY_FUNCTION(nl, pushUnitPrompt, uint8_t unitprompt, int16_t number)
I18N_PLAY_FUNCTION(nl, pushUnitPrompt, uint8_t unitprompt, int16_t number)
{
if (number == 1)
PUSH_UNIT_PROMPT(unitprompt, 0);
@@ -59,7 +74,7 @@ I18N_PLAY_FUNCTION(nl, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
if (mode == 2) {
number /= 10;
}
div_t qr = div(number, 10);
div_t qr = div((int)number, 10);
if (qr.rem) {
PLAY_NUMBER(qr.quot, 0, 0);
PUSH_NUMBER_PROMPT(NL_PROMPT_POINT_BASE + qr.rem);
@@ -75,7 +90,6 @@ I18N_PLAY_FUNCTION(nl, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
if (number >= 1000) {
PLAY_NUMBER(number / 1000, 0, 0);
PUSH_NUMBER_PROMPT(NL_PROMPT_THOUSAND);
number %= 1000;
if (number == 0)
number = -1;
@@ -120,10 +134,11 @@ I18N_PLAY_FUNCTION(nl, playDuration, int seconds PLAY_DURATION_ATT)
if (seconds > 0)
PUSH_NUMBER_PROMPT(NL_PROMPT_AND);
}
if (seconds > 0) {
PLAY_NUMBER(seconds, UNIT_SECONDS, 0);
}
}
LANGUAGE_PACK_DECLARE(nl, "Nederlands");
LANGUAGE_PACK_DECLARE(nl, "Dutch");