Another overflow in timer mode display

This commit is contained in:
Bertrand Songis
2019-07-13 13:52:58 +02:00
parent 30557ba383
commit 4f180b157c
8 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -802,7 +802,7 @@ void drawCurveName(coord_t x, coord_t y, int8_t idx, LcdFlags att)
lcdDrawText(x, y, s, att);
}
void drawTimerMode(coord_t x, coord_t y, int8_t mode, LcdFlags att)
void drawTimerMode(coord_t x, coord_t y, swsrc_t mode, LcdFlags att)
{
if (mode >= 0) {
if (mode < TMRMODE_COUNT)
+1 -1
View File
@@ -130,7 +130,7 @@ void drawSwitch(coord_t x, coord_t y, swsrc_t swtch, LcdFlags att=0);
void drawSource(coord_t x, coord_t y, mixsrc_t idx, LcdFlags att=0);
#endif
void drawCurveName(coord_t x, coord_t y, int8_t idx, LcdFlags att=0);
void drawTimerMode(coord_t x, coord_t y, int8_t mode, LcdFlags att=0);
void drawTimerMode(coord_t x, coord_t y, swsrc_t mode, LcdFlags att=0);
void drawTrimMode(coord_t x, coord_t y, uint8_t phase, uint8_t idx, LcdFlags att);
void drawShortTrimMode(coord_t x, coord_t y, uint8_t mode, uint8_t idx, LcdFlags att);
+1 -1
View File
@@ -706,7 +706,7 @@ void drawCurveName(coord_t x, coord_t y, int8_t idx, LcdFlags flags)
lcdDrawText(x, y, s, flags);
}
void drawTimerMode(coord_t x, coord_t y, int32_t mode, LcdFlags att)
void drawTimerMode(coord_t x, coord_t y, swsrc_t mode, LcdFlags att)
{
if (mode >= 0) {
if (mode < TMRMODE_COUNT)
+1 -1
View File
@@ -123,7 +123,7 @@ void drawSwitch(coord_t x, coord_t y, int32_t swtch, LcdFlags att=0);
void putsStickName(coord_t x, coord_t y, uint8_t idx, LcdFlags att=0);
void drawSource(coord_t x, coord_t y, uint32_t idx, LcdFlags att=0);
void drawCurveName(coord_t x, coord_t y, int8_t idx, LcdFlags att=0);
void drawTimerMode(coord_t x, coord_t y, int32_t mode, LcdFlags att=0);
void drawTimerMode(coord_t x, coord_t y, swsrc_t mode, LcdFlags att=0);
void drawTrimMode(coord_t x, coord_t y, uint8_t phase, uint8_t idx, LcdFlags att);
#define putsChn(x, y, idx, att) drawSource(x, y, MIXSRC_CH1+idx-1, att)
+1 -1
View File
@@ -301,7 +301,7 @@ void drawCurveName(coord_t x, coord_t y, int8_t idx, LcdFlags flags)
lcdDrawText(x, y, s, flags);
}
void drawTimerMode(coord_t x, coord_t y, int32_t mode, LcdFlags att)
void drawTimerMode(coord_t x, coord_t y, swsrc_t mode, LcdFlags att)
{
if (mode >= 0) {
if (mode < TMRMODE_COUNT) {
+1 -1
View File
@@ -154,7 +154,7 @@ void putsStickName(coord_t x, coord_t y, uint8_t idx, LcdFlags att=0);
void drawSwitch(coord_t x, coord_t y, swsrc_t swtch, LcdFlags flags=0);
void drawSource(coord_t x, coord_t y, mixsrc_t idx, LcdFlags att=0);
void drawCurveName(coord_t x, coord_t y, int8_t idx, LcdFlags att=0);
void drawTimerMode(coord_t x, coord_t y, int32_t mode, LcdFlags att=0);
void drawTimerMode(coord_t x, coord_t y, swsrc_t mode, LcdFlags att=0);
void drawTrimMode(coord_t x, coord_t y, uint8_t phase, uint8_t idx, LcdFlags att);
#define putsChn(x, y, idx, att) drawSource(x, y, MIXSRC_CH1+idx-1, att)
+1
View File
@@ -85,6 +85,7 @@ void Key::input(bool val)
m_cnt = 0;
}
break;
case KSTATE_START:
// TRACE("key %d FIRST", key());
putEvent(EVT_KEY_FIRST(key()));
+4 -3
View File
@@ -1455,7 +1455,7 @@ void doMixerCalculations()
s_cnt_1s -= 10;
sessionTimer += 1;
inactivity.counter++;
if ((((uint8_t)inactivity.counter)&0x07)==0x01 && g_eeGeneral.inactivityTimer && g_vbat100mV>50 && inactivity.counter > ((uint16_t)g_eeGeneral.inactivityTimer*60))
if ((((uint8_t)inactivity.counter) & 0x07) == 0x01 && g_eeGeneral.inactivityTimer && inactivity.counter > ((uint16_t)g_eeGeneral.inactivityTimer * 60))
AUDIO_INACTIVITY();
#if defined(AUDIO)
@@ -1466,8 +1466,9 @@ void doMixerCalculations()
val = s_sum_samples_thr_1s / s_cnt_samples_thr_1s;
s_timeCum16ThrP += (val>>3); // s_timeCum16ThrP would overrun if we would store throttle value with higher accuracy; therefore stay with 16 steps
if (val) s_timeCumThr += 1;
s_sum_samples_thr_1s>>=2; // correct better accuracy now, because trace graph can show this information; in case thrtrace is not active, the compile should remove this
if (val)
s_timeCumThr += 1;
s_sum_samples_thr_1s >>= 2; // correct better accuracy now, because trace graph can show this information; in case thrtrace is not active, the compile should remove this
#if defined(THRTRACE)
// throttle trace is done every 10 seconds; Tracebuffer is adjusted to screen size.