Skip to content

Commit

Permalink
Run clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Mallets committed Mar 27, 2024
1 parent 8e01007 commit a25754b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 21 deletions.
28 changes: 13 additions & 15 deletions src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,11 @@ OWNED_FUNCTIONS_PTR_CLONE(z_publisher_t, z_owned_publisher_t, publisher, _z_owne
void z_publisher_drop(z_owned_publisher_t *val) { z_undeclare_publisher(val); }

z_put_options_t z_put_options_default(void) {
return (z_put_options_t) {
.encoding = z_encoding_default(), .congestion_control = Z_CONGESTION_CONTROL_DEFAULT,
.priority = Z_PRIORITY_DEFAULT,
return (z_put_options_t){.encoding = z_encoding_default(),
.congestion_control = Z_CONGESTION_CONTROL_DEFAULT,
.priority = Z_PRIORITY_DEFAULT,
#if Z_FEATURE_ATTACHMENT == 1
.attachment = z_attachment_null()
.attachment = z_attachment_null()
#endif
};
}
Expand Down Expand Up @@ -715,10 +715,9 @@ int8_t z_undeclare_publisher(z_owned_publisher_t *pub) {
}

z_publisher_put_options_t z_publisher_put_options_default(void) {
return (z_publisher_put_options_t) {
.encoding = z_encoding_default(),
return (z_publisher_put_options_t){.encoding = z_encoding_default(),
#if Z_FEATURE_ATTACHMENT == 1
.attachment = z_attachment_null()
.attachment = z_attachment_null()
#endif
};
}
Expand Down Expand Up @@ -782,14 +781,13 @@ z_owned_keyexpr_t z_publisher_keyexpr(z_publisher_t publisher) {
OWNED_FUNCTIONS_PTR_INTERNAL(z_reply_t, z_owned_reply_t, reply, _z_reply_free, _z_owner_noop_copy)

z_get_options_t z_get_options_default(void) {
return (z_get_options_t) {
.target = z_query_target_default(), .consolidation = z_query_consolidation_default(),
.value = {.encoding = z_encoding_default(), .payload = _z_bytes_empty()},
return (z_get_options_t){.target = z_query_target_default(),
.consolidation = z_query_consolidation_default(),
.value = {.encoding = z_encoding_default(), .payload = _z_bytes_empty()},
#if Z_FEATURE_ATTACHMENT == 1
// TODO:ATT.attachment = z_attachment_null()
// TODO:ATT.attachment = z_attachment_null()
#endif
.timeout_ms = Z_GET_TIMEOUT_DEFAULT
};
.timeout_ms = Z_GET_TIMEOUT_DEFAULT};
}

typedef struct __z_reply_handler_wrapper_t {
Expand Down Expand Up @@ -1090,7 +1088,7 @@ z_owned_keyexpr_t z_subscriber_keyexpr(z_subscriber_t sub) {

/**************** Tasks ****************/
zp_task_read_options_t zp_task_read_options_default(void) {
return (zp_task_read_options_t) {
return (zp_task_read_options_t){
#if Z_FEATURE_MULTI_THREAD == 1
.task_attributes = NULL
#else
Expand Down Expand Up @@ -1123,7 +1121,7 @@ int8_t zp_stop_read_task(z_session_t zs) {
}

zp_task_lease_options_t zp_task_lease_options_default(void) {
return (zp_task_lease_options_t) {
return (zp_task_lease_options_t){
#if Z_FEATURE_MULTI_THREAD == 1
.task_attributes = NULL
#else
Expand Down
2 changes: 1 addition & 1 deletion src/protocol/definitions/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ _z_msg_query_reqexts_t _z_msg_query_required_extensions(const _z_msg_query_t *ms
#if Z_FEATURE_ATTACHMENT == 1
z_attachment_t att = _z_encoded_as_attachment(&msg->_ext_attachment);
#endif
return (_z_msg_query_reqexts_t) {
return (_z_msg_query_reqexts_t){
.body = msg->_ext_value.payload.start != NULL || msg->_ext_value.encoding.prefix != 0 ||
!_z_bytes_is_empty(&msg->_ext_value.encoding.suffix),
.info = _z_id_check(msg->_ext_info._id) || msg->_ext_info._entity_id != 0 || msg->_ext_info._source_sn != 0,
Expand Down
4 changes: 2 additions & 2 deletions src/system/espidf/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,13 +624,13 @@ int8_t _z_listen_serial_from_dev(_z_sys_net_socket_t *sock, char *dev, uint32_t
return ret;
}

void _z_close_serial(_z_sys_net_socket_t *sock) {
void _z_close_serial(_z_sys_net_socket_t *sock) {
uart_wait_tx_done(sock->_serial, 1000);
uart_flush(sock->_serial);
uart_driver_delete(sock->_serial);
zp_free(sock->after_cobs);
zp_free(sock->before_cobs);
}
}

size_t _z_read_serial(const _z_sys_net_socket_t sock, uint8_t *ptr, size_t len) {
int8_t ret = _Z_RES_OK;
Expand Down
4 changes: 2 additions & 2 deletions src/system/espidf/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ int z_sleep_ms(size_t time) {
// This may compound, so this approach may make sleeps longer than expected.
// This extra check tries to minimize the amount of extra time it might sleep.
while (z_time_elapsed_ms(&start) < time) {
//z_sleep_us(1000);
vTaskDelay(1/portTICK_PERIOD_MS);
// z_sleep_us(1000);
vTaskDelay(1 / portTICK_PERIOD_MS);
}

return 0;
Expand Down
2 changes: 1 addition & 1 deletion zenohpico.pc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ prefix=/usr/local
Name: zenohpico
Description:
URL:
Version: 0.11.20240123dev
Version: 0.11.20240327dev
Cflags: -I${prefix}/include
Libs: -L${prefix}/lib -lzenohpico

0 comments on commit a25754b

Please sign in to comment.