PlayFunction Time was playing negative values (int16_t overflow)
This commit is contained in:
@@ -219,7 +219,7 @@ I18N_PLAY_FUNCTION(cz, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(cz, playDuration, int16_t seconds PLAY_DURATION_ATT)
|
||||
I18N_PLAY_FUNCTION(cz, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(CZ_PROMPT_MINUS);
|
||||
|
||||
@@ -168,7 +168,7 @@ I18N_PLAY_FUNCTION(de, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(de, playDuration, int16_t seconds PLAY_DURATION_ATT)
|
||||
I18N_PLAY_FUNCTION(de, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(DE_PROMPT_MINUS);
|
||||
|
||||
@@ -151,7 +151,7 @@ I18N_PLAY_FUNCTION(en, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(en, playDuration, int16_t seconds PLAY_DURATION_ATT)
|
||||
I18N_PLAY_FUNCTION(en, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(EN_PROMPT_MINUS);
|
||||
|
||||
@@ -190,7 +190,7 @@ I18N_PLAY_FUNCTION(es, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(es, playDuration, int16_t seconds PLAY_DURATION_ATT)
|
||||
I18N_PLAY_FUNCTION(es, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(ES_PROMPT_MENO);
|
||||
|
||||
@@ -176,7 +176,7 @@ I18N_PLAY_FUNCTION(fr, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(fr, playDuration, int16_t seconds PLAY_DURATION_ATT)
|
||||
I18N_PLAY_FUNCTION(fr, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(FR_PROMPT_MOINS);
|
||||
@@ -210,7 +210,7 @@ I18N_PLAY_FUNCTION(fr, playDuration, int16_t seconds PLAY_DURATION_ATT)
|
||||
}
|
||||
}
|
||||
|
||||
if (seconds > 0) {
|
||||
if (!IS_PLAY_TIME() && seconds > 0) {
|
||||
PLAY_NUMBER(seconds, 0, FEMININ);
|
||||
PUSH_NUMBER_PROMPT(FR_PROMPT_SECONDE);
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ I18N_PLAY_FUNCTION(it, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(it, playDuration, int16_t seconds PLAY_DURATION_ATT)
|
||||
I18N_PLAY_FUNCTION(it, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_MENO);
|
||||
|
||||
@@ -239,7 +239,7 @@ I18N_PLAY_FUNCTION(pl, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
|
||||
|
||||
// The whole funtion has to be changed
|
||||
I18N_PLAY_FUNCTION(pl, playDuration, int16_t seconds PLAY_DURATION_ATT)
|
||||
I18N_PLAY_FUNCTION(pl, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(PL_PROMPT_MINUS);
|
||||
|
||||
@@ -175,7 +175,7 @@ I18N_PLAY_FUNCTION(pt, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(pt, playDuration, int16_t seconds PLAY_DURATION_ATT)
|
||||
I18N_PLAY_FUNCTION(pt, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(PT_PROMPT_MENOS);
|
||||
|
||||
@@ -141,7 +141,7 @@ I18N_PLAY_FUNCTION(se, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(se, playDuration, int16_t seconds PLAY_DURATION_ATT)
|
||||
I18N_PLAY_FUNCTION(se, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(SE_PROMPT_MINUS);
|
||||
|
||||
@@ -235,7 +235,7 @@ I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
||||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(sk, playDuration, int16_t seconds PLAY_DURATION_ATT)
|
||||
I18N_PLAY_FUNCTION(sk, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(SK_PROMPT_MINUS);
|
||||
|
||||
Reference in New Issue
Block a user