mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +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;
|
uint16_t i=0;
|
||||||
for( ; 1; ){
|
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);
|
memclear(&buf[i], l);
|
||||||
i += l;
|
i += l;
|
||||||
m_zeroes -= l;
|
m_zeroes -= l;
|
||||||
|
@ -736,7 +736,7 @@ void RlcFile::nextRlcWriteStep()
|
||||||
{
|
{
|
||||||
uint8_t fri=0;
|
uint8_t fri=0;
|
||||||
|
|
||||||
if (m_currBlk && ( fri = EeFsGetLink(m_currBlk))) {
|
if (m_currBlk && (fri=EeFsGetLink(m_currBlk))) {
|
||||||
uint8_t prev_freeList = eeFs.freeList;
|
uint8_t prev_freeList = eeFs.freeList;
|
||||||
eeFs.freeList = fri;
|
eeFs.freeList = fri;
|
||||||
while( EeFsGetLink(fri)) fri = EeFsGetLink(fri);
|
while( EeFsGetLink(fri)) fri = EeFsGetLink(fri);
|
||||||
|
@ -859,9 +859,7 @@ void eeLoadModel(uint8_t id)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pulsesStarted()) {
|
if (pulsesStarted()) {
|
||||||
checkLowEEPROM();
|
checkAll();
|
||||||
checkTHR();
|
|
||||||
checkSwitches();
|
|
||||||
resumePulses();
|
resumePulses();
|
||||||
clearKeyEvents();
|
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;
|
val = (val * 46) / 25;
|
||||||
}
|
}
|
||||||
#endif
|
#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)
|
if (~att & NO_UNIT && unit != UNIT_RAW)
|
||||||
lcd_putsiAtt(lcdLastPos/*+1*/, y, STR_VTELEMUNIT, unit, 0);
|
lcd_putsiAtt(lcdLastPos/*+1*/, y, STR_VTELEMUNIT, unit, 0);
|
||||||
}
|
}
|
||||||
|
@ -1076,6 +1076,16 @@ void doSplash()
|
||||||
#define doSplash()
|
#define doSplash()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void checkAll()
|
||||||
|
{
|
||||||
|
#if !defined(PCBARM)
|
||||||
|
checkLowEEPROM();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
checkTHR();
|
||||||
|
checkSwitches();
|
||||||
|
}
|
||||||
|
|
||||||
#if !defined(PCBARM)
|
#if !defined(PCBARM)
|
||||||
void checkLowEEPROM()
|
void checkLowEEPROM()
|
||||||
{
|
{
|
||||||
|
@ -3218,12 +3228,7 @@ inline void open9xInit(OPEN9X_INIT_ARGS)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(PCBARM)
|
checkAll();
|
||||||
checkLowEEPROM();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
checkTHR();
|
|
||||||
checkSwitches();
|
|
||||||
checkAlarm();
|
checkAlarm();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -682,6 +682,7 @@ void checkLowEEPROM();
|
||||||
void checkTHR();
|
void checkTHR();
|
||||||
void checkSwitches();
|
void checkSwitches();
|
||||||
void checkAlarm();
|
void checkAlarm();
|
||||||
|
void checkAll();
|
||||||
|
|
||||||
#define ADC_VREF_TYPE 0x40 // AVCC with external capacitor at AREF pin
|
#define ADC_VREF_TYPE 0x40 // AVCC with external capacitor at AREF pin
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue