//------------------------------------------------------------------------- // Modify Direction // Error message //------------------------------------------------------------------------- void CFuiWind::ModifyDirection(float m) { float dir = val->GetU() + m; dir = Wrap360(dir); int No = sel->GetSlotNo(); windMAP.ChangeU(No,dir); windBOX.LineRefresh(); errW->SetText(""); return; }
//------------------------------------------------------------------------- // Modify speed //------------------------------------------------------------------------- void CFuiWind::ModifySpeed(float m) { float spd = val->GetV() + m; if (spd < 0) return; if (spd > 80) return; int No = sel->GetSlotNo(); windMAP.ChangeV(No,spd); windBOX.LineRefresh(); errW->SetText(""); return; }
//------------------------------------------------------------------------- // Modify altitude // TODO: Error message //------------------------------------------------------------------------- void CFuiWind::ModifyAltitude(float m) { float alt = val->GetX() + m; if (alt <= altd) return Error("CANNOT OVERLAY LOWER LAYER"); if (alt >= altu) return Error("CANNOT OVERLAY UPPER LAYER"); //----Must change value and refresh --------------- int No = sel->GetSlotNo(); windMAP.ChangeX(No,alt); windBOX.LineRefresh(); errW->SetText(""); return; }