Project

General

Profile

Revision 325

some more changes to uart

View differences:

hltp.c
52 52
int hltp_send_host_info(const host_info_t *p) {
53 53

  
54 54
    uint8_t type = hltp_type_host;
55
    uint8_t* ptr[17]; size_t sz[17];
55
    const uint8_t* ptr[17]; size_t sz[17];
56 56
    ptr[0]  = (uint8_t*)&   type                  ;     sz[0]   = 1;
57 57
    ptr[1]  = (uint8_t*)&p->host_x                ;     sz[1]   = sizeof(double);
58 58
    ptr[2]  = (uint8_t*)&p->host_y                ;     sz[2]   = sizeof(double);
......
87 87
int hltp_send_remote_info(const remote_info_t *p) {
88 88

  
89 89
    uint8_t type = hltp_type_remote;
90
    uint8_t* ptr[3]; size_t sz[3];
90
    const uint8_t* ptr[3]; size_t sz[3];
91 91
    ptr[0]  = (uint8_t*)&   type                  ;     sz[0] = 1;
92 92
    ptr[1]  = (uint8_t*)&p->remote_keys_pressed   ;     sz[1] = sizeof(keys_t);
93 93
    ptr[2]  = (uint8_t*)&p->remote_angle          ;     sz[2] = sizeof(double);
......
103 103

  
104 104
int hltp_send_bullet_info(const bullet_info_t *p) {
105 105
    uint8_t type = hltp_type_bullet;
106
    uint8_t* ptr[2]; size_t sz[2];
106
    const uint8_t* ptr[2]; size_t sz[2];
107 107
    ptr[0]  = (uint8_t*)&   type            ;     sz[0] = 1;
108 108
    ptr[1]  = (uint8_t*)&p->new_bullet      ;     sz[1] = sizeof(bool);
109 109
    return nctp_send(2, ptr, sz);

Also available in: Unified diff