From: Jon S. B. <jb...@us...> - 2007-03-30 04:43:50
|
Update of /cvsroot/jsbsimcommander/src/gui In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv3798/src/gui Modified Files: sensor.h sensor_dlg.cpp Log Message: UPdated/fixed sensor dialog Index: sensor.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/sensor.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sensor.h 23 Feb 2007 13:11:24 -0000 1.3 --- sensor.h 30 Mar 2007 04:43:47 -0000 1.4 *************** *** 51,55 **** --- 51,74 ---- inline double GetNoise(void) const {return noise_variance;} + inline double GetLag(void) const {return lag;} + inline double GetDriftRate(void) const {return drift_rate;} + inline double GetBias(void) const {return bias;} + inline double GetMax(void) const {return max;} + inline double GetMin(void) const {return min;} + inline int GetNoiseType(void) const {return NoiseType;} + inline int GetBits(void) const {return bits;} + inline int GetQuantized(void) const {return quantized;} + inline wxString GetQuantProperty(void) const {return quant_property;} + inline void SetNoise(const double & n) {noise_variance = n;} + inline void SetLag(double t) {lag = t;} + inline void SetDriftRate(double t) {drift_rate = t;} + inline void SetBias(double t) {bias = t;} + inline void SetMax(double t) {max = t;} + inline void SetMin(double t) {min = t;} + inline void SetNoiseType(int t) {NoiseType = t;} + inline void SetBits(int t) {bits = t;} + inline void SetQuantized(int t) {quantized = t;} + inline void SetQuantProperty(wxString t) {quant_property = t;} inline bool GetInputIsInverted(void) {return InputIsInverted;} Index: sensor_dlg.cpp =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/sensor_dlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sensor_dlg.cpp 28 Feb 2007 04:48:44 -0000 1.2 --- sensor_dlg.cpp 30 Mar 2007 04:43:47 -0000 1.3 *************** *** 117,120 **** --- 117,122 ---- do_layout(); // end wxGlade + + GetDataIn(sensor); } *************** *** 185,192 **** } - // wxGlade: add SensorComponentEditor event handlers - void SensorComponentEditor::set_properties() { --- 187,192 ---- *************** *** 351,355 **** void SensorComponentEditor::GetDataIn(Sensor * g) { ! name = g->GetName(); description = g->GetDescription(); order = wxString::Format(wxT("%ld"), g->GetOrder()); --- 351,356 ---- void SensorComponentEditor::GetDataIn(Sensor * g) { ! //name = g->GetName(); ! *text_ctrl_name << g->GetName(); description = g->GetDescription(); order = wxString::Format(wxT("%ld"), g->GetOrder()); *************** *** 374,378 **** wxArrayString inputs = g->GetInputNames(); ! *text_ctrl_output_prop << g->GetOutputName(); if (inputs.GetCount() > 0) { --- 375,379 ---- wxArrayString inputs = g->GetInputNames(); ! text_ctrl_output_prop->SetValue(g->GetOutputName()); if (inputs.GetCount() > 0) { *************** *** 388,394 **** } } ! *text_ctrl_input_prop << inputs[0]; } ! *text_ctrl_1 << g->GetDescription(); } --- 389,406 ---- } } ! text_ctrl_input_prop->SetValue(inputs[0]); } ! text_ctrl_1->SetValue(g->GetDescription()); ! ! radio_box_noise_type->SetSelection(g->GetNoiseType()); ! text_ctrl_2->SetValue(""); *text_ctrl_2 << g->GetNoise(); ! text_ctrl_lag->SetValue(""); *text_ctrl_lag << g->GetLag(); ! text_ctrl_4->SetValue(""); *text_ctrl_4 << g->GetDriftRate(); ! text_ctrl_4_1->SetValue(""); *text_ctrl_4_1 << g->GetBias(); ! text_ctrl_7->SetValue(""); *text_ctrl_7 << g->GetMax(); ! text_ctrl_6->SetValue(""); *text_ctrl_6 << g->GetMin(); ! slider_1->SetValue(g->GetBits()); ! //g->GetQuantized(); ! text_ctrl_5->SetValue(""); *text_ctrl_5 << g->GetQuantProperty(); } *************** *** 399,404 **** void SensorComponentEditor::SetDataOut(Sensor * g) { ! g->SetName(name); ! // g->SetDescription(description); long int tmpl; --- 411,415 ---- void SensorComponentEditor::SetDataOut(Sensor * g) { ! g->SetName(text_ctrl_name->GetValue()); long int tmpl; *************** *** 416,419 **** --- 427,444 ---- if (button_invert_input->GetValue()) // true if inverted g->SetInputIsInverted(true); + + g->SetQuantProperty(text_ctrl_5->GetValue()); + double tmp; + text_ctrl_lag->GetValue().ToDouble(&tmp); + g->SetLag(tmp); + text_ctrl_4->GetValue().ToDouble(&tmp); + g->SetDriftRate(tmp); + text_ctrl_4_1->GetValue().ToDouble(&tmp); + g->SetBias(tmp); + text_ctrl_7->GetValue().ToDouble(&tmp); + g->SetMax(tmp); + text_ctrl_6->GetValue().ToDouble(&tmp); + g->SetMin(tmp); + g->SetNoiseType(radio_box_noise_type->GetSelection()); } |