This commit is contained in:
Kurt Moraw
2020-12-19 22:46:34 +01:00
parent f557132b02
commit 63fb166ac6
119 changed files with 5966 additions and 581 deletions
+133 -61
View File
@@ -47,7 +47,6 @@
this.rtb = new System.Windows.Forms.RichTextBox();
this.tabPage_image = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.Panel();
this.label_nextimage = new System.Windows.Forms.Label();
this.cb_loop = new System.Windows.Forms.CheckBox();
this.bt_rximages = new System.Windows.Forms.Button();
this.button_loadimage = new System.Windows.Forms.Button();
@@ -119,10 +118,14 @@
this.cb_audioCAP = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.tb_recintro = new System.Windows.Forms.TextBox();
this.bt_astop = new System.Windows.Forms.Button();
this.bt_aplay = new System.Windows.Forms.Button();
this.bt_arecord = new System.Windows.Forms.Button();
this.cb_sendIntro = new System.Windows.Forms.CheckBox();
this.cb_stampinfo = new System.Windows.Forms.CheckBox();
this.tb_info = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.textBox5 = new System.Windows.Forms.TextBox();
this.cb_announcement = new System.Windows.Forms.ComboBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
@@ -145,6 +148,7 @@
this.progressBar_fifo = new oscardata.KmProgressBar();
this.vu_cap = new oscardata.KmProgressBar();
this.vu_pb = new oscardata.KmProgressBar();
this.lb_rec = new System.Windows.Forms.Label();
this.statusStrip1.SuspendLayout();
this.tabPage_ber.SuspendLayout();
this.tabPage_image.SuspendLayout();
@@ -227,7 +231,7 @@
//
// panel_constel
//
this.panel_constel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(220)))));
this.panel_constel.BackColor = System.Drawing.Color.AliceBlue;
this.panel_constel.Location = new System.Drawing.Point(11, 590);
this.panel_constel.Name = "panel_constel";
this.panel_constel.Size = new System.Drawing.Size(75, 75);
@@ -245,12 +249,13 @@
this.panel_txspectrum.BackColor = System.Drawing.SystemColors.ControlLight;
this.panel_txspectrum.Location = new System.Drawing.Point(92, 590);
this.panel_txspectrum.Name = "panel_txspectrum";
this.panel_txspectrum.Size = new System.Drawing.Size(441, 76);
this.panel_txspectrum.Size = new System.Drawing.Size(442, 76);
this.panel_txspectrum.TabIndex = 6;
this.panel_txspectrum.Paint += new System.Windows.Forms.PaintEventHandler(this.panel_txspectrum_Paint);
//
// tabPage_ber
//
this.tabPage_ber.BackColor = System.Drawing.Color.Transparent;
this.tabPage_ber.Controls.Add(this.button_stopBERtest);
this.tabPage_ber.Controls.Add(this.button_startBERtest);
this.tabPage_ber.Controls.Add(this.rtb);
@@ -261,7 +266,6 @@
this.tabPage_ber.Size = new System.Drawing.Size(1291, 552);
this.tabPage_ber.TabIndex = 0;
this.tabPage_ber.Text = "BER Test";
this.tabPage_ber.UseVisualStyleBackColor = true;
//
// button_stopBERtest
//
@@ -320,6 +324,7 @@
//
// tabPage_image
//
this.tabPage_image.BackColor = System.Drawing.Color.Transparent;
this.tabPage_image.Controls.Add(this.groupBox1);
this.tabPage_image.Controls.Add(this.label_rximage);
this.tabPage_image.Controls.Add(this.label_tximage);
@@ -332,11 +337,9 @@
this.tabPage_image.Size = new System.Drawing.Size(1291, 552);
this.tabPage_image.TabIndex = 1;
this.tabPage_image.Text = "Image";
this.tabPage_image.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label_nextimage);
this.groupBox1.Controls.Add(this.cb_loop);
this.groupBox1.Controls.Add(this.bt_rximages);
this.groupBox1.Controls.Add(this.button_loadimage);
@@ -350,15 +353,6 @@
this.groupBox1.Size = new System.Drawing.Size(1277, 42);
this.groupBox1.TabIndex = 12;
//
// label_nextimage
//
this.label_nextimage.AutoSize = true;
this.label_nextimage.Location = new System.Drawing.Point(641, 19);
this.label_nextimage.Name = "label_nextimage";
this.label_nextimage.Size = new System.Drawing.Size(81, 13);
this.label_nextimage.TabIndex = 12;
this.label_nextimage.Text = "next image in ...";
//
// cb_loop
//
this.cb_loop.AutoSize = true;
@@ -483,7 +477,7 @@
//
// pictureBox_rximage
//
this.pictureBox_rximage.BackgroundImage = global::oscardata.Properties.Resources.hintergrundxcf;
this.pictureBox_rximage.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox_rximage.BackgroundImage")));
this.pictureBox_rximage.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.pictureBox_rximage.Location = new System.Drawing.Point(642, 27);
this.pictureBox_rximage.Name = "pictureBox_rximage";
@@ -494,7 +488,7 @@
//
// pictureBox_tximage
//
this.pictureBox_tximage.BackgroundImage = global::oscardata.Properties.Resources.hintergrundxcf;
this.pictureBox_tximage.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox_tximage.BackgroundImage")));
this.pictureBox_tximage.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.pictureBox_tximage.Location = new System.Drawing.Point(1, 27);
this.pictureBox_tximage.Name = "pictureBox_tximage";
@@ -519,6 +513,7 @@
//
// tabPage_file
//
this.tabPage_file.BackColor = System.Drawing.Color.Transparent;
this.tabPage_file.Controls.Add(this.pictureBox1);
this.tabPage_file.Controls.Add(this.button2);
this.tabPage_file.Controls.Add(this.bt_openrxfile);
@@ -536,11 +531,10 @@
this.tabPage_file.Size = new System.Drawing.Size(1291, 552);
this.tabPage_file.TabIndex = 2;
this.tabPage_file.Text = "File";
this.tabPage_file.UseVisualStyleBackColor = true;
//
// pictureBox1
//
this.pictureBox1.BackgroundImage = global::oscardata.Properties.Resources.text_big;
this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.pictureBox1.Location = new System.Drawing.Point(17, 371);
this.pictureBox1.Name = "pictureBox1";
@@ -669,6 +663,7 @@
//
// tabPage_audio
//
this.tabPage_audio.BackColor = System.Drawing.Color.Transparent;
this.tabPage_audio.Controls.Add(this.groupBox7);
this.tabPage_audio.Controls.Add(this.groupBox6);
this.tabPage_audio.Controls.Add(this.groupBox5);
@@ -678,7 +673,6 @@
this.tabPage_audio.Size = new System.Drawing.Size(1291, 552);
this.tabPage_audio.TabIndex = 5;
this.tabPage_audio.Text = "Voice Audio";
this.tabPage_audio.UseVisualStyleBackColor = true;
//
// groupBox7
//
@@ -695,16 +689,18 @@
// rb_codec2
//
this.rb_codec2.AutoSize = true;
this.rb_codec2.Checked = true;
this.rb_codec2.Location = new System.Drawing.Point(92, 50);
this.rb_codec2.Name = "rb_codec2";
this.rb_codec2.Size = new System.Drawing.Size(342, 17);
this.rb_codec2.Size = new System.Drawing.Size(427, 17);
this.rb_codec2.TabIndex = 23;
this.rb_codec2.Text = "CODEC-2 parametric audio codec. For QPSK. Audio rate: 3200 bps";
this.rb_codec2.TabStop = true;
this.rb_codec2.Text = "CODEC-2 parametric audio codec. For BPSK/QPSK. Audio rate: 700/1600/3200 bps";
this.rb_codec2.UseVisualStyleBackColor = true;
//
// pictureBox2
//
this.pictureBox2.BackgroundImage = global::oscardata.Properties.Resources.voice_big;
this.pictureBox2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox2.BackgroundImage")));
this.pictureBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pictureBox2.Location = new System.Drawing.Point(6, 13);
this.pictureBox2.Name = "pictureBox2";
@@ -715,13 +711,11 @@
// rb_opus
//
this.rb_opus.AutoSize = true;
this.rb_opus.Checked = true;
this.rb_opus.Location = new System.Drawing.Point(92, 27);
this.rb_opus.Name = "rb_opus";
this.rb_opus.Size = new System.Drawing.Size(348, 17);
this.rb_opus.Size = new System.Drawing.Size(345, 17);
this.rb_opus.TabIndex = 0;
this.rb_opus.TabStop = true;
this.rb_opus.Text = "OPUS rate adaptive codec. For 8APSK. Audio rate: 84% of data rate";
this.rb_opus.Text = "OPUS rate adaptive codec. For 8APSK. Audio rate: 4600..6000 bps";
this.rb_opus.UseVisualStyleBackColor = true;
//
// groupBox6
@@ -825,7 +819,7 @@
//
// pb_voiceCAPstatus
//
this.pb_voiceCAPstatus.BackgroundImage = global::oscardata.Properties.Resources.ok;
this.pb_voiceCAPstatus.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pb_voiceCAPstatus.BackgroundImage")));
this.pb_voiceCAPstatus.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pb_voiceCAPstatus.Location = new System.Drawing.Point(387, 58);
this.pb_voiceCAPstatus.Name = "pb_voiceCAPstatus";
@@ -835,7 +829,7 @@
//
// pb_voicePBstatus
//
this.pb_voicePBstatus.BackgroundImage = global::oscardata.Properties.Resources.ok;
this.pb_voicePBstatus.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pb_voicePBstatus.BackgroundImage")));
this.pb_voicePBstatus.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pb_voicePBstatus.Location = new System.Drawing.Point(387, 25);
this.pb_voicePBstatus.Name = "pb_voicePBstatus";
@@ -927,6 +921,7 @@
//
// tabPage_setup
//
this.tabPage_setup.BackColor = System.Drawing.Color.Transparent;
this.tabPage_setup.Controls.Add(this.groupBox4);
this.tabPage_setup.Controls.Add(this.groupBox3);
this.tabPage_setup.Controls.Add(this.groupBox2);
@@ -936,7 +931,6 @@
this.tabPage_setup.Size = new System.Drawing.Size(1291, 552);
this.tabPage_setup.TabIndex = 4;
this.tabPage_setup.Text = "Setup";
this.tabPage_setup.UseVisualStyleBackColor = true;
//
// groupBox4
//
@@ -949,7 +943,7 @@
this.groupBox4.Controls.Add(this.tb_shutdown);
this.groupBox4.Controls.Add(this.bt_resetmodem);
this.groupBox4.Controls.Add(this.textBox3);
this.groupBox4.Location = new System.Drawing.Point(12, 259);
this.groupBox4.Location = new System.Drawing.Point(12, 257);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(674, 121);
this.groupBox4.TabIndex = 15;
@@ -1025,6 +1019,7 @@
//
// tb_shutdown
//
this.tb_shutdown.BackColor = System.Drawing.SystemColors.Control;
this.tb_shutdown.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.tb_shutdown.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tb_shutdown.ForeColor = System.Drawing.Color.Red;
@@ -1043,11 +1038,11 @@
this.bt_resetmodem.TabIndex = 6;
this.bt_resetmodem.Text = "Reset RX Modem";
this.bt_resetmodem.UseVisualStyleBackColor = true;
this.bt_resetmodem.Visible = false;
this.bt_resetmodem.Click += new System.EventHandler(this.bt_resetmodem_Click);
//
// textBox3
//
this.textBox3.BackColor = System.Drawing.SystemColors.Control;
this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox3.ForeColor = System.Drawing.Color.Black;
@@ -1072,7 +1067,7 @@
this.groupBox3.Controls.Add(this.label3);
this.groupBox3.Controls.Add(this.cb_audioCAP);
this.groupBox3.Controls.Add(this.label4);
this.groupBox3.Location = new System.Drawing.Point(12, 146);
this.groupBox3.Location = new System.Drawing.Point(12, 144);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(674, 107);
this.groupBox3.TabIndex = 14;
@@ -1081,7 +1076,7 @@
//
// pb_audioCAPstatus
//
this.pb_audioCAPstatus.BackgroundImage = global::oscardata.Properties.Resources.ok;
this.pb_audioCAPstatus.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pb_audioCAPstatus.BackgroundImage")));
this.pb_audioCAPstatus.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pb_audioCAPstatus.Location = new System.Drawing.Point(375, 63);
this.pb_audioCAPstatus.Name = "pb_audioCAPstatus";
@@ -1091,7 +1086,7 @@
//
// pb_audioPBstatus
//
this.pb_audioPBstatus.BackgroundImage = global::oscardata.Properties.Resources.ok;
this.pb_audioPBstatus.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pb_audioPBstatus.BackgroundImage")));
this.pb_audioPBstatus.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pb_audioPBstatus.Location = new System.Drawing.Point(375, 19);
this.pb_audioPBstatus.Name = "pb_audioPBstatus";
@@ -1185,10 +1180,15 @@
//
// groupBox2
//
this.groupBox2.Controls.Add(this.lb_rec);
this.groupBox2.Controls.Add(this.tb_recintro);
this.groupBox2.Controls.Add(this.bt_astop);
this.groupBox2.Controls.Add(this.bt_aplay);
this.groupBox2.Controls.Add(this.bt_arecord);
this.groupBox2.Controls.Add(this.cb_sendIntro);
this.groupBox2.Controls.Add(this.cb_stampinfo);
this.groupBox2.Controls.Add(this.tb_info);
this.groupBox2.Controls.Add(this.label7);
this.groupBox2.Controls.Add(this.textBox5);
this.groupBox2.Controls.Add(this.cb_announcement);
this.groupBox2.Controls.Add(this.textBox4);
this.groupBox2.Controls.Add(this.textBox1);
@@ -1197,17 +1197,81 @@
this.groupBox2.Controls.Add(this.cb_stampcall);
this.groupBox2.Location = new System.Drawing.Point(12, 13);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(674, 126);
this.groupBox2.Size = new System.Drawing.Size(674, 127);
this.groupBox2.TabIndex = 13;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Personal Settings";
//
// tb_recintro
//
this.tb_recintro.BackColor = System.Drawing.SystemColors.Control;
this.tb_recintro.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.tb_recintro.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tb_recintro.ForeColor = System.Drawing.Color.Black;
this.tb_recintro.Location = new System.Drawing.Point(256, 100);
this.tb_recintro.Multiline = true;
this.tb_recintro.Name = "tb_recintro";
this.tb_recintro.Size = new System.Drawing.Size(121, 19);
this.tb_recintro.TabIndex = 28;
this.tb_recintro.Text = "record intro audio:";
//
// bt_astop
//
this.bt_astop.BackgroundImage = global::oscardata.Properties.Resources.stopplay;
this.bt_astop.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.bt_astop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.bt_astop.ForeColor = System.Drawing.SystemColors.Control;
this.bt_astop.Location = new System.Drawing.Point(449, 89);
this.bt_astop.Name = "bt_astop";
this.bt_astop.Size = new System.Drawing.Size(32, 36);
this.bt_astop.TabIndex = 27;
this.bt_astop.UseVisualStyleBackColor = true;
this.bt_astop.Click += new System.EventHandler(this.bt_astop_Click);
//
// bt_aplay
//
this.bt_aplay.BackgroundImage = global::oscardata.Properties.Resources.playback;
this.bt_aplay.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.bt_aplay.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.bt_aplay.ForeColor = System.Drawing.SystemColors.Control;
this.bt_aplay.Location = new System.Drawing.Point(411, 89);
this.bt_aplay.Name = "bt_aplay";
this.bt_aplay.Size = new System.Drawing.Size(32, 36);
this.bt_aplay.TabIndex = 26;
this.bt_aplay.UseVisualStyleBackColor = true;
this.bt_aplay.Click += new System.EventHandler(this.bt_aplay_Click);
//
// bt_arecord
//
this.bt_arecord.BackgroundImage = global::oscardata.Properties.Resources.record;
this.bt_arecord.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.bt_arecord.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.bt_arecord.ForeColor = System.Drawing.SystemColors.Control;
this.bt_arecord.Location = new System.Drawing.Point(373, 89);
this.bt_arecord.Name = "bt_arecord";
this.bt_arecord.Size = new System.Drawing.Size(32, 36);
this.bt_arecord.TabIndex = 25;
this.bt_arecord.UseVisualStyleBackColor = true;
this.bt_arecord.Click += new System.EventHandler(this.bt_arecord_Click);
//
// cb_sendIntro
//
this.cb_sendIntro.AutoSize = true;
this.cb_sendIntro.Checked = true;
this.cb_sendIntro.CheckState = System.Windows.Forms.CheckState.Checked;
this.cb_sendIntro.Location = new System.Drawing.Point(71, 104);
this.cb_sendIntro.Name = "cb_sendIntro";
this.cb_sendIntro.Size = new System.Drawing.Size(105, 17);
this.cb_sendIntro.TabIndex = 24;
this.cb_sendIntro.Text = "Send Intro Audio";
this.cb_sendIntro.UseVisualStyleBackColor = true;
//
// cb_stampinfo
//
this.cb_stampinfo.AutoSize = true;
this.cb_stampinfo.Checked = true;
this.cb_stampinfo.CheckState = System.Windows.Forms.CheckState.Checked;
this.cb_stampinfo.Location = new System.Drawing.Point(71, 82);
this.cb_stampinfo.Location = new System.Drawing.Point(71, 84);
this.cb_stampinfo.Name = "cb_stampinfo";
this.cb_stampinfo.Size = new System.Drawing.Size(128, 17);
this.cb_stampinfo.TabIndex = 23;
@@ -1231,18 +1295,6 @@
this.label7.TabIndex = 21;
this.label7.Text = "Info:";
//
// textBox5
//
this.textBox5.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox5.ForeColor = System.Drawing.Color.Black;
this.textBox5.Location = new System.Drawing.Point(261, 92);
this.textBox5.Multiline = true;
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(34, 19);
this.textBox5.TabIndex = 20;
this.textBox5.Text = "every";
//
// cb_announcement
//
this.cb_announcement.FormattingEnabled = true;
@@ -1258,7 +1310,7 @@
"8",
"9",
"10"});
this.cb_announcement.Location = new System.Drawing.Point(296, 90);
this.cb_announcement.Location = new System.Drawing.Point(453, 60);
this.cb_announcement.Name = "cb_announcement";
this.cb_announcement.Size = new System.Drawing.Size(56, 21);
this.cb_announcement.TabIndex = 19;
@@ -1266,10 +1318,11 @@
//
// textBox4
//
this.textBox4.BackColor = System.Drawing.SystemColors.Control;
this.textBox4.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox4.ForeColor = System.Drawing.Color.Black;
this.textBox4.Location = new System.Drawing.Point(361, 92);
this.textBox4.Location = new System.Drawing.Point(518, 62);
this.textBox4.Multiline = true;
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(75, 19);
@@ -1278,15 +1331,16 @@
//
// textBox1
//
this.textBox1.BackColor = System.Drawing.SystemColors.Control;
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox1.ForeColor = System.Drawing.Color.Black;
this.textBox1.Location = new System.Drawing.Point(259, 68);
this.textBox1.Location = new System.Drawing.Point(259, 64);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(253, 19);
this.textBox1.Size = new System.Drawing.Size(196, 19);
this.textBox1.TabIndex = 17;
this.textBox1.Text = "send announcement before pic/file transfer";
this.textBox1.Text = "send announcement before TX every";
//
// tb_callsign
//
@@ -1341,6 +1395,8 @@
//
this.cb_speed.FormattingEnabled = true;
this.cb_speed.Items.AddRange(new object[] {
"1200 BPSK BW: 1300 Hz",
"2400 BPSK BW: 2500 Hz",
"3000 QPSK BW: 1700 Hz ",
"4000 QPSK BW: 2400 Hz ",
"4410 QPSK BW: 2500 Hz (QO-100 Standard)",
@@ -1418,7 +1474,7 @@
//
// pb_rxsync
//
this.pb_rxsync.BackgroundImage = global::oscardata.Properties.Resources.redmarker;
this.pb_rxsync.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pb_rxsync.BackgroundImage")));
this.pb_rxsync.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pb_rxsync.Location = new System.Drawing.Point(1155, 636);
this.pb_rxsync.Name = "pb_rxsync";
@@ -1428,7 +1484,7 @@
//
// pb_rxsignal
//
this.pb_rxsignal.BackgroundImage = global::oscardata.Properties.Resources.redmarker;
this.pb_rxsignal.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pb_rxsignal.BackgroundImage")));
this.pb_rxsignal.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pb_rxsignal.Location = new System.Drawing.Point(1047, 636);
this.pb_rxsignal.Name = "pb_rxsignal";
@@ -1471,10 +1527,22 @@
this.vu_pb.Size = new System.Drawing.Size(100, 10);
this.vu_pb.TabIndex = 19;
//
// lb_rec
//
this.lb_rec.AutoSize = true;
this.lb_rec.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_rec.ForeColor = System.Drawing.Color.Red;
this.lb_rec.Location = new System.Drawing.Point(498, 101);
this.lb_rec.Name = "lb_rec";
this.lb_rec.Size = new System.Drawing.Size(23, 13);
this.lb_rec.TabIndex = 29;
this.lb_rec.Text = "....";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(1293, 691);
this.Controls.Add(this.lb_rxsync);
this.Controls.Add(this.pb_rxsync);
@@ -1494,7 +1562,7 @@
this.ForeColor = System.Drawing.SystemColors.ControlText;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1";
this.Text = "AMSAT-DL Multimedia HS Modem V0.51 by DJ0ABR";
this.Text = "AMSAT-DL Multimedia HS Modem V0.52 by DJ0ABR";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
@@ -1584,7 +1652,6 @@
private System.Windows.Forms.Button bt_rximages;
private System.Windows.Forms.Button bt_openrxfile;
private System.Windows.Forms.CheckBox cb_loop;
private System.Windows.Forms.Label label_nextimage;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.TabPage tabPage_setup;
private System.Windows.Forms.TextBox tb_callsign;
@@ -1607,7 +1674,6 @@
private KmProgressBar progressBar_fifo;
private System.Windows.Forms.Label label_fifo;
private System.Windows.Forms.CheckBox cb_autostart;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.ComboBox cb_announcement;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox1;
@@ -1658,6 +1724,12 @@
private KmProgressBar vu_cap;
private KmProgressBar vu_pb;
private System.Windows.Forms.ToolStripStatusLabel toolStrip_Type;
private System.Windows.Forms.CheckBox cb_sendIntro;
private System.Windows.Forms.Button bt_arecord;
private System.Windows.Forms.Button bt_astop;
private System.Windows.Forms.Button bt_aplay;
private System.Windows.Forms.TextBox tb_recintro;
private System.Windows.Forms.Label lb_rec;
}
}
+145 -176
View File
@@ -27,7 +27,6 @@ using System.Windows.Forms;
using System.Drawing;
using System.Text;
using System.IO;
using System.Drawing.Drawing2D;
using System.Diagnostics;
using System.Threading;
using oscardata.Properties;
@@ -47,6 +46,8 @@ namespace oscardata
receivefile recfile = new receivefile();
int last_initAudioStatus;
int last_initVoiceStatus;
int recordStatus = 0;
int recPhase = 0;
public Form1()
{
@@ -60,6 +61,9 @@ namespace oscardata
bmp = new Bitmap(Resources.hintergrundxcf);
pictureBox_tximage.BackgroundImage = bmp;
statics.WindowBackColor = Form1.DefaultBackColor;
lb_rec.Visible = false;
// if this program was started from another loacation
// set the working directory to the path of the .exe file
// so it can find hsmodem(.exe)
@@ -115,7 +119,6 @@ namespace oscardata
}
// TX timer
int loopdelay = 0;
private void timer1_Tick(object sender, EventArgs e)
{
// BER testdata
@@ -172,28 +175,15 @@ namespace oscardata
// check if we are ready with any transmission
if (ArraySend.getSending() == false)
{
// this timer runs with 10ms
// after an image was finished, wait before starting the new one
// this helps cleaning any buffer
int spacetime = 20000; // ms
label_nextimage.Text = langstr[0] + ((spacetime / timer_udpTX.Interval - loopdelay) / 10).ToString() + " s";
if (++loopdelay > (spacetime / timer_udpTX.Interval))
// transmission is finished, wait until data in TXfifo have been sent
if (statics.PBfifousage < 2)
{
// start sending a new picture
startNextImage();
}
}
else
{
loopdelay = 0;
label_nextimage.Text = langstr[1];
}
}
else
label_nextimage.Text = "";
}
else
label_nextimage.Text = "";
if (ts_ip.Text.Contains("?") || ts_ip.Text.Contains("1.2.3.4") || old_tsip != statics.ModemIP)
{
@@ -507,15 +497,15 @@ namespace oscardata
// Binary file received, show statistics in window
try
{
printText(rtb_RXfile, langstr[2]);
printText(rtb_RXfile, statics.langstr[2]);
printText(rtb_RXfile, "--------------------\r\n\r\n");
printText(rtb_RXfile, langstr[3] + ((int)recfile.runtime.TotalSeconds).ToString() + " seconds" + "\r\n\r\n");
printText(rtb_RXfile, langstr[4] + ((int)(recfile.filesize * 8 / recfile.runtime.TotalSeconds)).ToString() + " bit/s" + "\r\n\r\n");
printText(rtb_RXfile, langstr[5] + recfile.filesize + " byte\r\n\r\n");
printText(rtb_RXfile, langstr[6] + recfile.filename + "\r\n\r\n");
printText(rtb_RXfile, statics.langstr[3] + ((int)recfile.runtime.TotalSeconds).ToString() + " seconds" + "\r\n\r\n");
printText(rtb_RXfile, statics.langstr[4] + ((int)(recfile.filesize * 8 / recfile.runtime.TotalSeconds)).ToString() + " bit/s" + "\r\n\r\n");
printText(rtb_RXfile, statics.langstr[5] + recfile.filesize + " byte\r\n\r\n");
printText(rtb_RXfile, statics.langstr[6] + recfile.filename + "\r\n\r\n");
if (recfile.filename.Length <= 1)
{
printText(rtb_RXfile, langstr[7]);
printText(rtb_RXfile, statics.langstr[7]);
}
}
catch
@@ -540,21 +530,21 @@ namespace oscardata
void printBadBlocks()
{
rtb_RXfile.Text = "";
printText(rtb_RXfile, langstr[2]);
printText(rtb_RXfile, statics.langstr[2]);
printText(rtb_RXfile, "--------------------\r\n\r\n");
printText(rtb_RXfile, langstr[31] + "\r\n\r\n");
printText(rtb_RXfile, statics.langstr[31] + "\r\n\r\n");
int[] d = new int[2];
recfile.oldblockinfo(d);
int failed = d[0] - d[1];
String s = "\n" + langstr[25] +
String s = "\n" + statics.langstr[25] +
"-------------------\n" +
"total : " + (d[0]+1) + "\n" +
langstr[26] + (d[1]+1) + "\n" +
langstr[27] + failed + "\n";
statics.langstr[26] + (d[1]+1) + "\n" +
statics.langstr[27] + failed + "\n";
printText(rtb_RXfile, s + "\r\n\r\n");
printText(rtb_RXfile, langstr[32] + ": " + recfile.missingBlockString());
printText(rtb_RXfile, statics.langstr[32] + ": " + recfile.missingBlockString());
}
private void OpenUrl(string url)
@@ -596,7 +586,7 @@ namespace oscardata
if (statics.CAPfifousage > 50) progressBar_capfifo.ForeColor = Color.Red; else progressBar_capfifo.ForeColor = Color.Green;
// Show RX Status LEDs
if (statics.RXlevelDetected == 1)
if (statics.RXlevelDetected == 1 || statics.RXinSync == 1)
{
pb_rxsignal.BackgroundImage = Resources.greenmarker;
}
@@ -605,7 +595,7 @@ namespace oscardata
pb_rxsignal.BackgroundImage = Resources.redmarker;
showType(-1);
}
if (statics.RXinSync == 1 && statics.RXlevelDetected == 1) pb_rxsync.BackgroundImage = Resources.greenmarker; else pb_rxsync.BackgroundImage = Resources.redmarker;
if (statics.RXinSync == 1) pb_rxsync.BackgroundImage = Resources.greenmarker; else pb_rxsync.BackgroundImage = Resources.redmarker;
// update rx,tx level progress bar
int factor = 1;
@@ -632,6 +622,20 @@ namespace oscardata
vu_pb.ForeColor = Color.Red;
else
vu_pb.ForeColor = Color.Yellow;
if (recordStatus == 1)
{
lb_rec.Visible = true;
recPhase = 1 - recPhase;
if (recPhase == 1)
lb_rec.Text = "REC";
else
lb_rec.Text = "";
}
else
{
lb_rec.Visible = false;
}
}
private void panel_constel_Paint(object sender, PaintEventArgs e)
@@ -639,104 +643,31 @@ namespace oscardata
Bitmap bm = Udp.UdpBitmap();
if (bm != null)
{
Pen pen = new Pen(Brushes.LightGray);
e.Graphics.DrawEllipse(pen, 0, 0, panel_constel.Size.Width - 1, panel_constel.Size.Height - 1);
e.Graphics.DrawLine(pen, panel_constel.Size.Width / 2, 0, panel_constel.Size.Width / 2, panel_constel.Size.Height);
e.Graphics.DrawLine(pen, 0, panel_constel.Size.Height / 2, panel_constel.Size.Width, panel_constel.Size.Height / 2);
e.Graphics.DrawImage(bm, 0, 0);
bm.Dispose();
}
}
static Brush brred = new SolidBrush(Color.FromArgb(255, (byte)255, (byte)220, (byte)220));
static Brush brred = new SolidBrush(Color.FromArgb(255, (byte)255, (byte)240, (byte)240));
static Brush brgreen = new SolidBrush(Color.FromArgb(255, (byte)240, (byte)255, (byte)240));
static Brush brgray = new SolidBrush(Color.FromArgb(255, (byte)220, (byte)220, (byte)220));
static Pen pen = new Pen(Brushes.Black);
static Pen penblue = new Pen(Brushes.Blue, 1);
static Pen penred = new Pen(Brushes.Red, 1);
static Pen pengrey = new Pen(brgray, 1);
static Pen pendarkgrey = new Pen(brgray, 1);
Font fnt = new Font("Verdana", 8.0f);
Font smallfnt = new Font("Verdana", 6.0f);
private void panel_txspectrum_Paint(object sender, PaintEventArgs e)
{
int miny = 200;
int maxy = 2800;
// horizontal level markers
Point ps = GetFFTPos(0, 0);
Point pe = GetFFTPos(maxxval, maxyval);
int pw = pe.X - ps.X;
int ph = ps.Y - pe.Y;
e.Graphics.FillRectangle(brred, ps.X, pe.Y, pw, ph);
ps = GetFFTPos(miny/10, 700);
pe = GetFFTPos(maxy/10, 2300);
pw = pe.X - ps.X;
ph = ps.Y - pe.Y;
e.Graphics.FillRectangle(brgreen, ps.X, pe.Y, pw, ph);
// Coordinates
e.Graphics.DrawLine(pen, GetFFTPos(0, 0), GetFFTPos(maxxval, 0));
e.Graphics.DrawLine(pen, GetFFTPos(0, 0), GetFFTPos(0, maxyval));
// vertical frequency markers for 2.7kHz
for (int i = miny; i <= maxy; i+=100)
Bitmap bm = Udp.UdpFftBitmap();
if (bm != null)
{
e.Graphics.DrawLine(pengrey, GetFFTPos(i / 10, 0), GetFFTPos(i / 10, maxyval));
e.Graphics.DrawImage(bm, 0, 0);
bm.Dispose();
}
// Title
e.Graphics.DrawString(langstr[8], fnt, Brushes.Black, GetFFTPos(110, 3000));
e.Graphics.DrawString(miny.ToString() + " Hz", smallfnt, Brushes.Black, GetFFTPos(5, 2800));
e.Graphics.DrawString("1500 Hz", smallfnt, Brushes.Black, GetFFTPos(138, 680));
e.Graphics.DrawString(maxy.ToString() + " Hz", smallfnt, Brushes.Black, GetFFTPos(270, 2800));
e.Graphics.DrawString(langstr[9], smallfnt, Brushes.Black, GetFFTPos(290, 1000));
e.Graphics.DrawString("max", smallfnt, Brushes.Black, GetFFTPos(290, 2450));
while (true)
{
UInt16[] da = Udp.UdpGetFFT();
if (da == null) break;
if (da.Length < maxxval) return;
Fftmean(da);
}
// da are the FFT data
// from 0 Hz to 4410 Hz with a resolution of 10 Hz
// so we get 441 values
// there may be 442, just ignore the last one
GraphicsPath gp = new GraphicsPath();
// calculate mean value and calc mean value over all values
UInt16[] su = new UInt16[maxxval+1];
for (int i = 0; i < maxxval; i++)
{
su[i] = 0;
for(int j=0; j< meansize; j++)
su[i] += dam[j, i];
su[i] /= (UInt16)meansize;
}
// scale and X-mean
int lastu = 0;
for (int i = 0; i < maxxval; i++)
{
UInt16 u = 0;
if (i >= 2 && i < maxxval - 2)
u = (UInt16)((su[i - 2] + su[i - 1] + su[i] + su[i + 1] + su[i + 2]) / 5);
else
u = su[i];
if (i < 3) u = 0;
u *= 10;
gp.AddLine(GetFFTPos(i, lastu), GetFFTPos(i + 1, u));
lastu = u;
}
e.Graphics.DrawPath(penblue, gp);
return;
}
private UInt16[,] dam = new UInt16[meansize, maxxval];
@@ -882,9 +813,9 @@ namespace oscardata
void ShowTXstatus()
{
if(txcommand == statics.Image)
label_tximage.Text = langstr[10] + TXRealFilename + langstr[11] + (ArraySend.txpos / 1000).ToString() + langstr[30] + (TXRealFileSize / 1000).ToString() + " kB";
label_tximage.Text = statics.langstr[10] + TXRealFilename + statics.langstr[11] + (ArraySend.txpos / 1000).ToString() + statics.langstr[30] + (TXRealFileSize / 1000).ToString() + " kB";
else
label_txfile.Text = langstr[12] + TXRealFilename + langstr[11] + (ArraySend.txpos / 1000).ToString() + langstr[30] + (TXRealFileSize / 1000).ToString() + " kB";
label_txfile.Text = statics.langstr[12] + TXRealFilename + statics.langstr[11] + (ArraySend.txpos / 1000).ToString() + statics.langstr[30] + (TXRealFileSize / 1000).ToString() + " kB";
}
// in loop mode only: send the next picture in current image folder
@@ -926,7 +857,7 @@ namespace oscardata
private void button_loadimage_Click(object sender, EventArgs e)
{
OpenFileDialog open = new OpenFileDialog();
open.Filter = langstr[13];
open.Filter = statics.langstr[13];
if (open.ShowDialog() == DialogResult.OK)
{
prepareImage(open.FileName);
@@ -953,6 +884,7 @@ namespace oscardata
private void button_stopBERtest_Click(object sender, EventArgs e)
{
txcommand = statics.noTX;
bt_resetmodem_Click(null, null);
}
int rxframecounter = 0;
@@ -978,9 +910,9 @@ namespace oscardata
// show RX status for this frame
if (rxstat == 4)
line += langstr[14];
line += statics.langstr[14];
else
line += langstr[29];
line += statics.langstr[29];
int bits = rxframecounter * 258 * 8;
int bytes = rxframecounter * 258;
@@ -1045,12 +977,12 @@ namespace oscardata
if (ArraySend.rxFilename != null && ArraySend.rxFilename.Length > 0)
{
s += ArraySend.rxFilename + " ";
s += recfile.rxbytes / 1000 + langstr[30] + ArraySend.FileSize / 1000 + " kB ";
s += recfile.rxbytes / 1000 + statics.langstr[30] + ArraySend.FileSize / 1000 + " kB ";
s += Math.Truncate(recfile.runtime.TotalSeconds) + " s, ";
s += blockres[1] + langstr[30] + blockres[0] + langstr[15];
s += blockres[1] + statics.langstr[30] + blockres[0] + statics.langstr[15];
}
else
s += langstr[16];
s += statics.langstr[16];
if (rxtype == statics.Image)
label_rximage.Text = s;
@@ -1059,24 +991,24 @@ namespace oscardata
label_rxfile.Text = s;
// show speed in status line at the left side
toolStripStatusLabel.Text = langstr[17] + speed.ToString() + " bps";
toolStripStatusLabel.Text = statics.langstr[17] + speed.ToString() + " bps";
if (missBlocks < 0) missBlocks = 0;
if (missingBlocks < 0) missingBlocks = 0;
// show RX status in the status line
if (rxtype == statics.BERtest)
RXstatus.Text = "RX: " + rxbytecounter + langstr[18] + missBlocks;
RXstatus.Text = "RX: " + rxbytecounter + statics.langstr[18] + missBlocks;
else
{
if(fsz > 0)
RXstatus.Text = "RX: " + fsz + langstr[18] + missingBlocks;
RXstatus.Text = "RX: " + fsz + statics.langstr[18] + missingBlocks;
else
RXstatus.Text = "RX: " + rxbytecounter + langstr[18] + missingBlocks;
RXstatus.Text = "RX: " + rxbytecounter + statics.langstr[18] + missingBlocks;
}
if(speed_bps > 0)
RXstatus.Text += langstr[19] + speed_bps + " bps";
RXstatus.Text += statics.langstr[19] + speed_bps + " bps";
}
private void button_cancelimg_Click(object sender, EventArgs e)
@@ -1085,6 +1017,7 @@ namespace oscardata
label_rximage.ForeColor = Color.Black;
pictureBox_rximage.Image = null;
ArraySend.stopSending();
bt_resetmodem_Click(null, null);
}
private void checkBox_small_CheckedChanged(object sender, EventArgs e)
@@ -1147,11 +1080,11 @@ namespace oscardata
progressBar_capfifo.Location = new Point(progressBar_fifo.Location.X, progressBar_fifo.Location.Y + y);
progressBar_capfifo.Size = new Size(progressBar_capfifo.Width, 18);
lb_rxsignal.Location = new Point(progressBar_capfifo.Location.X + progressBar_capfifo.Size.Width + 15, label_capfifo.Location.Y);
pb_rxsignal.Location = new Point(lb_rxsignal.Location.X + lb_rxsignal.Size.Width + 2, label_capfifo.Location.Y-5);
lb_rxsignal.Location = new Point(progressBar_capfifo.Location.X + progressBar_capfifo.Size.Width + 15, label_fifo.Location.Y-15);
pb_rxsignal.Location = new Point(lb_rxsignal.Location.X + lb_rxsignal.Size.Width + 2, label_fifo.Location.Y-5-15);
lb_rxsync.Location = new Point(pb_rxsignal.Location.X + pb_rxsignal.Size.Width + 15, label_capfifo.Location.Y);
pb_rxsync.Location = new Point(lb_rxsync.Location.X + lb_rxsync.Size.Width + 2, label_capfifo.Location.Y-5);
lb_rxsync.Location = new Point(progressBar_capfifo.Location.X + progressBar_capfifo.Size.Width + 15, label_capfifo.Location.Y);
pb_rxsync.Location = new Point(lb_rxsignal.Location.X + lb_rxsignal.Size.Width + 2, label_capfifo.Location.Y-5);
}
public String GetMyBroadcastIP()
@@ -1174,24 +1107,6 @@ namespace oscardata
return ip;
}
Byte getLSaudioDevice()
{
String s = cb_loudspeaker.Text;
Byte x = (Byte)cb_loudspeaker.Items.IndexOf(s);
Console.WriteLine("LS:" + s + " " + x);
//if (s.ToUpper() == "DEFAULT") x = 255;
return x;
}
Byte getMICaudioDevice()
{
String s = cb_mic.Text;
Byte x = (Byte)cb_mic.Items.IndexOf(s);
Console.WriteLine("MIC:" + s + " " + x);
//if (s.ToUpper() == "DEFAULT") x = 255;
return x;
}
/*
* search for the modem IP:
* send a search message via UDP to port UdpBCport
@@ -1228,7 +1143,7 @@ namespace oscardata
txb[4] = (Byte)tb_loadspeaker.Value;
txb[5] = (Byte)tb_mic.Value;
txb[6] = safemode;
txb[7] = (Byte)0; // unused
txb[7] = (Byte)(cb_sendIntro.Checked?1:0);
txb[8] = (Byte)0; // unused
txb[9] = (Byte)0; // unused
@@ -1291,7 +1206,7 @@ namespace oscardata
TXfilename = open.FileName;
TXRealFilename = open.SafeFileName;
if (txcommand == statics.BinaryFile)
rtb_TXfile.Text = langstr[20] + TXfilename + langstr[21];
rtb_TXfile.Text = statics.langstr[20] + TXfilename + statics.langstr[21];
else
rtb_TXfile.Text = File.ReadAllText(TXfilename);
@@ -1306,6 +1221,8 @@ namespace oscardata
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
allVoiceModesOff();
if (cb_speed.Text.Contains("3000")) statics.real_datarate = 3000;
if (cb_speed.Text.Contains("4000")) statics.real_datarate = 4000;
if (cb_speed.Text.Contains("4410")) statics.real_datarate = 4410;
@@ -1453,11 +1370,11 @@ namespace oscardata
}
catch { }
try { cb_language.Text = ReadString(sr); } catch { }
try { s = ReadString(sr); cb_sendIntro.Checked = (s == "1"); } catch { }
}
}
catch
{
tb_callsign.Text = "";
cb_autostart.Checked = true;
}
@@ -1489,6 +1406,7 @@ namespace oscardata
sw.WriteLine(tb_mic.Value.ToString());
sw.WriteLine(rb_opus.Checked ? "1" : "0");
sw.WriteLine(cb_language.Text);
sw.WriteLine(cb_sendIntro.Checked ? "1" : "0");
}
}
catch { }
@@ -1496,14 +1414,14 @@ namespace oscardata
private void bt_shutdown_Click(object sender, EventArgs e)
{
DialogResult dr = MessageBox.Show(langstr[23], langstr[22], MessageBoxButtons.YesNo);
DialogResult dr = MessageBox.Show(statics.langstr[23], statics.langstr[22], MessageBoxButtons.YesNo);
if (dr == DialogResult.Yes)
{
Byte[] txdata = new byte[1];
txdata[0] = (Byte)statics.Modem_shutdown;
Udp.UdpSendCtrl(txdata);
MessageBox.Show(langstr[24], langstr[22], MessageBoxButtons.OK);
MessageBox.Show(statics.langstr[24], statics.langstr[22], MessageBoxButtons.OK);
}
}
@@ -1547,21 +1465,21 @@ namespace oscardata
recfile.oldblockinfo(d);
int failed = d[0] - d[1];
s = langstr[25] +
s = statics.langstr[25] +
"---------------\n" +
"total : " + d[0] + "\n" +
langstr[26] + d[1] + "\n" +
langstr[27] + failed + "\n";
statics.langstr[26] + d[1] + "\n" +
statics.langstr[27] + failed + "\n";
if(failed > 1)
{
s += langstr[28];
s += statics.langstr[28];
}
Form2_showtext sf = new Form2_showtext("Block Info",s);
sf.ShowDialog();
}
void setVoiceAudio()
void setVoiceAudio(Byte opmode = 0)
{
/*
* Format:
@@ -1573,13 +1491,16 @@ namespace oscardata
*/
Byte[] txdata = new byte[203];
txdata[0] = (Byte)statics.SetVoiceMode;
Byte opmode = 0;
// values see: hsmodem.h _VOICEMODES_
if (cb_switchtoLS.Checked) opmode = 1;
if (cb_voiceloop.Checked) opmode = 2;
if (cb_codecloop.Checked) opmode = 3;
if (cb_digitalVoice.Checked) opmode = 4;
if (cb_digitalVoiceRXonly.Checked) opmode = 5;
if (opmode == 0)
{
// no predefined opmode, set opmode according the check boxes
if (cb_switchtoLS.Checked) opmode = 1;
if (cb_voiceloop.Checked) opmode = 2;
if (cb_codecloop.Checked) opmode = 3;
if (cb_digitalVoice.Checked) opmode = 4;
if (cb_digitalVoiceRXonly.Checked) opmode = 5;
}
if(opmode == 0) pb_voice.BackgroundImage = null;
txdata[1] = opmode;
Byte codec;
@@ -1619,6 +1540,15 @@ namespace oscardata
}
}
private void allVoiceModesOff()
{
cb_switchtoLS.Checked = false;
cb_voiceloop.Checked = false;
cb_codecloop.Checked = false;
cb_digitalVoice.Checked = false;
cb_digitalVoiceRXonly.Checked = false;
}
private void cb_switchtoLS_CheckedChanged(object sender, EventArgs e)
{
if(cb_switchtoLS.Checked)
@@ -1684,6 +1614,47 @@ namespace oscardata
setVoiceAudio();
}
private void bt_arecord_Click(object sender, EventArgs e)
{
cb_switchtoLS.Checked = false;
cb_voiceloop.Checked = false;
cb_codecloop.Checked = false;
cb_digitalVoice.Checked = false;
cb_digitalVoiceRXonly.Checked = false;
pb_voice.BackgroundImage = null;
setVoiceAudio(6);
recordStatus = 1;
}
private void bt_aplay_Click(object sender, EventArgs e)
{
cb_switchtoLS.Checked = false;
cb_voiceloop.Checked = false;
cb_codecloop.Checked = false;
cb_digitalVoice.Checked = false;
cb_digitalVoiceRXonly.Checked = false;
pb_voice.BackgroundImage = null;
if (recordStatus == 1)
{
setVoiceAudio(0);
recordStatus = 0;
}
setVoiceAudio(7);
}
private void bt_astop_Click(object sender, EventArgs e)
{
cb_switchtoLS.Checked = false;
cb_voiceloop.Checked = false;
cb_codecloop.Checked = false;
cb_digitalVoice.Checked = false;
cb_digitalVoiceRXonly.Checked = false;
pb_voice.BackgroundImage = null;
setVoiceAudio(0);
recordStatus = 0;
}
int setLSvolume = -1;
int setMICvolume = -1;
@@ -1704,10 +1675,9 @@ namespace oscardata
if (language == 0)
{
langstr = langstr_en;
statics.langstr = langstr_en;
tabPage_image.Text = "Image";
label_nextimage.Text = "next image in ...";
cb_loop.Text = "loop (send all images in folder)";
bt_rximages.Text = " RX Images";
button_loadimage.Text = " Load Image";
@@ -1727,7 +1697,7 @@ namespace oscardata
bt_file_ascii.Text = " Load ASCII Text File";
tabPage_audio.Text = "Voice Audio";
groupBox7.Text = "Codec Selection";
rb_codec2.Text = "CODEC-2 parametric audio codec. For QPSK. Audio rate: 3200 bps";
rb_codec2.Text = "CODEC-2 parametric audio codec. For BPSK/QPSK. Audio rate: 700/1600/3200 bps";
rb_opus.Text = "OPUS rate adaptive codec. For 8APSK. Audio rate: 84% of data rate";
groupBox6.Text = "Voice Audio Operating Mode";
cb_digitalVoiceRXonly.Text = "Digital Voice RX: Receiver ---> Codec ---> Loudspeaker";
@@ -1751,9 +1721,8 @@ namespace oscardata
label4.Text = "Audio Record Device:";
groupBox2.Text = "Personal Settings";
cb_stampinfo.Text = "Insert Info into picture";
textBox5.Text = "every";
textBox4.Text = "transmissions";
textBox1.Text = "send announcement before pic/file transfer";
textBox1.Text = "send announcement before TX, every";
label1.Text = "Callsign:";
cb_stampcall.Text = "Insert Callsign into picture";
tabPage_about.Text = "About";
@@ -1763,12 +1732,13 @@ namespace oscardata
label_capfifo.Text = "RX Buffer:";
lb_rxsignal.Text = "RX Signal:";
lb_rxsync.Text = "RX Sync:";
cb_sendIntro.Text = "send introduction";
tb_recintro.Text = "record introduction";
}
if (language == 1)
{
langstr = langstr_de;
statics.langstr = langstr_de;
tabPage_image.Text = "Bilder";
tabPage_file.Text = "Datei";
@@ -1780,7 +1750,6 @@ namespace oscardata
button_cancelimg.Text = " Abbruch";
bt_rximages.Text = "RX Bilder";
cb_loop.Text = "Endlosschleife: Alle Bilder im Verzeichnis senden";
label_nextimage.Text = "nächstes Bild in ...";
label_tximage.Text = "TX Bild";
label_rximage.Text = "RX Bild";
label_speed.Text = "Bitrate [bit/s]";
@@ -1805,13 +1774,12 @@ namespace oscardata
cb_digitalVoice.Text = "DV Transceiver: Mikrofon -> Codec -> Sender | Empfänger -> Codec -> Lautsprecher";
groupBox7.Text = "Codec Auswahl";
rb_opus.Text = "OPUS adaptiver Codec. Für 8APSK. Audio-Datenrate 84% der Bitrate";
rb_codec2.Text = "CODEC-2 parametrischer Audiocodec. Für QPSK. Audiorate: 3200 bit/s";
rb_codec2.Text = "CODEC-2 parametrischer Audiocodec. Für BPSK/QPSK. Audiorate: 700/1600/3200 bit/s";
groupBox2.Text = "Persönliche Einstellungen";
label1.Text = "Rufzeichen";
cb_stampcall.Text = "Füge Rufzeichen ins Bild ein";
cb_stampinfo.Text = "Füge Infotext ins Bild ein";
textBox1.Text = "sende Ansagetext vor Daten- oder Bildsendung";
textBox5.Text = "alle";
textBox1.Text = "sende Ansagetext vor TX, alle";
textBox4.Text = "Aussendungen";
label3.Text = "Audio Wiedergabe";
label4.Text = "Audio Eingang";
@@ -1820,6 +1788,8 @@ namespace oscardata
groupBox4.Text = "Wartung";
textBox3.Text = "Ausschalten wenn hsmodem auf separatem PC läuft";
tb_shutdown.Text = "Vor dem Ausschalten eines SBC diesen hier herunterfahren";
cb_sendIntro.Text = "sende Vorstellung";
tb_recintro.Text = "Vorstellung aufnehmen";
}
}
@@ -1831,8 +1801,6 @@ namespace oscardata
set_language(0);
}
String[] langstr;
String[] langstr_en = new String[]{
"next image in ", //0
"transmitting",
@@ -1925,6 +1893,7 @@ namespace oscardata
}
}
}
}
}
File diff suppressed because it is too large Load Diff
+70
View File
@@ -230,6 +230,46 @@ namespace oscardata.Properties {
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap osci {
get {
object obj = ResourceManager.GetObject("osci", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap playback {
get {
object obj = ResourceManager.GetObject("playback", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap rahmen {
get {
object obj = ResourceManager.GetObject("rahmen", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap record {
get {
object obj = ResourceManager.GetObject("record", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
@@ -260,6 +300,26 @@ namespace oscardata.Properties {
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap schraube {
get {
object obj = ResourceManager.GetObject("schraube", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap screen {
get {
object obj = ResourceManager.GetObject("screen", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
@@ -300,6 +360,16 @@ namespace oscardata.Properties {
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap stopplay {
get {
object obj = ResourceManager.GetObject("stopplay", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
@@ -205,4 +205,25 @@
<data name="hintergrundxcf" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>hintergrundxcf.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="rahmen" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>rahmen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="schraube" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>schraube.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="screen" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>screen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="osci" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>osci.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="playback" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>playback.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="record" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>record.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="stopplay" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>stopplay.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.
+13 -22
View File
@@ -78,7 +78,8 @@ namespace oscardata
public static int RXinSync = 0;
public static int maxRXlevel = 0;
public static int maxTXlevel = 0;
public static Color WindowBackColor;
public static String[] langstr;
public static String[] getOwnIPs()
{
@@ -205,31 +206,21 @@ namespace oscardata
public static String getHomePath(String subpath, String filename)
{
String home = Application.UserAppDataPath;
String deli = "/";
if (statics.ostype == 0)deli = "\\";
if (statics.ostype == 0)
deli = "\\";
//String home = Application.UserAppDataPath;
String home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
home = home + deli + DataStorage + deli;
try { Directory.CreateDirectory(home); } catch { }
if(subpath.Length == 0)
home = home + deli + DataStorage + deli;
else
home = home + deli + DataStorage + deli + subpath + deli;
try
{
Directory.CreateDirectory(home);
}
catch { }
try
{
if (Directory.Exists(home) == false)
Console.WriteLine("create:" + home);
}
catch { }
// if not exists, create subfolder "oscardata"
if (subpath.Length > 0)
try {
home += subpath + deli;
Directory.CreateDirectory(home);
} catch { }
return home + filename;
}
+7
View File
@@ -143,6 +143,13 @@
<None Include="Properties\greenmarker.png" />
<None Include="Properties\redmarker.png" />
<None Include="Properties\hintergrundxcf.png" />
<None Include="Properties\rahmen.png" />
<None Include="Properties\screen.png" />
<None Include="Properties\schraube.png" />
<None Include="Properties\osci.png" />
<None Include="Properties\record.png" />
<None Include="Properties\stopplay.png" />
<None Include="Properties\playback.png" />
<Content Include="Satellite-icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+176 -53
View File
@@ -127,46 +127,30 @@ namespace oscardata
statics.RXinSync = b[3];
statics.maxRXlevel = b[4];
statics.maxTXlevel = b[5];
Byte[] b1 = new byte[b.Length - 4];
Array.Copy(b, 4, b1, 0, b1.Length);
uq_fft.Add(b1);
Byte[] b1 = new byte[b.Length - 6];
Array.Copy(b, 6, b1, 0, b1.Length);
drawFftBitmap(b1);
}
// IQ data
if (rxtype == statics.udp_iq)
{
//Console.WriteLine("IQ");
for (int i = 0; i < b.Length; i++)
Int16[] re = new Int16[b.Length / 2];
Int16[] im = new Int16[b.Length / 2];
int idx = 0;
for (int i = 0; i < b.Length; i+=4)
{
// insert new byte in lastb
for (int sh = 12 - 1; sh > 0; sh--)
lastb[sh] = lastb[sh - 1];
lastb[0] = b[i];
re[idx] = b[i+0];
re[idx] <<= 8;
re[idx] += b[i+1];
// test if aligned
Int32 re = 0, im = 0;
if (lastb[0] == 0xe8 && lastb[1] == 3 && lastb[2] == 0 && lastb[3] == 0)
{
// we are aligned
re = lastb[7];
re <<= 8;
re += lastb[6];
re <<= 8;
re += lastb[5];
re <<= 8;
re += lastb[4];
im = lastb[11];
im <<= 8;
im += lastb[10];
im <<= 8;
im += lastb[9];
im <<= 8;
im += lastb[8];
}
drawBitmap(re, im);
im[idx] = b[i+2];
im[idx] <<= 8;
im[idx] += b[i+3];
idx++;
}
drawBitmap(re, im);
}
}
}
@@ -175,36 +159,169 @@ namespace oscardata
}
static int panelw = 75, panelh = 75;
static int maxdrawanz = 350;//160;
static int drawanz = 0;
static Bitmap bm;
static void drawBitmap(Int32 re, Int32 im)
const int maxsum = 5000;
static Int16[] resum = new Int16[maxsum];
static Int16[] imsum = new Int16[maxsum];
static int sumidx = 0;
static SolidBrush bgcol = new SolidBrush(Color.Silver);//FromArgb(255, (byte) 0x40, (byte) 0x00, (byte) 0x00));
static double scaleiq(int v)
{
if (re == 0 && im == 0) return;
if (++drawanz >= maxdrawanz && uq_iq.Count() <= 1)
double f = v;
f /= 15000.0;
// f goes from -1 to +1
// scale it to the graphics
const int sz = 45;
f += 1;
f /= 2;
f *= sz;
f += (panelw-sz)/2;
return f;
}
static void drawBitmap(Int16[] re, Int16[] im)
{
// collect IQ data
for (int i = 0; i < re.Length; i++)
{
drawanz = 0;
uq_iq.Add(bm);
bm = new Bitmap(75, 75);
if (sumidx < maxsum)
{
resum[sumidx] = re[i];
imsum[sumidx] = im[i];
sumidx++;
}
}
// check if there is space in bitmap fifo
// if the GUI does not process the bitmaps fast enough, just cancel it
if (uq_iq.Count() > 2)
return;
// bitmap for drawing the complete picture
bm = new Bitmap(panelw, panelh);
using (Graphics gr = Graphics.FromImage(bm))
{
// re and im are in the range of +/- 2^24 (16777216)
// scale it to +/- 128
double fre = re;
double fim = im;
// background
gr.FillRectangle(bgcol, 0,0, panelw, panelh);
// oscilloscope screen
gr.DrawImage(new Bitmap(Properties.Resources.screen), 2, 1);
// screws at the 4 corners
Bitmap screw = new Bitmap(Properties.Resources.schraube);
gr.DrawImage(screw, 2, 2);
gr.DrawImage(screw, panelw - 2-screw.Width, 2);
gr.DrawImage(screw, 2, panelh - 2 - screw.Height);
gr.DrawImage(screw, panelw - 2 - screw.Width, panelh - 2 - screw.Height);
fre = fre * panelw / 2 / 16777216.0;
fim = fim * panelh / 2 / 16777216.0;
// draw constellation points
for (int i = 0; i < sumidx; i++)
{
if (resum[i] == 0 || imsum[i] == 0) continue;
double dist = Math.Sqrt((resum[i] * resum[i]) + (imsum[i] * imsum[i]));
if (dist > 22000) continue; // do not draw outside scope
// scale it to the picture
int x = panelw / 2 + (int)fre;
int y = panelh / 2 + (int)fim;
double x = scaleiq(resum[i]);
double y = scaleiq(imsum[i]);
int et = 2;
gr.FillEllipse(Brushes.Blue, x - et, y - et, et * 2, et * 2);
double et = 1.6;
x -= et;
y -= et;
double w = et * 2;
double h = et * 2;
gr.FillEllipse(Brushes.Yellow, (int)x, (int)y, (int)w, (int)h);
}
}
uq_iq.Add(bm);
sumidx = 0;
}
static int fftw = 410, ffth = 72;
static Bitmap bmskala = new Bitmap(fftw,ffth);
static bool bmf = false;
static Font fnt = new Font("Verdana", 9.0f);
static Font smallfnt = new Font("Verdana", 7.0f);
static Pen penyl = new Pen(Brushes.Yellow, 1);
static void drawFftBitmap(Byte[] b1)
{
if(!bmf)
{
// pre-draw background
bmf = true;
int yl = ffth - 20;
int yh = 20;
Pen pen = new Pen(Brushes.Navy, 1);
Pen pensolid = new Pen(Brushes.Navy, 1);
pen.DashPattern = new float[] { 1.0F, 2.0F, 1.0F, 2.0F };
Pen penred = new Pen(Brushes.Red, 1);
using (Graphics gr = Graphics.FromImage(bmskala))
{
gr.FillRectangle(bgcol, 0, 0, fftw, ffth);
gr.DrawImage(new Bitmap(Properties.Resources.osci), 0, 0);
for (int x = 10; x <= 390; x += 10)
gr.DrawLine(pen, x, yl, x, yh);
gr.DrawLine(penred, 150, yl, 150, yh);
gr.DrawLine(pensolid, 20, yl, 20, yh);
gr.DrawLine(pensolid, 280, yl, 280, yh);
gr.DrawLine(pensolid, 360, yl, 360, yh);
gr.DrawRectangle(penred, 15, yh, 270, yl-yh);
gr.DrawString("200", smallfnt, Brushes.Black, 8, yl);
gr.DrawString("1500", smallfnt, Brushes.Black, 135, yl);
gr.DrawString("2800", smallfnt, Brushes.Black, 265, yl);
gr.DrawString("3600", smallfnt, Brushes.Black, 345, yl);
gr.DrawString(statics.langstr[8], fnt, Brushes.Black, 100, 0);
}
bmskala.MakeTransparent(Color.White);
}
// check if there is space in bitmap fifo
// if the GUI does not process the bitmaps fast enough, just cancel it
if (uq_fft.Count() > 2)
return;
// bitmap for drawing the complete picture
bm = new Bitmap(442, 76);
using (Graphics gr = Graphics.FromImage(bm))
{
// background
gr.FillRectangle(bgcol, 0, 0, bm.Width, bm.Height);
// scala
gr.DrawImage(bmskala,16,2);
// screws at the 4 corners
Bitmap screw = new Bitmap(Properties.Resources.schraube);
gr.DrawImage(screw, 2, 2);
gr.DrawImage(screw, 442 - 2 - screw.Width, 2);
gr.DrawImage(screw, 2, 76 - 2 - screw.Height);
gr.DrawImage(screw, 442 - 2 - screw.Width, 76 - 2 - screw.Height);
// spectrum
int lastus = -1;
// values
for (int i = 0; i < b1.Length-1; i+=2)
{
int us = b1[i];
us <<= 8;
us += b1[i + 1];
double fus = 0;
if (us > 0)
fus = 35 * Math.Log10((double)us / 10);
us = (int)(fus - 5.0);
if(lastus != -1 && i>0)
gr.DrawLine(penyl, i/2+15, 76-lastus, i/2+1+15, 76-us); // 15 istead of 16 to get it in exact position
lastus = us;
}
}
uq_fft.Add(bm);
}
static AutoResetEvent autoEvent = new AutoResetEvent(false);
@@ -309,7 +426,6 @@ namespace oscardata
return varr;
}
static Byte[] lastb = new Byte[12];
public static qpskitem UdpGetIQ()
{
if (uq_iq.Count() == 0) return null;
@@ -324,6 +440,13 @@ namespace oscardata
return uq_iq.GetBitmap();
}
public static Bitmap UdpFftBitmap()
{
if (uq_fft.Count() == 0) return null;
return uq_fft.GetBitmap();
}
public static bool IQavail()
{
if (uq_iq.Count() == 0) return false;