mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Optimization: removed usage of gettime() where possible
This commit is contained in:
parent
3ada9f7cf5
commit
43598fb6df
6 changed files with 9 additions and 18 deletions
|
@ -326,11 +326,7 @@ getvalue_t getValue(uint8_t i)
|
|||
|
||||
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_TX_VOLTAGE) return g_vbat100mV;
|
||||
#if defined(CPUARM) && defined(RTCLOCK)
|
||||
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_TX_TIME) {
|
||||
struct gtm t;
|
||||
gettime(&t);
|
||||
return t.tm_hour*60 + t.tm_min;
|
||||
}
|
||||
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_TX_TIME) return (g_rtcTime % SECS_PER_DAY) / 60; // number of minutes from midnight
|
||||
#endif
|
||||
else if (i<=MIXSRC_FIRST_TELEM-1+TELEM_TIMER2) return timersStates[i-MIXSRC_FIRST_TELEM+1-TELEM_TIMER1].val;
|
||||
#if defined(FRSKY)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue