mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 17:55:19 +03:00
ACCURAT_THROTTLE_TIMER was lost when splitting code into mixers.cpp in 2fbd4ff13a
This commit is contained in:
parent
74534b74c2
commit
e4314004a8
2 changed files with 16 additions and 9 deletions
|
@ -1067,12 +1067,3 @@ void evalMixes(uint8_t tick10ms)
|
||||||
PORTH &= ~0x40; // PORTH:6 HIGH->LOW signals end of mixer interrupt
|
PORTH &= ~0x40; // PORTH:6 HIGH->LOW signals end of mixer interrupt
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(CPUM64) && !defined(ACCURAT_THROTTLE_TIMER)
|
|
||||||
// code cost is about 16 bytes for higher throttle accuracy for timer
|
|
||||||
// would not be noticable anyway, because all version up to this change had only 16 steps;
|
|
||||||
// now it has already 32 steps; this define would increase to 128 steps
|
|
||||||
#define ACCURAT_THROTTLE_TIMER
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2180,6 +2180,14 @@ void doMixerCalculations()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (tick10ms) {
|
if (tick10ms) {
|
||||||
|
|
||||||
|
#if !defined(CPUM64) && !defined(ACCURAT_THROTTLE_TIMER)
|
||||||
|
// code cost is about 16 bytes for higher throttle accuracy for timer
|
||||||
|
// would not be noticable anyway, because all version up to this change had only 16 steps;
|
||||||
|
// now it has already 32 steps; this define would increase to 128 steps
|
||||||
|
#define ACCURAT_THROTTLE_TIMER
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Throttle trace */
|
/* Throttle trace */
|
||||||
int16_t val;
|
int16_t val;
|
||||||
|
|
||||||
|
@ -2233,6 +2241,14 @@ void doMixerCalculations()
|
||||||
val >>= (RESX_SHIFT-4); // calibrate it
|
val >>= (RESX_SHIFT-4); // calibrate it
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
{
|
||||||
|
static int cnt = 0;
|
||||||
|
if (++cnt > 100) {
|
||||||
|
cnt = 0;
|
||||||
|
TRACE("Ttrace: %d", (int)val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Timers start
|
// Timers start
|
||||||
for (uint8_t i=0; i<MAX_TIMERS; i++) {
|
for (uint8_t i=0; i<MAX_TIMERS; i++) {
|
||||||
int8_t tm = g_model.timers[i].mode;
|
int8_t tm = g_model.timers[i].mode;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue