PlayDuration was broken

This commit is contained in:
bsongis
2015-07-05 12:28:41 +02:00
parent 0683e60bec
commit 79e36b8711
+4 -4
View File
@@ -134,7 +134,7 @@ I18N_PLAY_FUNCTION(en, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
I18N_PLAY_FUNCTION(en, playDuration, int seconds PLAY_DURATION_ATT)
{
if (seconds == 0) {
PLAY_NUMBER(seconds, 0 , 0);
PLAY_NUMBER(seconds, 0, 0);
return;
}
@@ -146,19 +146,19 @@ I18N_PLAY_FUNCTION(en, playDuration, int seconds PLAY_DURATION_ATT)
uint8_t tmp = seconds / 3600;
seconds %= 3600;
if (tmp > 0 || IS_PLAY_TIME()) {
PLAY_NUMBER(tmp, UNIT_HOURS+1 , 0);
PLAY_NUMBER(tmp, UNIT_HOURS, 0);
}
tmp = seconds / 60;
seconds %= 60;
if (tmp > 0) {
PLAY_NUMBER(tmp, UNIT_MINUTES+1 , 0);
PLAY_NUMBER(tmp, UNIT_MINUTES, 0);
if (seconds > 0)
PUSH_NUMBER_PROMPT(EN_PROMPT_AND);
}
if (seconds > 0) {
PLAY_NUMBER(seconds, UNIT_SECONDS+1 , 0);
PLAY_NUMBER(seconds, UNIT_SECONDS, 0);
}
}