diff --git a/engine/core/src/service.c b/engine/core/src/service.c index d321c0d01..d20876f7f 100644 --- a/engine/core/src/service.c +++ b/engine/core/src/service.c @@ -139,6 +139,14 @@ void Service_AddAutoUpdateTarget(service_t *service, uint16_t target, uint16_t t LUOS_ASSERT(service && (target != 0)); for (uint16_t i = 0; i < MAX_AUTO_REFRESH_NUMBER; i++) { + // If this target ask something from this service just update the value + if ((service_ctx.auto_refresh[i].service == service) && (service_ctx.auto_refresh[i].target == target)) + { + service_ctx.auto_refresh[i].time_ms = time_ms; + service_ctx.auto_refresh[i].last_update = LuosHAL_GetSystick(); + return; + } + // If this slot is empty this mean that we didn't find the target in the list, just add it. if (service_ctx.auto_refresh[i].time_ms == 0) { service_ctx.auto_refresh[i].service = service; diff --git a/examples/projects/product/custom_gate/src/custom_json_conversion.c b/examples/projects/product/custom_gate/src/custom_json_conversion.c index 6b749be8a..4170c9316 100644 --- a/examples/projects/product/custom_gate/src/custom_json_conversion.c +++ b/examples/projects/product/custom_gate/src/custom_json_conversion.c @@ -92,7 +92,7 @@ void Convert_CustomJsonToMsg(service_t *service, uint16_t target_id, char *prope // This function is called by the gate to convert a message into a piece of Json. // This is typically used when a message is received by the gate with an unknown command. // You can use it to compose your own piece of Json out of the message data. -void Convert_CustomMsgToJson(msg_t *msg, char *data) +void Convert_CustomMsgToJson(const msg_t *msg, char *data) { if (msg->header.cmd == LINEAR_POSITION_2D) { diff --git a/tool_services/gate/TinyJSON/bootloader_ex.c b/tool_services/gate/TinyJSON/bootloader_ex.c index b088208db..7f0620797 100644 --- a/tool_services/gate/TinyJSON/bootloader_ex.c +++ b/tool_services/gate/TinyJSON/bootloader_ex.c @@ -39,7 +39,7 @@ uint16_t Bootloader_StartData(char *data) * @param service pointer, luos message * @return None ******************************************************************************/ -uint16_t Bootloader_LuosToJson(msg_t *msg, char *data) +uint16_t Bootloader_LuosToJson(const msg_t *msg, char *data) { uint16_t response_cmd = msg->header.cmd; uint16_t node_id = RoutingTB_NodeIDFromID(msg->header.source); diff --git a/tool_services/gate/TinyJSON/bootloader_ex.h b/tool_services/gate/TinyJSON/bootloader_ex.h index fe5531d51..724fb9566 100644 --- a/tool_services/gate/TinyJSON/bootloader_ex.h +++ b/tool_services/gate/TinyJSON/bootloader_ex.h @@ -20,7 +20,7 @@ /******************************************************************************* * Function ******************************************************************************/ -uint16_t Bootloader_LuosToJson(msg_t *, char *); +uint16_t Bootloader_LuosToJson(const msg_t *, char *); void Bootloader_JsonToLuos(service_t *, char *, json_t const *); uint16_t Bootloader_StartData(char *); void Bootloader_EndData(service_t *, char *, char *); diff --git a/tool_services/gate/TinyJSON/convert.c b/tool_services/gate/TinyJSON/convert.c index 9f491aeee..7a2dad13f 100644 --- a/tool_services/gate/TinyJSON/convert.c +++ b/tool_services/gate/TinyJSON/convert.c @@ -45,7 +45,7 @@ __attribute__((weak)) void Convert_CustomJsonToMsg(service_t *service, uint16_t * @param None * @return None ******************************************************************************/ -__attribute__((weak)) void Convert_CustomMsgToJson(msg_t *msg, char *data) +__attribute__((weak)) void Convert_CustomMsgToJson(const msg_t *msg, char *data) { return; } @@ -132,7 +132,7 @@ void Convert_DataToMsg(service_t *service, char *data) return; } - json_t const *services = json_getProperty(root, "services"); + json_t const *services = json_getProperty(root, "s"); // Get services if (services != 0) { @@ -543,12 +543,7 @@ void Convert_JsonToMsg(service_t *service, uint16_t id, luos_type_t type, char * { if (type != GATE_TYPE) { - // remove any current updates - time = TimeOD_TimeFrom_s(0); - TimeOD_TimeToMsg(&time, &msg); - msg.header.cmd = UPDATE_PUB; - Luos_SendMsg(service, &msg); - // configure the new update value + // Configure the new update value time = TimeOD_TimeFrom_s((float)json_getReal(jobj)); TimeOD_TimeToMsg(&time, &msg); msg.header.cmd = UPDATE_PUB; @@ -736,8 +731,8 @@ void Convert_JsonToMsg(service_t *service, uint16_t id, luos_type_t type, char * // This function start a Json structure and return the string size. uint16_t Convert_StartData(char *data) { - memcpy(data, "{\"services\":{", sizeof("{\"services\":{")); - return (sizeof("{\"services\":{") - 1); + memcpy(data, "{\"s\":{", sizeof("{\"s\":{")); + return (sizeof("{\"s\":{") - 1); } // This function start a Service into a Json structure and return the string size. uint16_t Convert_StartServiceData(char *data, char *alias) @@ -746,7 +741,7 @@ uint16_t Convert_StartServiceData(char *data, char *alias) return (uint16_t)strlen(data); } // This function create the Json content from a message and return the string size. -uint16_t Convert_MsgToData(msg_t *msg, char *data) +uint16_t Convert_MsgToData(const msg_t *msg, char *data) { float fdata; switch (msg->header.cmd) @@ -1086,12 +1081,6 @@ void Convert_RoutingTableData(service_t *service) *(--json_ptr) = '\0'; // End the Json message sprintf(json_ptr, "]}\n"); - // Run loop before to flush residual msg on the pipe - Luos_Loop(); - // reset all the msg in pipe link - PipeLink_Reset(service); - // call Luos loop to generap a Luos Task with this msg - Luos_Loop(); // Send the message to pipe PipeLink_Send(service, json, strlen(json)); } diff --git a/tool_services/gate/TinyJSON/custom-json.h b/tool_services/gate/TinyJSON/custom-json.h index 91c102398..280979b52 100644 --- a/tool_services/gate/TinyJSON/custom-json.h +++ b/tool_services/gate/TinyJSON/custom-json.h @@ -9,5 +9,5 @@ #include "luos_engine.h" void Convert_CustomJsonToMsg(service_t *service, uint16_t target_id, char *property, const json_t *jobj, char *json_str); -void Convert_CustomMsgToJson(msg_t *msg, char *data); +void Convert_CustomMsgToJson(const msg_t *msg, char *data); const char *Convert_CustomStringFromType(luos_type_t type); diff --git a/tool_services/gate/convert.h b/tool_services/gate/convert.h index 600bf53a1..73c8d1cbb 100644 --- a/tool_services/gate/convert.h +++ b/tool_services/gate/convert.h @@ -31,7 +31,7 @@ void Convert_DataToMsg(service_t *service, char *data); // Luos service information to Data convertion uint16_t Convert_StartData(char *data); uint16_t Convert_StartServiceData(char *data, char *alias); -uint16_t Convert_MsgToData(msg_t *msg, char *data); +uint16_t Convert_MsgToData(const msg_t *msg, char *data); uint16_t Convert_EndServiceData(char *data); void Convert_EndData(service_t *service, char *data, char *data_ptr); void Convert_VoidData(service_t *service); diff --git a/tool_services/gate/data_manager.c b/tool_services/gate/data_manager.c index abd5e1d3f..5220d1147 100644 --- a/tool_services/gate/data_manager.c +++ b/tool_services/gate/data_manager.c @@ -10,7 +10,6 @@ #include "pipe_link.h" #include "bootloader_ex.h" -static void DataManager_Format(service_t *service); uint8_t DataManager_ServiceIsSensor(luos_type_t type); // This function will manage msg collection from sensors @@ -18,13 +17,7 @@ void DataManager_collect(service_t *service) { msg_t update_msg; search_result_t result; -#ifdef GATE_POLLING - update_msg.header.cmd = GET_CMD; - update_msg.header.target_mode = SERVICEID; - update_msg.header.size = 0; -#else update_msg.header.target_mode = SERVICEIDACK; -#endif RTFilter_Reset(&result); // ask services to publish datas for (uint8_t i = 0; i < result.result_nbr; i++) @@ -32,276 +25,132 @@ void DataManager_collect(service_t *service) // Check if this service is a sensor if ((DataManager_ServiceIsSensor(result.result_table[i]->type)) || (result.result_table[i]->type >= LUOS_LAST_TYPE)) { -#ifdef GATE_POLLING - // This service is a sensor so create a msg and send it - update_msg.header.target = result.result_table[i]->id; - Luos_SendMsg(service, &update_msg); - #ifdef GATE_TIMEOUT - // Get the current number of message available - int back_nbr_msg = Luos_NbrAvailableMsg(); - // Get the current time - uint32_t send_time = Luos_GetSystick(); - // Wait for a reply before continuing - while ((back_nbr_msg == Luos_NbrAvailableMsg()) & (send_time == Luos_GetSystick())) - { - Luos_Loop(); - } - #endif -#else // This service is a sensor so create a msg to enable auto update - // First remove any auto update - time_luos_t reset_time = {.raw = 0}; - update_msg.header.target = result.result_table[i]->id; - TimeOD_TimeToMsg(&reset_time, &update_msg); - update_msg.header.cmd = UPDATE_PUB; - Luos_SendMsg(service, &update_msg); + update_msg.header.target = result.result_table[i]->id; TimeOD_TimeToMsg(&update_time, &update_msg); update_msg.header.cmd = UPDATE_PUB; Luos_SendMsg(service, &update_msg); -#endif } } } -// This function manage entirely data conversion -void DataManager_Run(service_t *service) -{ -#ifdef GATE_POLLING - DataManager_collect(service); -#endif - DataManager_Format(service); -} -// This function manage only commands incoming from pipe -void DataManager_RunPipeOnly(service_t *service) +// This function will create a data string for services datas +void DataManager_Run(service_t *service, const msg_t *data_msg) { - msg_t data_msg; - if (PipeLink_GetId() != 0) + char data[GATE_BUFF_SIZE]; + search_result_t result; + luos_assert_t assertion; + dead_target_t *dead_target; + char *data_ptr = data; + + // Init the data string + data_ptr += Convert_StartData(data_ptr); + switch (data_msg->header.cmd) { - while (Luos_ReadFromService(service, PipeLink_GetId(), &data_msg) == SUCCEED) - { - // This message is a command from pipe - // Convert the received data into Luos commands - static char data_cmd[GATE_BUFF_SIZE]; - if (data_msg.header.cmd == PARAMETERS) + case ASSERT: + memcpy(assertion.unmap, data_msg->data, data_msg->header.size); + assertion.unmap[data_msg->header.size] = '\0'; + Convert_AssertToData(service, data_msg->header.source, assertion); + break; + + case DEADTARGET: + dead_target = (dead_target_t *)data_msg->data; + if (dead_target->node_id != 0) { - uintptr_t pointer; - memcpy(&pointer, data_msg.data, sizeof(void *)); - PipeLink_SetDirectPipeSend((void *)pointer); - continue; + Convert_DeadNodeToData(service, dead_target->node_id); } - if (Luos_ReceiveData(service, &data_msg, data_cmd) > 0) + if (dead_target->service_id != 0) { - // We finish to receive this data, execute the received command - Convert_DataToMsg(service, data_cmd); + Convert_DeadServiceToData(service, dead_target->service_id); } - } - } - if (Luos_ReadMsg(service, &data_msg) == SUCCEED) - { - // Check if a node send a end detection - if (data_msg.header.cmd == END_DETECTION) - { - // Find a pipe + break; + case BOOTLOADER_START ... BOOTLOADER_ERROR_SIZE: + data_ptr = data; + data_ptr += Bootloader_StartData(data_ptr); + data_ptr += Bootloader_LuosToJson(data_msg, data_ptr); + Bootloader_EndData(service, data, data_ptr); + return; + break; + case END_DETECTION: + // find a pipe PipeLink_Find(service); - if (gate_running == PREPARING) - { - // Generate routing table datas - Convert_RoutingTableData(service); - // Run the gate - gate_running = RUNNING; -#ifndef GATE_POLLING - first_conversion = true; -#endif - } - } - } -} - -// This function will create a data string for services datas -void DataManager_Format(service_t *service) -{ - char data[GATE_BUFF_SIZE]; - char boot_data[GATE_BUFF_SIZE]; - msg_t data_msg; - search_result_t result; - static uint32_t FirstNoReceptionDate = 0; - static uint32_t LastVoidMsg = 0; - char *data_ptr = data; - char *boot_data_ptr = boot_data; - uint8_t data_ok = false; - uint8_t boot_data_ok = false; - - RTFilter_Reset(&result); + break; - if ((Luos_NbrAvailableMsg() > 0)) - { - // Init the data string - data_ptr += Convert_StartData(data_ptr); - boot_data_ptr += Bootloader_StartData(boot_data_ptr); - // loop into services. - int i = 0; - while (i < result.result_nbr) - { - if (Luos_ReadFromService(service, result.result_table[i]->id, &data_msg) == SUCCEED) + default: + // Check if this is a message from pipe + if (data_msg->header.source == PipeLink_GetId()) { - // check if this is an assert - if (data_msg.header.cmd == ASSERT) - { - luos_assert_t assertion; - memcpy(assertion.unmap, data_msg.data, data_msg.header.size); - assertion.unmap[data_msg.header.size] = '\0'; - Convert_AssertToData(service, data_msg.header.source, assertion); - i++; - continue; - } - if (data_msg.header.cmd == DEADTARGET) - { - dead_target_t *dead_target = (dead_target_t *)data_msg.data; - if (dead_target->node_id != 0) - { - Convert_DeadNodeToData(service, dead_target->node_id); - } - if (dead_target->service_id != 0) - { - Convert_DeadServiceToData(service, dead_target->service_id); - } - continue; - } - // check if a node send a bootloader message - if (data_msg.header.cmd >= BOOTLOADER_START && data_msg.header.cmd <= BOOTLOADER_ERROR_SIZE) - { - do - { - boot_data_ptr += Bootloader_LuosToJson(&data_msg, boot_data_ptr); - } while (Luos_ReadFromService(service, data_msg.header.source, &data_msg) == SUCCEED); - boot_data_ok = true; - i++; - continue; - } - // check if a node send a end detection - if (data_msg.header.cmd == END_DETECTION) - { - // find a pipe - PipeLink_Find(service); - i++; - continue; - } - // Check if this is a message from pipe - if (data_msg.header.source == PipeLink_GetId()) + // This message is a command from pipe + static char data_cmd[GATE_BUFF_SIZE]; + // Convert the received data into Luos commands + int size = Luos_ReceiveData(service, data_msg, data_cmd); + if (size > 0) { - do + // We finish to receive this data, execute the received command + char *data_ptr = data_cmd; + if (data_msg->header.cmd == SET_CMD) { - // This message is a command from pipe - static char data_cmd[GATE_BUFF_SIZE]; - // Convert the received data into Luos commands - int size = Luos_ReceiveData(service, &data_msg, data_cmd); - if (size > 0) + while (size > 0 && *data_ptr == '{') { - // We finish to receive this data, execute the received command - char *data_ptr = data_cmd; - if (data_msg.header.cmd == SET_CMD) - { - while (size > 0 && *data_ptr == '{') - { - uint32_t data_consumed = strlen(data_ptr) + 1; - Convert_DataToMsg(service, data_ptr); - size -= data_consumed; - data_ptr += data_consumed; - } - } + uint32_t data_consumed = strlen(data_ptr) + 1; + Convert_DataToMsg(service, data_ptr); + size -= data_consumed; + data_ptr += data_consumed; } - } while (Luos_ReadFromService(service, PipeLink_GetId(), &data_msg) == SUCCEED); - i++; - continue; - } - // get the source of this message - // Create service description - char *alias; - alias = result.result_table[i]->alias; - LUOS_ASSERT(alias != 0); - data_ok = true; - data_ptr += Convert_StartServiceData(data_ptr, alias); - // Convert all msgs from this service into data - do - { - data_ptr += Convert_MsgToData(&data_msg, data_ptr); - } while (Luos_ReadFromService(service, data_msg.header.source, &data_msg) == SUCCEED); - - data_ptr += Convert_EndServiceData(data_ptr); - LUOS_ASSERT((data_ptr - data) < GATE_BUFF_SIZE); - } - i++; - } - if (Luos_NbrAvailableMsg() != 0) - { - // We still have messages.This could be because we received some during the execution of the last loop.Or this could be because the gate have been excluded from the routing table, let's try to catch some message for the Gate service. - // Luos_ReadFromService(service, BROADCAST_VAL, &data_msg); - if (Luos_ReadFromCmd(service, DEADTARGET, &data_msg) == SUCCEED) - { - dead_target_t *dead_target = (dead_target_t *)data_msg.data; - if (dead_target->node_id != 0) - { - Convert_DeadNodeToData(service, dead_target->node_id); - } - if (dead_target->service_id != 0) - { - if (dead_target->service_id == service->id) - { - // This is the exclusion of our Gate service! - // This mean that the gate is not able to communicate with anything anymore and looks like dead. - // To avoid it we will remake the detection. - Luos_Detect(service); - } - else - { - Convert_DeadServiceToData(service, dead_target->service_id); } } + break; } - } - if (data_ok) - { + // get the source of this message + // Create service description + char *alias; + RTFilter_Reset(&result); + RTFilter_ID(&result, data_msg->header.source); + alias = result.result_table[0]->alias; + LUOS_ASSERT(alias != 0); + data_ptr += Convert_StartServiceData(data_ptr, alias); + // Convert all msgs from this service into data + data_ptr += Convert_MsgToData(data_msg, data_ptr); + data_ptr += Convert_EndServiceData(data_ptr); Convert_EndData(service, data, data_ptr); - FirstNoReceptionDate = 0; - } - else if (boot_data_ok) + LUOS_ASSERT((data_ptr - data) < GATE_BUFF_SIZE); + break; + } +} + +// This function manage only commands incoming from pipe +void DataManager_RunPipeOnly(service_t *service, const msg_t *data_msg) +{ + if ((PipeLink_GetId() != 0) && (data_msg->header.source == PipeLink_GetId())) + { + // This message is a command from pipe + // Convert the received data into Luos commands + static char data_cmd[GATE_BUFF_SIZE]; + if (data_msg->header.cmd == PARAMETERS) { - Bootloader_EndData(service, boot_data, boot_data_ptr); + uintptr_t pointer; + memcpy(&pointer, data_msg->data, sizeof(void *)); + PipeLink_SetDirectPipeSend((void *)pointer); } - else + else if (Luos_ReceiveData(service, data_msg, data_cmd) > 0) { - // We don't receive anything. - // After 1s void reception send void data allowing client to send commands (because client could be synchronized to reception). - if (FirstNoReceptionDate == 0) - { - FirstNoReceptionDate = Luos_GetSystick(); - } - else if ((Luos_GetSystick() - FirstNoReceptionDate) > 1000) - { - if ((Luos_GetSystick() - LastVoidMsg) > 10) - { - LastVoidMsg = Luos_GetSystick(); - Convert_VoidData(service); - } - } + // We finish to receive this data, execute the received command + Convert_DataToMsg(service, data_cmd); } } - else + // Check if a node send a end detection + if (data_msg->header.cmd == END_DETECTION) { - // We don't receive anything. - // After 1s void reception send void data allowing client to send commands (because client could be synchronized to reception). - if (FirstNoReceptionDate == 0) - { - FirstNoReceptionDate = Luos_GetSystick(); - } - else if (Luos_GetSystick() - FirstNoReceptionDate > 1000) + // Find a pipe + PipeLink_Find(service); + if (gate_running == PREPARING) { - if ((Luos_GetSystick() - LastVoidMsg) > 10) - { - LastVoidMsg = Luos_GetSystick(); - Convert_VoidData(service); - } + // Generate routing table datas + Convert_RoutingTableData(service); + // Run the gate + gate_running = RUNNING; + first_conversion = true; } } } diff --git a/tool_services/gate/data_manager.h b/tool_services/gate/data_manager.h index f0c62a3c7..0b119e088 100644 --- a/tool_services/gate/data_manager.h +++ b/tool_services/gate/data_manager.h @@ -24,9 +24,7 @@ typedef enum ******************************************************************************/ extern time_luos_t update_time; extern volatile gate_state_t gate_running; -#ifndef GATE_POLLING extern volatile bool first_conversion; -#endif /******************************************************************************* * Function @@ -36,9 +34,9 @@ extern volatile bool first_conversion; void DataManager_collect(service_t *service); // This function manage entirely data conversion -void DataManager_Run(service_t *service); +void DataManager_Run(service_t *service, const msg_t *data_msg); // This function manage only commande incoming from pipe -void DataManager_RunPipeOnly(service_t *service); +void DataManager_RunPipeOnly(service_t *service, const msg_t *data_msg); #endif /* DATA_MNGR_H */ diff --git a/tool_services/gate/gate.c b/tool_services/gate/gate.c index 030d94c82..a8f4b20d2 100644 --- a/tool_services/gate/gate.c +++ b/tool_services/gate/gate.c @@ -15,15 +15,15 @@ /******************************************************************************* * Definitions ******************************************************************************/ +static void Gate_msgHandler(service_t *service, const msg_t *msg); /******************************************************************************* * Variables ******************************************************************************/ service_t *gate; volatile gate_state_t gate_running = NOT_RUNNING; -#ifndef GATE_POLLING -volatile bool first_conversion = false; -#endif +volatile bool first_conversion = false; +uint32_t LastReceptionDate = 0; time_luos_t update_time = {GATE_REFRESH_TIME_S}; /******************************************************************************* @@ -37,7 +37,7 @@ time_luos_t update_time = {GATE_REFRESH_TIME_S}; void Gate_Init(void) { revision_t revision = {.major = 2, .minor = 0, .build = 0}; - gate = Luos_CreateService(0, GATE_TYPE, "gate", revision); + gate = Luos_CreateService(Gate_msgHandler, GATE_TYPE, "gate", revision); #ifndef NODETECTION uint32_t init_timer = Luos_GetSystick(); while (Luos_GetSystick() - init_timer < INIT_TIME) @@ -53,56 +53,50 @@ void Gate_Init(void) ******************************************************************************/ void Gate_Loop(void) { -#ifndef GATE_POLLING - static uint32_t last_time = 0; -#endif + static uint32_t LastVoidMsg = 0; + // We don't receive anything. + // After 1s void reception send void data allowing client to send commands (because client could be synchronized to reception). + if (LastReceptionDate == 0) + { + LastReceptionDate = Luos_GetSystick(); + } + else if ((Luos_GetSystick() - LastReceptionDate > 1000) && (gate_running == RUNNING)) + { + if ((Luos_GetSystick() - LastVoidMsg) > TimeOD_TimeTo_ms(update_time)) + { + LastVoidMsg = Luos_GetSystick(); + Convert_VoidData(gate); + } + } +} +void Gate_msgHandler(service_t *service, const msg_t *msg) +{ // Check the detection status. if (Luos_IsDetected() == false) { -#ifndef GATE_POLLING - update_time = TimeOD_TimeFrom_s(GATE_REFRESH_TIME_S); -#endif + update_time = TimeOD_TimeFrom_s(GATE_REFRESH_TIME_S); + LastReceptionDate = 0; } else { // Network have been detected, We are good to go + LastReceptionDate = Luos_GetSystick(); if (gate_running == RUNNING) { // Manage input and output data - DataManager_Run(gate); -#ifndef GATE_POLLING - if ((Luos_GetSystick() - last_time >= TimeOD_TimeTo_ms(update_time)) && (Luos_GetSystick() > last_time)) + DataManager_Run(service, msg); + if (first_conversion == true) { - last_time = Luos_GetSystick(); - if (first_conversion == true) - { - // This is the first time we perform a convertion - #ifdef GATE_REFRESH_AUTOSCALE - // Evaluate the time needed to convert all the data of this configuration and update refresh rate - search_result_t result; - RTFilter_Reset(&result); - // find the biggest id - if (result.result_table[result.result_nbr - 1]->id) - { - // update time is related to the biggest id - update_time = TimeOD_TimeFrom_s((float)result.result_table[result.result_nbr - 1]->id * 0.001); - } - else - { - update_time = TimeOD_TimeFrom_s(GATE_REFRESH_TIME_S); - } - #endif - // Update refresh rate for all services of the network - DataManager_collect(gate); - first_conversion = false; - } + // This is the first time we perform a convertion + // Update refresh rate for all services of the network + DataManager_collect(service); + first_conversion = false; } -#endif } else { - DataManager_RunPipeOnly(gate); + DataManager_RunPipeOnly(service, msg); } } } diff --git a/tool_services/gate/gate_config.h b/tool_services/gate/gate_config.h index d2f064146..05f0cfbba 100644 --- a/tool_services/gate/gate_config.h +++ b/tool_services/gate/gate_config.h @@ -14,7 +14,6 @@ * Define | Description * :-----------------------|----------------------------------------------- * GATE_BUFF_SIZE | Formatted Data Buffer. Max size of 1 msg - * GATE_POLLING | No autorefresh always ask data (more intensive to Luos bandwidth.) * NODETECTION | Gate not perform a network detection a power up * GATE_REFRESH_TIME_S | Default refresh Gate recalculate optimal rate at first command * INIT_TIME | Delay before first detection, to verify that all boards are connected @@ -30,7 +29,6 @@ #ifndef GATE_REFRESH_TIME_S #define GATE_REFRESH_TIME_S 0.05f - #define GATE_REFRESH_AUTOSCALE #endif #endif /* GATE_CONFIG_H */ diff --git a/tool_services/pipe/_pipe.h b/tool_services/pipe/_pipe.h index 09948448a..f0e86c15f 100644 --- a/tool_services/pipe/_pipe.h +++ b/tool_services/pipe/_pipe.h @@ -10,7 +10,7 @@ * Definitions ******************************************************************************/ #ifndef PIPE_SERIAL_BAUDRATE - #define PIPE_SERIAL_BAUDRATE 1000000 + #define PIPE_SERIAL_BAUDRATE 3000000 #endif #ifndef PIPE_TX_BUFFER_SIZE #define PIPE_TX_BUFFER_SIZE 1024 @@ -29,4 +29,4 @@ * Function ******************************************************************************/ streaming_channel_t *Pipe_GetTxStreamChannel(void); -streaming_channel_t *Pipe_GetRxStreamChannel(void); \ No newline at end of file +streaming_channel_t *Pipe_GetRxStreamChannel(void);