_suaAlertEnabled = false;
_altAlertEnabled = false;
_minDisplayBrightness = 4;
+ _defaultFirstChar = 'A';
// Mega-hack - hardwire airport town and state names for the FG base area since we don't have any data for these at the moment
// TODO - do this better one day!
bool _suaAlertEnabled; // Alert user to potential SUA entry
bool _altAlertEnabled; // Alert user to min safe alt violation
int _minDisplayBrightness; // Minimum display brightness in low light.
+ char _defaultFirstChar; // Default first waypoint character.
};
#endif // _KLN89_HXX
} else if(appWp) {
ShowScratchpadMessage("Invald", " Add ");
} else {
- if((_wLinePos + 1) > _entWpStr.size()) {
+ if(!_entWpStr.size()) {
+ _entWpStr += _kln89->DecChar(_kln89->_defaultFirstChar, false, true);
+ } else if((_wLinePos + 1) > _entWpStr.size()) {
+ // I don't think we can ever reach this state since I think it only ever applies to the
+ // first char and gets caught by the line above, but it can stay for now just in case.
_entWpStr += '9';
} else {
_entWpStr[_wLinePos] = _kln89->DecChar(_entWpStr[_wLinePos], (_wLinePos == 0 ? false : true));
} else if(appWp) {
ShowScratchpadMessage("Invald", " Add ");
} else {
- if((_wLinePos + 1) > _entWpStr.size()) {
+ if(!_entWpStr.size()) {
+ _entWpStr += _kln89->_defaultFirstChar;
+ } else if((_wLinePos + 1) > _entWpStr.size()) {
+ // I don't think we can ever reach this state since I think it only ever applies to the
+ // first char and gets caught by the line above, but it can stay for now just in case.
_entWpStr += 'A';
} else {
_entWpStr[_wLinePos] = _kln89->IncChar(_entWpStr[_wLinePos], (_wLinePos == 0 ? false : true));
_kln89->DrawText("Character of", 2, 1, 2);
_kln89->DrawText("Wpt identifier", 2, 0, 1);
_kln89->DrawText("Entry:", 2, 3, 0);
+ if(_kln89->_mode == KLN89_MODE_CRSR && _uLinePos == 1) {
+ if(!_kln89->_blink) {
+ _kln89->DrawChar(_kln89->_defaultFirstChar, 2, 10, 0);
+ }
+ _kln89->Underline(2, 10, 0, 1);
+ } else {
+ _kln89->DrawChar(_kln89->_defaultFirstChar, 2, 10, 0);
+ }
break;
case 6:
_kln89->DrawText("NEAREST APT", 2, 1, 3);
_maxULinePos = 1;
break;
case 5:
+ _maxULinePos = 1;
break;
case 6:
_maxULinePos = 2;
}
break;
case 5:
+ if(_uLinePos == 1) {
+ _kln89->_defaultFirstChar = _kln89->DecChar(_kln89->_defaultFirstChar, false, true);
+ }
break;
case 6:
break;
}
break;
case 5:
+ if(_uLinePos == 1) {
+ _kln89->_defaultFirstChar = _kln89->IncChar(_kln89->_defaultFirstChar, false, true);
+ }
break;
case 6:
break;