Skip to content

Commit d6bbc6c

Browse files
committed
Fixed more displayed quantities and units.
1 parent c22c43c commit d6bbc6c

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

Graphs.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3885,7 +3885,8 @@ void __fastcall CGraphs::drawMarkersOnSmithPolarGraph(const int graph, const int
38853885
else
38863886
s[j++] += ", memory " + IntToStr(mem);
38873887
s[j++] = " Freq " + common.freqToStr1(Hz - Hz_nd, true, true, 6, dm) + "Hz";
3888-
s[j++] = " re im " + common.valueToStr(c.real(), false, true, "", true) + " " + common.valueToStr(c.imag(), false, true, "", true);
3888+
if (c.imag()<0) s[j++] = " re im " + common.valueToStr(c.real(), false, true, "", true) + " -j" + common.valueToStr(fabs(c.imag()), false, true, "", true);
3889+
else s[j++] = " re im " + common.valueToStr(c.real(), false, true, "", true) + " +j" + common.valueToStr(fabs(c.imag()), false, true, "", true);
38893890
if (polar)
38903891
{ // polar
38913892
//s[j++].printf(L" R jX %#.4g %cj%#.4g ", imp.real(), (imp.imag() < 0) ? '-' : '+', fabsf(imp.imag()));
@@ -4062,7 +4063,8 @@ void __fastcall CGraphs::drawMouseSmithPolar(const int graph, const int graph_ty
40624063

40634064
s[str_count++] = " Mouse ";
40644065
s[str_count++] = " Freq (CW) " + common.freqToStr1(Hz, true, true, 6, false) + "Hz";
4065-
s[str_count++] = " re im " + common.valueToStr(c.real(), false, true, "", true) + " " + common.valueToStr(c.imag(), false, true, "", true);
4066+
if (c.imag()<0) s[str_count++] = " re im " + common.valueToStr(c.real(), false, true, "", true) + " -j" + common.valueToStr(fabs(c.imag()), false, true, "", true);
4067+
else s[str_count++] = " re im " + common.valueToStr(c.real(), false, true, "", true) + " +j" + common.valueToStr(fabs(c.imag()), false, true, "", true);
40664068
if (polar)
40674069
{ // polar
40684070
s[str_count++] = " R jX " + res_str + " " + ((imp.imag() >= 0) ? "+j" : "-j") + resj_str;
@@ -4153,7 +4155,8 @@ void __fastcall CGraphs::drawMouseSmithPolar(const int graph, const int graph_ty
41534155
else
41544156
s[str_count++].printf(L" Point %d/%u, mem %d", 1 + index, line_points.size(), mem);
41554157
s[str_count++] = " Freq " + common.freqToStr1(Hz, true, true, 6, false) + "Hz";
4156-
s[str_count++] = " re im " + common.valueToStr(c.real(), false, true, "", true) + " " + common.valueToStr(c.imag(), false, true, "", true);
4158+
if (c.imag()<0) s[str_count++] = " re im " + common.valueToStr(c.real(), false, true, "", true) + " -j" + common.valueToStr(fabs(c.imag()), false, true, "", true);
4159+
else s[str_count++] = " re im " + common.valueToStr(c.real(), false, true, "", true) + " +j" + common.valueToStr(fabs(c.imag()), false, true, "", true);
41574160
if (polar)
41584161
{ // polar
41594162
s[str_count++] = " R jX " + res_str + " " + ((imp.imag() >= 0) ? "+j" : "-j") + resj_str;
@@ -9586,7 +9589,7 @@ void __fastcall CGraphs::drawQCS11(const int graph, const int graph_type, const
95869589
if (show_marker_text && settings.showMarkersOnGraph && settings.memoryEnable[m] && draw_on_graph)
95879590
{
95889591
String line_type = (data_unit.m_vna_data.type != UNIT_TYPE_TINYSA) ? "S11 " : "line ";
9589-
drawMarkersOnGraph(graph, m, channel, " Cap", line_type);
9592+
drawMarkersOnGraph(graph, m, channel, " F", line_type);
95909593
draw_on_graph = false;
95919594
}
95929595
}
@@ -9793,7 +9796,7 @@ void __fastcall CGraphs::drawQLS11(const int graph, const int graph_type, const
97939796
if (show_marker_text && settings.showMarkersOnGraph && settings.memoryEnable[m] && draw_on_graph)
97949797
{
97959798
String line_type = (data_unit.m_vna_data.type != UNIT_TYPE_TINYSA) ? "S11 " : "line ";
9796-
drawMarkersOnGraph(graph, m, channel, " Ind", line_type);
9799+
drawMarkersOnGraph(graph, m, channel, " H", line_type);
97979800
draw_on_graph = false;
97989801
}
97999802
}

Unit1.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ void __fastcall TForm1::FormCreate(TObject *Sender)
533533
String windows_ver = common.windowsVer;
534534
String local_name = common.localName;
535535

536-
common.title = Application->Title + " by OneOfEleven et al " + s + " (+OD08) ";
536+
common.title = Application->Title + " by OneOfEleven et al " + s + " (+OD09) ";
537537

538538
this->Caption = common.title;
539539
StatusBar2->Panels->Items[0]->Text = windows_ver + " " + local_name + " '" + String(common.decimalPoint()) + "'";
@@ -2070,11 +2070,11 @@ bool __fastcall TForm1::updateInfoPanel2(const int graph)
20702070
String resp_str = common.valueToStr(resp, false, true).Trim();
20712071
String respj_str = common.valueToStr(resp_j, false, true).Trim();
20722072

2073-
String cap_str = common.valueToStr(cap, false, true).Trim() + "F";
2074-
String capp_str = common.valueToStr(cap_p, false, true).Trim() + "F";
2073+
String cap_str = common.valueToStr(cap, false, true).Trim() + " F";
2074+
String capp_str = common.valueToStr(cap_p, false, true).Trim() + " F";
20752075

2076-
String ind_str = common.valueToStr(ind, false, true).Trim() + "H";
2077-
String indp_str = common.valueToStr(ind_p, false, true).Trim() + "H";
2076+
String ind_str = common.valueToStr(ind, false, true).Trim() + " H";
2077+
String indp_str = common.valueToStr(ind_p, false, true).Trim() + " H";
20782078

20792079
float s11_group_delay_sec;
20802080
float s21_group_delay_sec;
@@ -2156,7 +2156,7 @@ bool __fastcall TForm1::updateInfoPanel2(const int graph)
21562156
s.printf("%0.3f %+0.3f\xb0", s11_mag, s11_phase * rad_2_deg);
21572157
MarkerS11PolarLabel->Caption = s;
21582158

2159-
s = common.valueToStr(s11_group_delay_sec, false, true) + "s";
2159+
s = common.valueToStr(s11_group_delay_sec, false, true) + " s";
21602160
MarkerS11GroupDelayLabel->Caption = s;
21612161

21622162

@@ -2180,7 +2180,7 @@ bool __fastcall TForm1::updateInfoPanel2(const int graph)
21802180
s.printf("%0.3f %+0.3f\xb0", s21_mag, s21_phase * rad_2_deg);
21812181
MarkerS21PolarLabel->Caption = s;
21822182

2183-
s = common.valueToStr(s21_group_delay_sec, false, true) + "s";
2183+
s = common.valueToStr(s21_group_delay_sec, false, true) + " s";
21842184
MarkerS21GroupDelayLabel->Caption = s;
21852185

21862186

@@ -2243,11 +2243,11 @@ bool __fastcall TForm1::updateInfoPanel2(const int graph)
22432243
String resp_str = common.valueToStr(resp, false, true).Trim();
22442244
String respj_str = common.valueToStr(resp_j, false, true).Trim();
22452245

2246-
String cap_str = common.valueToStr(cap, false, true).Trim() + "F";
2247-
String capp_str = common.valueToStr(cap_p, false, true).Trim() + "F";
2246+
String cap_str = common.valueToStr(cap, false, true).Trim() + " F";
2247+
String capp_str = common.valueToStr(cap_p, false, true).Trim() + " F";
22482248

2249-
String ind_str = common.valueToStr(ind, false, true).Trim() + "H";
2250-
String indp_str = common.valueToStr(ind_p, false, true).Trim() + "H";
2249+
String ind_str = common.valueToStr(ind, false, true).Trim() + " H";
2250+
String indp_str = common.valueToStr(ind_p, false, true).Trim() + " H";
22512251

22522252
float s11_group_delay_sec;
22532253
float s21_group_delay_sec;
@@ -2329,7 +2329,7 @@ bool __fastcall TForm1::updateInfoPanel2(const int graph)
23292329
s.printf("%0.3f %+0.3f\xb0", s11_mag, s11_phase * rad_2_deg);
23302330
MarkerS11PolarLabel->Caption = s;
23312331

2332-
s = common.valueToStr(s11_group_delay_sec, false, true) + "s";
2332+
s = common.valueToStr(s11_group_delay_sec, false, true) + " s";
23332333
MarkerS11GroupDelayLabel->Caption = s;
23342334

23352335

0 commit comments

Comments
 (0)