Skip to content

Commit

Permalink
Merge branch 'main' into tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Mar 1, 2024
2 parents e34f2ff + a657a1d commit 41255de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/zenoh-pico/api/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ static inline z_qos_t z_qos_default(void) { return _Z_N_QOS_DEFAULT; }
* z_encoding_t encoding: The encoding of the value of this data sample.
* z_sample_kind_t kind: The kind of this data sample (PUT or DELETE).
* z_timestamp_t timestamp: The timestamp of this data sample.
* z_qos_t qos: Quality of service settings used to deliver this sample.
*/
// tags{c.z_sample_t}
typedef _z_sample_t z_sample_t;
Expand Down
3 changes: 2 additions & 1 deletion include/zenoh-pico/protocol/definitions/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ typedef _z_qos_t _z_n_qos_t;

static inline _z_qos_t _z_n_qos_create(_Bool express, z_congestion_control_t congestion_control,
z_priority_t priority) {
_z_n_qos_t ret;
_Bool nodrop = congestion_control == Z_CONGESTION_CONTROL_DROP ? 0 : 1;
_z_n_qos_t ret = {._val = (uint8_t)((express << 4) | (nodrop << 3) | priority)};
ret._val = (uint8_t)((express << 4) | (nodrop << 3) | priority);
return ret;
}
static inline z_priority_t _z_n_qos_get_priority(_z_n_qos_t n_qos) {
Expand Down

0 comments on commit 41255de

Please sign in to comment.