diff --git a/buzz_scripts/include/uavstates.bzz b/buzz_scripts/include/uavstates.bzz index 8824173..843f34f 100644 --- a/buzz_scripts/include/uavstates.bzz +++ b/buzz_scripts/include/uavstates.bzz @@ -61,7 +61,7 @@ function land() { function set_goto(transf) { UAVSTATE = "GOTOGPS" statef=function() { - gotoWPRRT(transf) + gotoWP(transf) } if(rc_goto.id==id){ diff --git a/include/buzz_update.h b/include/buzz_update.h index d858deb..5680f85 100644 --- a/include/buzz_update.h +++ b/include/buzz_update.h @@ -129,9 +129,9 @@ void destroy_out_msg_queue(); /***************************************************/ /*obatins updater state*/ /***************************************************/ -//int get_update_mode(); +// int get_update_mode(); -//buzz_updater_elem_t get_updater(); +// buzz_updater_elem_t get_updater(); /***************************************************/ /*sets bzz file name*/ /***************************************************/ @@ -155,7 +155,7 @@ int compile_bzz(std::string bzz_file); void updates_set_robots(int robots); -//void set_packet_id(int packet_id); +// void set_packet_id(int packet_id); -//void collect_data(std::ofstream& logger); +// void collect_data(std::ofstream& logger); #endif diff --git a/include/buzzuav_closures.h b/include/buzzuav_closures.h index 71eb847..56f0bd6 100644 --- a/include/buzzuav_closures.h +++ b/include/buzzuav_closures.h @@ -85,7 +85,7 @@ void set_deque_full(bool state); void set_rssi(float value); void set_raw_packet_loss(float value); void set_filtered_packet_loss(float value); -//void set_api_rssi(float value); +// void set_api_rssi(float value); /* * sets current position */ diff --git a/src/buzz_update.cpp b/src/buzz_update.cpp index d9696ca..1d169f9 100644 --- a/src/buzz_update.cpp +++ b/src/buzz_update.cpp @@ -267,7 +267,7 @@ void code_message_outqueue_append() *(uint16_t*)(updater->outmsg_queue->queue + size) = (uint16_t) * (size_t*)(updater->patch_size); size += sizeof(uint16_t); memcpy(updater->outmsg_queue->queue + size, updater->patch, *(size_t*)(updater->patch_size)); - //size += (uint16_t) * (size_t*)(updater->patch_size); + // size += (uint16_t) * (size_t*)(updater->patch_size); updater_msg_ready = 1; } @@ -713,7 +713,8 @@ int compile_bzz(std::string bzz_file) double time_spent = (t2.tv_sec - t1.tv_sec) * 1000.0; //(double)(end - begin) / CLOCKS_PER_SEC; time_spent += (t2.tv_usec - t1.tv_usec) / 1000.0; // RID,update trigger,time steps taken,old byte code size, new bytecode size, patch size,update number, - // Patch_packets_received_counter,Patch_request_packets_received,Patch_packets_sent_counter,Patch_request_packets_sent_counter + // +Patch_packets_received_counter,Patch_request_packets_received,Patch_packets_sent_counter,Patch_request_packets_sent_counter logger << (int)no_of_robot << "," << neigh << "," << (double)time_spent << "," << (int)timer_steps << "," << old_byte_code_size << "," << *(size_t*)updater->bcode_size << "," << *(size_t*)updater->patch_size << "," << (int)*(uint8_t*)updater->update_no << "," << (int)packet_id_; diff --git a/src/buzzuav_closures.cpp b/src/buzzuav_closures.cpp index b5b6286..6b380d6 100644 --- a/src/buzzuav_closures.cpp +++ b/src/buzzuav_closures.cpp @@ -154,7 +154,7 @@ void parse_gpslist() double lon = atof(strtok(NULL, DELIMS)); double lat = atof(strtok(NULL, DELIMS)); int alt = atoi(strtok(NULL, DELIMS)); - //int tilt = atoi(strtok(NULL, DELIMS)); + // int tilt = atoi(strtok(NULL, DELIMS)); // DEBUG // ROS_INFO("%.6f, %.6f, %i %i %i",lat, lon, alt, tilt, tid); RB_arr.latitude = lat; @@ -178,28 +178,29 @@ int buzz_exportmap(buzzvm_t vm) / Buzz closure to export a 2D map /----------------------------------------*/ { - /* Make sure one parameter has been passed */ - buzzvm_lnum_assert(vm, 1); - /* Get the parameter */ - buzzvm_lload(vm, 1); - buzzvm_type_assert(vm, 1, BUZZTYPE_TABLE); // matrix - /* Get the table */ - buzzobj_t t = buzzvm_stack_at(vm, 1); - /* Copy the values into a vector */ - std::vector mat; - for(int32_t i = 0; i < buzzdict_size(t->t.value); ++i) { - /* Duplicate the table */ - buzzvm_dup(vm); - /* Push the index */ - buzzvm_pushi(vm, i); - /* Get the value */ - buzzvm_tget(vm); - /* Store it in the vector (assume all values are float, no mistake...) */ - mat.push_back((float)buzzvm_stack_at(vm, 1)->f.value); - /* Get rid of the value, now useless */ - buzzvm_pop(vm); - } - return buzzvm_ret0(vm); + /* Make sure one parameter has been passed */ + buzzvm_lnum_assert(vm, 1); + /* Get the parameter */ + buzzvm_lload(vm, 1); + buzzvm_type_assert(vm, 1, BUZZTYPE_TABLE); // matrix + /* Get the table */ + buzzobj_t t = buzzvm_stack_at(vm, 1); + /* Copy the values into a vector */ + std::vector mat; + for (int32_t i = 0; i < buzzdict_size(t->t.value); ++i) + { + /* Duplicate the table */ + buzzvm_dup(vm); + /* Push the index */ + buzzvm_pushi(vm, i); + /* Get the value */ + buzzvm_tget(vm); + /* Store it in the vector (assume all values are float, no mistake...) */ + mat.push_back((float)buzzvm_stack_at(vm, 1)->f.value); + /* Get rid of the value, now useless */ + buzzvm_pop(vm); + } + return buzzvm_ret0(vm); } int buzzuav_moveto(buzzvm_t vm)