1
0
Fork 0

KLN89: Jump to the next position in the flightplan after waypoint entry, as per the real-life unit

This commit is contained in:
Dave Luff 2010-11-23 16:21:36 +00:00
parent 3ac2f000d2
commit 438cb4a462

View file

@ -711,15 +711,23 @@ void KLN89FplPage::EntPressed() {
_delWp = false; _delWp = false;
// Do we need to re-calc _fplPos here? // Do we need to re-calc _fplPos here?
} else if(_bEntExp) { } else if(_bEntExp) {
// We get here if we have just approved a waypoint review for addition with the ENT button
_bEntWp = false; _bEntWp = false;
_bEntExp = false; _bEntExp = false;
_entWp = NULL; // DON'T delete it! - it's been pushed onto the waypoint list at this point. _entWp = NULL; // DON'T delete it! - it's been pushed onto the waypoint list at this point.
_entWpStr.clear(); _entWpStr.clear();
_kln89->_cleanUpPage = -1; _kln89->_cleanUpPage = -1;
_wLinePos = 0; _wLinePos = 0;
// TODO - in actual fact the previously underlined waypoint stays in the same position and underlined // The cursor should be moved either to the next waypoint in the list, or to the empty position at
// in some or possibly all circumstances - need to check this out and match it, but not too important // the end of the list if the waypoint just entered was the last one in the list. Unfortunately
// for now. // that means that we have to deal with the horrible _uLinePos / _fplPos interaction yet again :-(
if(_uLinePos == 4) {
// We can't handle this case by calling K1R1, since we want to jump the field type
_uLinePos = 5;
} else {
// Just call Knob1Right1 and let that handle the horrible logic :-)
Knob1Right1();
}
} else if(_bEntWp) { } else if(_bEntWp) {
if(_entWp != NULL) { if(_entWp != NULL) {
// TODO - should be able to get rid of this switch I think and use the enum values. // TODO - should be able to get rid of this switch I think and use the enum values.