mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 16:55:20 +03:00
[stock]14bytes saved
This commit is contained in:
parent
95bb18a311
commit
9144776fba
3 changed files with 16 additions and 12 deletions
|
@ -349,7 +349,7 @@ uint16_t RlcFile::readRlc(uint8_t *buf,uint16_t i_len)
|
|||
{
|
||||
uint16_t i=0;
|
||||
for( ; 1; ){
|
||||
uint8_t l=min<uint16_t>(m_zeroes,i_len-i);
|
||||
uint8_t l = min<uint16_t>(m_zeroes,i_len-i);
|
||||
memclear(&buf[i], l);
|
||||
i += l;
|
||||
m_zeroes -= l;
|
||||
|
@ -736,7 +736,7 @@ void RlcFile::nextRlcWriteStep()
|
|||
{
|
||||
uint8_t fri=0;
|
||||
|
||||
if (m_currBlk && ( fri = EeFsGetLink(m_currBlk))) {
|
||||
if (m_currBlk && (fri=EeFsGetLink(m_currBlk))) {
|
||||
uint8_t prev_freeList = eeFs.freeList;
|
||||
eeFs.freeList = fri;
|
||||
while( EeFsGetLink(fri)) fri = EeFsGetLink(fri);
|
||||
|
@ -859,9 +859,7 @@ void eeLoadModel(uint8_t id)
|
|||
}
|
||||
|
||||
if (pulsesStarted()) {
|
||||
checkLowEEPROM();
|
||||
checkTHR();
|
||||
checkSwitches();
|
||||
checkAll();
|
||||
resumePulses();
|
||||
clearKeyEvents();
|
||||
}
|
||||
|
|
|
@ -941,7 +941,7 @@ void putsTelemetryValue(uint8_t x, uint8_t y, int16_t val, uint8_t unit, uint8_t
|
|||
val = (val * 46) / 25;
|
||||
}
|
||||
#endif
|
||||
lcd_outdezAtt(x, (att & DBLSIZE ? y - FH : y), val, att & (~NO_UNIT)); // TODO we could add this test inside lcd_outdezAtt!
|
||||
lcd_outdezAtt(x, (att & DBLSIZE ? y - FH : y), val, att & (~NO_UNIT));
|
||||
if (~att & NO_UNIT && unit != UNIT_RAW)
|
||||
lcd_putsiAtt(lcdLastPos/*+1*/, y, STR_VTELEMUNIT, unit, 0);
|
||||
}
|
||||
|
@ -1076,6 +1076,16 @@ void doSplash()
|
|||
#define doSplash()
|
||||
#endif
|
||||
|
||||
void checkAll()
|
||||
{
|
||||
#if !defined(PCBARM)
|
||||
checkLowEEPROM();
|
||||
#endif
|
||||
|
||||
checkTHR();
|
||||
checkSwitches();
|
||||
}
|
||||
|
||||
#if !defined(PCBARM)
|
||||
void checkLowEEPROM()
|
||||
{
|
||||
|
@ -3218,12 +3228,7 @@ inline void open9xInit(OPEN9X_INIT_ARGS)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !defined(PCBARM)
|
||||
checkLowEEPROM();
|
||||
#endif
|
||||
|
||||
checkTHR();
|
||||
checkSwitches();
|
||||
checkAll();
|
||||
checkAlarm();
|
||||
}
|
||||
|
||||
|
|
|
@ -682,6 +682,7 @@ void checkLowEEPROM();
|
|||
void checkTHR();
|
||||
void checkSwitches();
|
||||
void checkAlarm();
|
||||
void checkAll();
|
||||
|
||||
#define ADC_VREF_TYPE 0x40 // AVCC with external capacitor at AREF pin
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue