From: Olivier Matz Date: Tue, 9 Sep 2014 17:32:34 +0000 (+0200) Subject: fix typos X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e323a6920bfb125c1eaa8c70888050d8da4126e3;p=fpv.git fix typos --- diff --git a/imuboard/gps_venus.c b/imuboard/gps_venus.c index 860a0b9..3308356 100644 --- a/imuboard/gps_venus.c +++ b/imuboard/gps_venus.c @@ -162,9 +162,6 @@ typedef struct { } m_navmode_t; -#define DBG_SEND -#define DBG_RECV - void serial1_tx_cout(uint8_t c) { debug_printf("%.2X ", c); @@ -203,10 +200,10 @@ void venus634_restart(void) { m_restart_t restart; - memset(&restart,0,sizeof(m_restart_t)); + memset(&restart, 0, sizeof(m_restart_t)); restart.start_mode = 0x03; /* COLD */ - venus634_send(M_RESTART,&restart,sizeof(m_restart_t)); + venus634_send(M_RESTART, &restart, sizeof(m_restart_t)); return; } @@ -215,26 +212,26 @@ void venus634_config_serial(void) { m_serconf_t serconf; - memset(&serconf,0,sizeof(m_serconf_t)); + memset(&serconf, 0, sizeof(m_serconf_t)); serconf.port = 0; serconf.baud = 4; serconf.update = 1; - venus634_send(M_SERCONF,&serconf,sizeof(m_serconf_t)); + venus634_send(M_SERCONF, &serconf, sizeof(m_serconf_t)); return; } -void venus634_msg_type(void) +void venus634_msg_type(uint8_t mode) { m_output_t output; - memset(&output,0,sizeof(m_output_t)); - output.msg_type = 0x02; /* binary msg */ + memset(&output, 0, sizeof(m_output_t)); + output.msg_type = mode; output.attributes = 0; /* ram, init may freeze when update in flash */ - venus634_send(M_OUTPUT,&output,sizeof(m_output_t)); + venus634_send(M_OUTPUT, &output, sizeof(m_output_t)); return; } @@ -244,11 +241,11 @@ void venus634_rate(void) { m_rate_t rate; - memset(&rate,0,sizeof(m_rate_t)); + memset(&rate, 0, sizeof(m_rate_t)); rate.rate = 20; - rate.attributes = 0; /* ram */ + rate.attributes = 0; /* ram, init may freeze when update in flash */ - venus634_send(M_RATE,&rate,sizeof(m_rate_t)); + venus634_send(M_RATE, &rate, sizeof(m_rate_t)); return; } @@ -259,11 +256,11 @@ void venus634_waas(void) { m_waas_t waas; - memset(&waas,0,sizeof(m_waas_t)); + memset(&waas, 0, sizeof(m_waas_t)); waas.enable = 1; - waas.attributes = 0; /* ram */ + waas.attributes = 0; /* ram, init may freeze when update in flash */ - venus634_send(M_WAAS,&waas,sizeof(m_waas_t)); + venus634_send(M_WAAS, &waas, sizeof(m_waas_t)); return; } @@ -273,11 +270,11 @@ void venus634_navmode(void) { m_navmode_t navmode; - memset(&navmode,0,sizeof(m_navmode_t)); + memset(&navmode, 0, sizeof(m_navmode_t)); navmode.navmode = 0; /* car */ - navmode.attributes = 0; /* ram */ + navmode.attributes = 0; /* ram, init may freeze when update in flash */ - venus634_send(M_NAVMODE,&navmode,sizeof(m_navmode_t)); + venus634_send(M_NAVMODE, &navmode, sizeof(m_navmode_t)); return; } @@ -287,7 +284,7 @@ void venus634_nmea_interval(void) { m_nmeainterval_t nmeainterval; - memset(&nmeainterval,0,sizeof(m_nmeainterval_t)); + memset(&nmeainterval, 0, sizeof(m_nmeainterval_t)); /* set frequency for nmea: 1 = once every one position fix, 2 = once * every two position fix, ... */ @@ -299,9 +296,9 @@ void venus634_nmea_interval(void) nmeainterval.vtg = 1; /* Course Over Ground and Ground Speed */ nmeainterval.zda = 1; /* Time & Date*/ - nmeainterval.attributes = 1; /* ram flash */ + nmeainterval.attributes = 1; /* ram & flash */ - venus634_send(M_NMEAINTERVAL,&nmeainterval,sizeof(m_nmeainterval_t)); + venus634_send(M_NMEAINTERVAL, &nmeainterval, sizeof(m_nmeainterval_t)); return; } @@ -550,12 +547,8 @@ static void venus634_configure(void) venus634_restart(); wait_ack(M_RESTART); - /* it seems we must wait that the GPS is restarted, else it doesn't work - * properly */ - wait_ms(500); - printf_P(PSTR("binmode...")); - venus634_msg_type(); + venus634_msg_type(2); /* binary */ wait_ack(M_OUTPUT); printf_P(PSTR("waas..."));