summaryrefslogtreecommitdiff
path: root/menus.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:31:45 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:31:45 -0500
commit754eb84c5c7e10c9b6c4060e230300b090a95bee (patch)
tree2d6ce8c815814e8ab25a8390dab5ec3c2e2b256f /menus.c
parent1d11fc9a26611ac5af7b46241125d10f2b79c2cf (diff)
better calculation of space for significant digits
Diffstat (limited to 'menus.c')
-rw-r--r--menus.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/menus.c b/menus.c
index 7cd12b8..f4467ee 100644
--- a/menus.c
+++ b/menus.c
@@ -394,7 +394,7 @@ void Show_Main_Menu(void)
}
menu_string = g_string_append (menu_string, ":");
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,Show_delay+chan,sig_dig-globals.Flash.ChanKey_delay,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,Show_delay+chan,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
@@ -446,7 +446,7 @@ void Show_Main_Menu(void)
}
menu_string = g_string_append (menu_string, ": DC");
}
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig-globals.Flash.ChanKey_pw,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
}
@@ -472,7 +472,7 @@ void Show_Main_Menu(void)
g_string_append_printf (menu_string, "%d", chan+1);
}
menu_string = g_string_append (menu_string, ":");
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig-globals.Flash.ChanKey_rise_time,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
}
@@ -509,7 +509,7 @@ void Show_Main_Menu(void)
}
menu_string = g_string_append (menu_string, ":AMPLFY");
}
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig-globals.Flash.ChanKey_amplitude,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
}
@@ -528,7 +528,7 @@ void Show_Main_Menu(void)
menu_string = g_string_append (menu_string, "AMP");
g_string_append_printf (menu_string, "%d", chan+1);
menu_string = g_string_append (menu_string, ":");
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig-1,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
}
@@ -549,7 +549,7 @@ void Show_Main_Menu(void)
g_string_append_printf (menu_string, "%d", chan+1);
}
menu_string = g_string_append (menu_string, ":");
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig-globals.Flash.ChanKey_current_limit,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
}
@@ -572,7 +572,7 @@ void Show_Main_Menu(void)
g_string_append_printf (menu_string, "%d", chan+1);
}
menu_string = g_string_append (menu_string, ":");
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig-globals.Flash.ChanKey_slew,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
}
@@ -617,7 +617,7 @@ void Show_Main_Menu(void)
g_string_append_printf (menu_string, "%d", chan+1);
}
menu_string = g_string_append (menu_string, ":");
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig-globals.Flash.ChanKey_Burst_Time,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
}
@@ -650,7 +650,7 @@ void Show_Main_Menu(void)
}
menu_string = g_string_append (menu_string, ":EXT");
}
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig-globals.Flash.ChanKey_offset,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
}
@@ -669,7 +669,7 @@ void Show_Main_Menu(void)
g_string_append_printf (menu_string, "%d", chan+1);
}
menu_string = g_string_append (menu_string, ":");
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry),LCD_row,LCD_col,menu_string->str,Show_monitor+chan,sig_dig-globals.Flash.ChanKey_Curr_Mon_value,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry),LCD_row,LCD_col,menu_string->str,Show_monitor+chan,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
globals.ChannelState[chan].displayed_mon_val=globals.ChannelState[chan].Curr_Mon_value;
}
@@ -698,7 +698,7 @@ void Show_Main_Menu(void)
g_string_append_printf (menu_string, "%d\xf4 ", globals.Flash.zout_min[chan]);
}
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,Show_No_Number,sig_dig-globals.Flash.ChanKey_zout,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,Show_No_Number,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
}
@@ -718,7 +718,7 @@ void Show_Main_Menu(void)
g_string_append_printf (menu_string, "%d", chan+1);
}
menu_string = g_string_append (menu_string, ":");
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig-globals.Flash.ChanKey_load_type,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,show_item,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
}
@@ -746,7 +746,7 @@ void Show_Main_Menu(void)
menu_string = g_string_append (menu_string, "OFF");
}
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,Show_No_Number,sig_dig-globals.Flash.ChanKey_output_state,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,Show_No_Number,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
@@ -823,7 +823,7 @@ void Show_Main_Menu(void)
menu_string = g_string_append (menu_string, "YES");
}
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,Show_No_Number,sig_dig-globals.Flash.ChanKey_polarity,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,Show_No_Number,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
}
@@ -848,7 +848,7 @@ void Show_Main_Menu(void)
menu_string = g_string_append (menu_string, "ECL");
}
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,Show_No_Number,sig_dig-globals.Flash.ChanKey_logic_level,LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,Show_No_Number,sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
}
@@ -880,7 +880,7 @@ void Show_Main_Menu(void)
menu_string = g_string_append (menu_string, "ASY,HI");
}
- Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,Show_No_Number, sig_dig-(globals.Flash.ChanKey_gate_level | globals.Flash.ChanKey_gate_type),LCD_col_width-1);
+ Display_Number_on_LCD(Menu_Is_Item_Visible(LCD_entry), LCD_row,LCD_col,menu_string->str,Show_No_Number, sig_dig,LCD_col_width-1);
g_string_erase (menu_string, 0, -1);
}
}
@@ -1189,7 +1189,7 @@ static void Display_Number_on_LCD(int Is_Item_Visible,int LCD_row,int LCD_col,ch
units = g_strdup("");
}
- String_Parameter_To_Text(Submenu_Value,significant_digits,start_string,units,&LCD_string,show_plus_sign);
+ String_Parameter_To_Text(Submenu_Value,significant_digits,start_string,units,&LCD_string,show_plus_sign,width_of_column);
} else {
LCD_string = g_strdup(start_string);
}
@@ -1871,9 +1871,9 @@ static void Submenu_Display(int change_selection)
break;
case mode_amp_min:
if (globals.Flash.voltage_enabled[channel]) {
- String_Parameter_To_Text(globals.Flash.min_ampl[channel],2,"","V",&tmp_str,YES);
+ String_Parameter_To_Text(globals.Flash.min_ampl[channel],2,"","V",&tmp_str,YES,LCD_col_width);
} else {
- String_Parameter_To_Text(globals.Flash.min_ampl[channel],2,"","A",&tmp_str,YES);
+ String_Parameter_To_Text(globals.Flash.min_ampl[channel],2,"","A",&tmp_str,YES,LCD_col_width);
}
strcpy (mode_name[i], tmp_str); // FIXME
@@ -1884,9 +1884,9 @@ static void Submenu_Display(int change_selection)
break;
case mode_amp_max:
if (globals.Flash.voltage_enabled[channel]) {
- String_Parameter_To_Text(globals.Flash.max_ampl[channel],2,"","V",&tmp_str,YES);
+ String_Parameter_To_Text(globals.Flash.max_ampl[channel],2,"","V",&tmp_str,YES,LCD_col_width);
} else {
- String_Parameter_To_Text(globals.Flash.max_ampl[channel],2,"","A",&tmp_str,YES);
+ String_Parameter_To_Text(globals.Flash.max_ampl[channel],2,"","A",&tmp_str,YES,LCD_col_width);
}
strcpy (mode_name[i], tmp_str); // FIXME