X-Git-Url: http://pileus.org/git/?p=~andy%2Fcsm213a-hw;a=blobdiff_plain;f=hw2%2Fmain_comm.c;fp=hw2%2Fmain_comm.c;h=ed864ccab1ba230a7bc03fc077834889ff4e6b49;hp=54cdffcf23d18b9025359e8836f36d6a1d6d56c1;hb=f9b0067097963fa87b35d7844de1a30d2c93c005;hpb=412d9da3a535a234f4d920f74b70cae647857cc5 diff --git a/hw2/main_comm.c b/hw2/main_comm.c index 54cdffc..ed864cc 100644 --- a/hw2/main_comm.c +++ b/hw2/main_comm.c @@ -217,7 +217,8 @@ void comm_handle_init(header_t *head, init_msg_t *body) body->control & MSG_CTL_VALID_START ? "START" : "start", body->control & MSG_CTL_VALID_PERIOD ? "PERIOD" : "period", body->control & MSG_CTL_VALID_WORLD ? "WORLD" : "world", - body->control & MSG_CTL_VALID_SYNC ? "SYNC" : "sync"); + body->control & MSG_CTL_RELAY_MODE ? "RELAY" : "relay", + body->control & MSG_CTL_BEGIN_SYNC ? "SYNC" : "sync"); sirq_printf(" dev -- %d\r\n", body->device); time_printf(" start ", comm_read_time(body->start)); time_printf(" period", comm_read_time(body->period)); @@ -241,7 +242,7 @@ void comm_handle_init(header_t *head, init_msg_t *body) else comm_relay_mode = 0; - if (body->control & MSG_CTL_VALID_SYNC) + if (body->control & MSG_CTL_BEGIN_SYNC) comm_sync_due = tdma_time() + comm_sync_delay; }