[Taranis] Altitude bug fixes

[Taranis] Curves presets bug fix
This commit is contained in:
bsongis@gmail.com
2013-08-28 20:21:23 +00:00
parent 3f036e38b5
commit 2db13ce1a4
5 changed files with 19 additions and 3 deletions
+3 -2
View File
@@ -324,8 +324,8 @@ void onModelSelectMenu(const char *result)
void menuModelSelect(uint8_t event)
{
if (s_warning_result) {
eeDeleteModel(m_posVert); // delete file
s_warning_result = 0;
eeDeleteModel(m_posVert); // delete file
s_copyMode = 0;
event = EVT_ENTRY_UP;
}
@@ -2248,6 +2248,7 @@ void displayPresetChoice(uint8_t event)
lcd_putcAtt(lcdLastPos, WARNING_LINE_Y, '@', INVERS);
if (s_warning_result) {
s_warning_result = 0;
CurveInfo crv = curveInfo(s_curveChan);
for (uint8_t i=0; i<crv.points; i++)
crv.crv[i] = (i-(crv.points/2)) * s_warning_input_value * 50 / (crv.points-1);
@@ -3485,9 +3486,9 @@ void menuModelLimits(uint8_t event)
#endif
if (s_warning_result) {
s_warning_result = 0;
LimitData *ld = limitAddress(sub);
ld->revert = !ld->revert;
s_warning_result = 0;
eeDirty(EE_MODEL);
}