summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-30 11:39:08 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-30 11:39:08 -0400
commit28d2cf9fc388d375a5ee6eef4f9e4d42e0fdc41a (patch)
tree150b49ece3c844a4ef4a2be1a23594435ad2d34e
parentd6c71646ddc4a34293bb5cadde78a30806d8eace (diff)
astyle fixes
-rw-r--r--error_utils.c8
-rw-r--r--globals.c4
-rw-r--r--monitor.c11
-rw-r--r--parser.c22
-rw-r--r--string_utils.c4
-rw-r--r--string_utils.h2
6 files changed, 25 insertions, 26 deletions
diff --git a/error_utils.c b/error_utils.c
index fa676c9..63dece8 100644
--- a/error_utils.c
+++ b/error_utils.c
@@ -144,10 +144,10 @@ void queue_error_and_display_on_LCD(int error_num)
void queue_and_broadcast_sensor_alarm(int error_num) // FIXME - implement
{
- gchar* response = NULL;
- queue_error_and_get_text(&response, error_num);
- LCD_display_extended_message (response, TRUE, TRUE);
- g_free (response);
+ gchar* response = NULL;
+ queue_error_and_get_text(&response, error_num);
+ LCD_display_extended_message (response, TRUE, TRUE);
+ g_free (response);
}
diff --git a/globals.c b/globals.c
index d66d730..c18b788 100644
--- a/globals.c
+++ b/globals.c
@@ -28,8 +28,8 @@ unsigned long long ms_timer (void)
gettimeofday(&tv, NULL);
unsigned long long millisecondsSinceEpoch =
- (unsigned long long)(tv.tv_sec) * 1000 +
- (unsigned long long)(tv.tv_usec) / 1000;
+ (unsigned long long)(tv.tv_sec) * 1000 +
+ (unsigned long long)(tv.tv_usec) / 1000;
return millisecondsSinceEpoch;
}
diff --git a/monitor.c b/monitor.c
index 0275bf4..ecbc3bb 100644
--- a/monitor.c
+++ b/monitor.c
@@ -230,12 +230,11 @@ int I2C_Check_Monitors(void)
(globals.ChannelState[channel].Curr_Mon_value > globals.ChannelState[channel].soft_current_limit)) {
Set_Output_State(channel,output_off);
queue_and_broadcast_sensor_alarm(Soft_Limit_Exceeded);
- }
- else if (globals.MenuStatus.Type_Of_Menu==Main_Menu_On &&
- !globals.MenuStatus.Error_Screen &&
- !globals.MenuStatus.Nonstd_Display &&
- globals.ChannelState[channel].Curr_Mon_value!=globals.ChannelState[channel].displayed_mon_val &&
- (seconds_since_last > 0))
+ } else if (globals.MenuStatus.Type_Of_Menu==Main_Menu_On &&
+ !globals.MenuStatus.Error_Screen &&
+ !globals.MenuStatus.Nonstd_Display &&
+ globals.ChannelState[channel].Curr_Mon_value!=globals.ChannelState[channel].displayed_mon_val &&
+ (seconds_since_last > 0))
/* only update display once a second */
{
++update_display;
diff --git a/parser.c b/parser.c
index 11260d0..c1b1fd9 100644
--- a/parser.c
+++ b/parser.c
@@ -353,8 +353,8 @@ static int Parser_id_word(char *id_me, int *channel, int *with_id_code)
id_code = 107;
} else if (!strcmp(id_me,"reset") || !strcmp(id_me,"res")) {
id_code = 108;
- } else if (!strcmp(id_me,"broadcast") ) { //FIXME
- id_code = 109;
+ } else if (!strcmp(id_me,"broadcast") ) { //FIXME
+ id_code = 109;
} else {
id_code = 9999;
}
@@ -1057,9 +1057,9 @@ void Parser_main (char *raw_in, int interactive_terminal, void(*cbfunc)(gpointer
case 102:
error_num=Go_eprom_reset_102(&response,channel,parameter,units,command_type);
break;
- case 103:
- error_num=Go_broadcast_103(&response,channel,parameter,units,command_type);
- break;
+ case 103:
+ error_num=Go_broadcast_103(&response,channel,parameter,units,command_type);
+ break;
case 9999:
// was only whitespace, ignore
@@ -4199,12 +4199,12 @@ static int Go_broadcast_103(gchar** response, int channel, char *parameter,char
return OK;
break;
- case command_param_units:
- broadcast_str = g_strdup_printf ("broadcast msg: %s %s\r\n> ", parameter, units);
- g_printf ("%s", broadcast_str);
- g_free (broadcast_str);
- return OK;
- break;
+ case command_param_units:
+ broadcast_str = g_strdup_printf ("broadcast msg: %s %s\r\n> ", parameter, units);
+ g_printf ("%s", broadcast_str);
+ g_free (broadcast_str);
+ return OK;
+ break;
default:
return SyntaxError;
diff --git a/string_utils.c b/string_utils.c
index 95c643e..363b865 100644
--- a/string_utils.c
+++ b/string_utils.c
@@ -40,7 +40,7 @@ gboolean String_is_it_numeric(char *parameter)
void String_Parameter_To_Text(float Float_To_Convert,int Int_To_Convert, int significant_digits,
- char *start_string,char *units,char *LCD_string,int show_plus_sign)
+ char *start_string,char *units,char *LCD_string,int show_plus_sign)
{
// FIXME - crappy string func
char out_val[LCD_col_width+1];
@@ -64,7 +64,7 @@ void String_Parameter_To_Text(float Float_To_Convert,int Int_To_Convert, int sig
/* if significant_digits is zero, used the supplied integer rather than the floating number */
if (!significant_digits) {
- sprintf(out_val, "%d", (int) Float_To_Convert);
+ sprintf(out_val, "%d", (int) Float_To_Convert);
strcat(LCD_string,out_val);
} else {
Float_To_Text(remote_digits_after_decimal,Float_To_Convert,floating_val);
diff --git a/string_utils.h b/string_utils.h
index 5d1c013..03c774a 100644
--- a/string_utils.h
+++ b/string_utils.h
@@ -6,6 +6,6 @@
void Float_To_Text(int decimal_digits,float number_in, gchar** text_out);
gboolean String_is_it_numeric(char *parameter);
void String_Parameter_To_Text(float Float_To_Convert,int Int_To_Convert, int significant_digits,
- char *start_string,char *units,char *LCD_string,int show_plus_sign);
+ char *start_string,char *units,char *LCD_string,int show_plus_sign);
#endif