From 42bca56a5b8edfc3314a58ca65d5c213bf7a4ac3 Mon Sep 17 00:00:00 2001
From: c vw <dl1ycf@darc.de>
Date: Fri, 19 Oct 2018 17:05:23 +0200
Subject: [PATCH] cw_breakin replaced by cw_hang_time in iambic.c, was an
 error. Allow zero side tone volume in cw_menu.c (thus switching off side
 tone)

---
 cw_menu.c | 2 +-
 iambic.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cw_menu.c b/cw_menu.c
index 0b43f0a..21ddb9e 100644
--- a/cw_menu.c
+++ b/cw_menu.c
@@ -202,7 +202,7 @@ void cw_menu(GtkWidget *parent) {
   gtk_widget_show(cw_keyer_sidetone_level_label);
   gtk_grid_attach(GTK_GRID(grid),cw_keyer_sidetone_level_label,0,7,1,1);
 
-  GtkWidget *cw_keyer_sidetone_level_b=gtk_spin_button_new_with_range(1.0,protocol==NEW_PROTOCOL?255.0:127.0,1.0);
+  GtkWidget *cw_keyer_sidetone_level_b=gtk_spin_button_new_with_range(0.0,protocol==NEW_PROTOCOL?255.0:127.0,1.0);
   //gtk_widget_override_font(cw_keyer_sidetone_level_b, pango_font_description_from_string("Arial 18"));
   gtk_spin_button_set_value(GTK_SPIN_BUTTON(cw_keyer_sidetone_level_b),(double)cw_keyer_sidetone_volume);
   gtk_widget_show(cw_keyer_sidetone_level_b);
diff --git a/iambic.c b/iambic.c
index 8386849..0065748 100644
--- a/iambic.c
+++ b/iambic.c
@@ -162,7 +162,7 @@ void keyer_event(int gpio, int state) {
 	// PTT has been engaged manually
         if (running && !cwvox && !mox) {
 	   g_idle_add(ext_mox_update, (gpointer)(long) 1);
-           cwvox=(int) cw_breakin;
+           cwvox=(int) cw_keyer_hang_time;
 	}
     }
     if (gpio == CWL_BUTTON)
@@ -222,7 +222,7 @@ fprintf(stderr,"keyer_thread  state running= %d\n", running);
 	// If MOX still hanging, continue spinnning/checking and decrement cwvox
 
         while (key_state != EXITLOOP || cwvox > 0) {
-          if (cwvox > 0 && key_state != EXITLOOP && key_state != CHECK) cwvox=(int) cw_breakin;
+          if (cwvox > 0 && key_state != EXITLOOP && key_state != CHECK) cwvox=(int) cw_keyer_hang_time;
 	  switch (key_state) {
 	    case EXITLOOP:
 		if (cwvox >0) cwvox--;
-- 
2.45.2