Skip to content

Commit

Permalink
release 0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
foxzool committed Sep 26, 2024
1 parent c93958d commit 4341216
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.2] - 2024-09-26

- MqttPublishPacket contains entity

## [0.4.1] - 2024-09-26

- subscribe many topics same time
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "bevy_mqtt"
description = "A simple MQTT client for Bevy ECS"
version = "0.4.1"
version = "0.4.2"
edition = "2021"
readme = "README.md"
repository = "https://github.com/foxzool/bevy_mqtt"
Expand Down
1 change: 1 addition & 0 deletions examples/pub_and_sub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fn sub_topic(
mut commands: Commands,
) {
for (entity, client, setting) in mqtt_client.iter() {
// subscribe directly
client
.subscribe("hello".to_string(), QoS::AtMostOnce)
.unwrap();
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ pub struct MqttPublishOutgoing {

#[derive(Debug, Event)]
pub struct MqttPublishPacket {
pub entity: Entity,
pub dup: bool,
pub qos: QoS,
pub retain: bool,
Expand Down Expand Up @@ -140,6 +141,7 @@ fn handle_mqtt_events(
}
rumqttc::Event::Incoming(rumqttc::Incoming::Publish(publish)) => {
publish_incoming.send(MqttPublishPacket {
entity,
dup: publish.dup,
qos: publish.qos,
retain: publish.retain,
Expand Down

0 comments on commit 4341216

Please sign in to comment.