Comments adjustments

This commit is contained in:
Daniela 2019-05-27 11:17:30 +02:00
parent 66ecd2ce95
commit 597518b580
2 changed files with 0 additions and 6 deletions

View File

@ -79,19 +79,16 @@ PROCESS_THREAD(assigner_process, ev, data)
if(!supermarket_open) if(!supermarket_open)
{ {
printf("Supermarket is closed! Please, come back tomorrow!\n"); printf("Supermarket is closed! Please, come back tomorrow!\n");
//leds_on(LEDS_RED);
} }
else else
{ {
printf("Customer's id: %s\n", (char*)data); printf("Customer's id: %s\n", (char*)data);
customer_id = atoi(data); customer_id = atoi(data);
//printf("id: %lu\n", (uint32_t)customer_id);
cart* cart_selected = cart_selection(); cart* cart_selected = cart_selection();
if(!cart_selected) if(!cart_selected)
{ {
printf("No cart available!\n"); printf("No cart available!\n");
//leds_on(LEDS_RED);
} }
else else
@ -116,7 +113,6 @@ PROCESS_THREAD(assigner_process, ev, data)
NETSTACK_NETWORK.output(&dest_addr); NETSTACK_NETWORK.output(&dest_addr);
printf("Cart unblocked!\n"); printf("Cart unblocked!\n");
//leds_on(LEDS_GREEN);
} }
} }
} }

View File

@ -86,7 +86,6 @@ bool bat_update(linkaddr_t src_cart_addr, uint8_t battery_level)
void handle_association_request(linkaddr_t src, const void* data) void handle_association_request(linkaddr_t src, const void* data)
{ {
//turn on the led for association msg received
assoc_req_msg ar_msg; assoc_req_msg ar_msg;
memcpy (&ar_msg, data, sizeof ((assoc_req_msg *)data)); memcpy (&ar_msg, data, sizeof ((assoc_req_msg *)data));
if(insert_cart(ar_msg.battery_percentage, src)) if(insert_cart(ar_msg.battery_percentage, src))
@ -105,7 +104,6 @@ void handle_association_request(linkaddr_t src, const void* data)
void handle_battery_msg(linkaddr_t src, const void* data) void handle_battery_msg(linkaddr_t src, const void* data)
{ {
//turn on the led for battery msg received
battery_msg bt_msg; battery_msg bt_msg;
memcpy (&bt_msg, data, sizeof ((battery_msg *)data)); memcpy (&bt_msg, data, sizeof ((battery_msg *)data));
if(bat_update(src, bt_msg.battery_percentage)) if(bat_update(src, bt_msg.battery_percentage))