]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
disp: fixed oledlib function for sending of fsm state name (message
authorMartin Zidek <zidekm1@gmail.com>
Fri, 24 Apr 2009 17:11:46 +0000 (19:11 +0200)
committerMartin Zidek <zidekm1@gmail.com>
Fri, 24 Apr 2009 17:11:46 +0000 (19:11 +0200)
      always truncated to 20 chars max)

src/uoled/oledlib.cc

index 73bbf1a3c836f3794f545b7915690613f975fa06..49a55fc4521be98aa1492c5af1db8e9045fcabd0 100644 (file)
@@ -107,9 +107,6 @@ int oled_send_position(uint8_t *buff, int buff_size, struct est_pos_type *pos)
 
 int oled_send_fsm_state(uint8_t *buff, int buff_size, const char *name, int len, uint8_t type)
 {
-       if(len > FSM_STATE_MSG_SIZE)
-               return -1;
-
        memset(buff, ' ', FSM_STATE_MSG_SIZE);
        buff[0] = type;
        strncpy((char*)buff+1, name, (len > 20) ? 20 : len);